[math-fun] Nearest integer function
7 May
2011
7 May
'11
6:28 a.m.
Here's a formula I created for the nearest integer function: nint(x) = x + sum[k=1..infinity] sin(2*pi*k*(x+1/2))/(pi*k) It is equivalent to the following discrete function: nint(x) = x iff 2x is an integer; nint(x) = floor(x+1/2) otherwise. http://mathworld.wolfram.com/NearestIntegerFunction.html It would be interesting to see how my formula handles complex numbers. (Unlike the MathWorld definition, my function leaves half-integers invariant.) Sincerely, Adam P. Goucher
5312
Age (days ago)
5312
Last active (days ago)
0 comments
1 participants
participants (1)
-
Adam P. Goucher