> Somebody, knowing that floating-point is not allowed, may try to
> come up with a readable fixed-point fraction for display. The
> nature of the fraction precludes shifts since the idea is to get
> a decimal value to put after a '.'.
For anyone interested in fixed point with long long, I did some
work on this for the StrongARM (no FPU). It needs a little porting
to other CPUs, namely multiplication and double packing/unpacking.
ftp://ftp.netwinder.org/users/a/andrewm/math/math-sll.c
It has routines for:
+ - * / sin cos tan exp log pow
and converting to/from ints and doubles. I'll add more as the
mood arises, or people send me patches :)
-- Andrew E. Mileski - Software Engineer Rebel.com http://www.rebel.com/- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:20 EST