You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/math/arithmetic/modpi.jl
+10-22Lines changed: 10 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
## This work was supported in part by the U.S. Department of Energy, Office of Science, Office of Workforce Development for Teachers and Scientists (WDTS) under the Science Undergraduate Laboratory Internships Program (SULI) program at Oak Ridge National Laboratory, administered by the Oak Ridge Institute for Science and Education.
3
3
4
4
functionmod2pi(x::DoubleFloat{T}) where {T<:IEEEFloat}
5
-
s =signbit(x)
5
+
s =x <0
6
6
c = s ?-1:1
7
7
y = c * x
8
8
y <pi2o1(DoubleFloat{T}) &&return s ?pi2o1(DoubleFloat{T}) - y : y
0 commit comments