Go to Post Yes, I think we can all agree that bad people suck. - Joe Johnson [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Spotlight this post!  
Unread 01-02-2013, 15:41
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: remainder function

Quote:
Originally Posted by 1075guy View Post
What about:
EthersRemainder
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.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 14:22.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi