Does floorf work?
Does floorf work?
- Subject: Does floorf work?
- From: Scott Ellsworth <email@hidden>
- Date: Mon, 26 Sep 2005 18:06:38 -0700
Hi, all.
I seem to be missing something here...
Why does
float aReal = 39.89f;
aReal = floorf(aReal);
NSLog(@"Setting to %f",aReal);
float expF = log10f(aReal);
NSLog(@"exp %f",expF);
float trimmedExpF = floorf(expF);
NSLog(@"desired %f log %f trimmed %f",aReal, expF, trimmedExpF);
produce
2005-09-26 18:05:09.802 Astrogator[10479] Setting to 39.000000
2005-09-26 18:05:09.802 Astrogator[10479] exp 1.591065
2005-09-26 18:05:09.802 Astrogator[10479] desired 39.000000 log
1.591065 trimmed 1.591065
The trimmed value should have been 1.00000.
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden