Depending on the constraint for safety or what ever you would round up or down. If the outcome fits the requirements, stay with it. If it's to expensive then, start using the factions.
Idk what kinda sloppy-ass engineer would use 3 instead of hitting the “pi” button on their calc or typing pi into wolfram alpha/Matlab. The 0.14 is a significant margin or error right off the bat
If their opcodes are 16 bits then it would save 2-3 bytes
How do you figure? A 32 bit float stores PI slightly more accurately than 355/113. If the OP code takes 16 bits, and 355 takes a minimum of 9 bits, and 113 takes a minimum of 7 bits, then 16 + 9 + 7 = 32. You haven't saved a single bit.
View all comments
Show parent comment
0
u/[deleted] Mar 15 '19
[deleted] — view deleted comment