Coding Questions and other Quandaries
#99
(02-21-2022, 02:32 PM)Vega Wrote: 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.

Another opcode to use. Very cool indeed!
I would have never thought of doing that.
Must...restrain...the...urge...to...overthink Lol!!
Reply


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

Forum Jump:


Users browsing this thread: 2 Guest(s)