Link to home
Start Free TrialLog in
Avatar of ieplved
ieplved

asked on

Truncating mathematics result

I would like to truncate the result of division , without rounding up,
for report presentation.

Is there such a feature in C and Informix?
 
Avatar of ozo
ozo
Flag of United States of America image

#include <math.h>
floor(a/b)

ASKER CERTIFIED SOLUTION
Avatar of rbr
rbr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
(long)(a/b) can also round up if a/b is negative, which ieplved didn't want.
(On the other hand, the question also said "truncate",
so it's not quite clear what's really being asked for)
Avatar of ieplved
ieplved

ASKER

rbr, are you familiar with Informix-4GL?