I know you can get decimal digits with log10 tricks, but log10 isn't exactly a fast operation..
Is there any way to make a (formatted) string out of an IEEE float/double without using a log10 trick? If so, how does it work?
(and please don't come up with a C function, I know sprintf would do fine but I really need a general algorithm rather than C-only)
[General algorithms] custom IEEE-float toString
Moderator: MaxCoderz Staff
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
-
- MCF Legend
- Posts: 1601
- Joined: Mon 20 Dec, 2004 8:45 am
- Location: Budapest, Absurdistan
- Contact:
The task is anything but simple, so looking into printf might not be a bad idea after all.
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am