View Single Post
  #3   Spotlight this post!  
Unread 01-02-2013, 14:16
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
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 sur View Post
It looks like you need to define it using extern "C" for WindRiver to compile it correctly:

Code:
#include <cmath>
using namespace std;

extern "C" double remainder(double, double);
Would you mind running that and see if it produces the same output as this:

Code:
double myRemainder(double x, double y){
return x-y*floor(0.5+x/y);
}


Reply With Quote