italie |
MAME owes italie many thank yous, hah
|
|
|
Reged: 09/20/03
|
Posts: 15246
|
Loc: BoomTown
|
|
Send PM
|
|
Re: Programming/maths question....soft floats...
07/27/13 12:50 AM
|
|
|
> As for keeping "significant digits": if you mean keeping decimal digits, you > definitely should see this: http://floating-point-gui.de/ > > As for dividing without a division instruction: see this: > http://www.math.usm.edu/lambers/mat460/fall09/lecture10.pdf > > If you are working on integers, and want the result as a percentage, you don't need > soft floats. You can compute (A/B) as ((100*A)/B) and have your answer as a > percentage. If you want to round to the nearest percentage point, compute (A/B) as > ((((200*A)/B)+1)/2) or maybe ((((200*A)/B)+1)>>1) where >> is binary right-shift.
Just curious for my own betterment, was significant digits not a term that carried across well?
|
|