Libc: fix ef_exp.s by Bughunter #177
Reference in New Issue
Block a user
Delete Branch "libc-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
menuetlibc: Fix floating exponent calculation
The fix was initially done by Bughunter in
12a6b7f2(r7958) for double.This commit applies the same fix to the float exponent.
The input parameters of the function are in different formats (4 or 8 bytes).


The algorithm of operation must be the same, because the FPU registers are 80 bits. After exiting the function, the result is converted to 4 or 8 bytes. It is impossible to finally test the correctness of the expf (float) function because the expf function is not exported from the libc library.
@IgorA There seems to be no point in this fix since
menuetlibcis deprecated.In
libc.obj, the mathematics was taken from here, perhaps there is also a bug there: https://git.kolibrios.org/KolibriOS/kolibrios/src/branch/main/programs/develop/ktcc/trunk/libc.obj/source/mathI made a test program and found that after revision 9842 the exp function was broken.



test in excel:
d5c1325b02to3c547b217f3c547b217fto2cba153e06