|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#9
|
||||
|
||||
|
Re: remainder function
That's not my remainder.
Did you compile and run it ? It doesn't work correctly. I'm sure that there's a way, with enough conditional logic, to torture fmod() or % into into a remainder* function, but what I am really asking in this thread is a) does the C++ compiler provided with FRC have the remainder* function, and b) does it behave like this: *This* is my remainder: Code:
double myRemainder(double x, double y){
return x-y*floor(0.5+x/y);
}
*per IEC 60559 as specified on Page 235 Section 7.12.10.2 of ISO/IEC 9899:TC3 Last edited by Ether : 01-02-2013 at 16:11. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|