Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why set res->error to zero for log function in handle_math_d_long of handleReal.cpp? #1

Open
yixin-09 opened this issue Apr 5, 2024 · 0 comments

Comments

@yixin-09
Copy link

yixin-09 commented Apr 5, 2024

I don't know why set res->error as zero when temp < 0 for log and log10 function:

res->error = temp - computedResd;
if(opCode == LOG || opCode == LOG10){
if(temp <= 0){
res->error = 0;
}
}
in lines 1169-1174 of handleReal.cpp.
The code will ignore errors when inputs close to 1, for example, x = 0.99999 and temp = Log(x).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant