View Single Post
  #3   Spotlight this post!  
Unread 12-02-2008, 15:49
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Perhaps I don't understand the function of fabs()

Quote:
Originally Posted by JimWright949 View Post
fabs is going to return a value of type float. You are asking printf to interpret this float as an int (%d). To fix it change the %d to %f:
printf("\r\n%f",fabs(-1));
The microchip printf does not have a %f format. See this thread for some workarounds: http://www.chiefdelphi.com/forums/sh...threadid=63845