-
Notifications
You must be signed in to change notification settings - Fork 72
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
Use Base.Math.rem_pio2_kernel for quadrant on Julia 0.7 #119
Comments
I was checking the way |
I tried that, but it's not good enough (or, at least, I couldn't get it to work) -- we actually need a |
For floats, see what |
@edit rem(big"0.1", 2*BigFloat(pi), RoundNearest) You're right that julia> @btime Base.Math.ieee754_rem_pio2(3.1)
39.199 ns (2 allocations: 128 bytes)
(2, [-0.0415927, 2.43541e-18]) whereas on 0.7: julia> @btime Base.Math.rem_pio2_kernel(3.1)
1.648 ns (0 allocations: 0 bytes)
(2, Base.Math.DoubleFloat64(-0.04159265358979315, 2.4354103626379128e-18)) !! |
Fixed by #235. |
Finally |
In Julia 0.7 we can use
Base.Math.rem_pio2_kernel
for the quadrant calculation for trig functions, especiallytan
.(Thanks to Simon Byrne for the tip.)
The text was updated successfully, but these errors were encountered: