Coding Questions and other Quandaries
#98
Hey floating points! Nice work.

Here's a cool trick.

To set an FPR to 0, just substract it by itself. Since your default instruction is in single precision, use that for the subtraction.

fsubs f0, f0, f0
stfs f0, 0x6C00 (r3)

--

Also to set an FPR value to 1, just divide it by itself. Obviously it won't work if the FPR value is zero.
Reply


Messages In This Thread
RE: Coding Questions and other Quandaries - by Vega - 02-21-2022, 02:32 PM

Forum Jump:


Users browsing this thread: 10 Guest(s)