Full Version : Approximations of Root(2)=1.414213562...
avr >>COMPUTER MATH >>Approximations of Root(2)=1.414213562...


RetroDan- 09-15-2006
The Square-Root-of-Two: Root(2)=1.414213562... seems to come up failry often in calculations.


A) Multiply by 4756, Divide by 3363 = 1.4142135

- Accurate: Error 0.000000062 (0.00000442%)



B) Multiply by 239, Divide by 169 = 1.4142012

- Error: 0.000012378 (0.00088%)
- Faster: Both calculations are single-byte (8-bit)



C) Multiply by 181, Divide by 128 = 1.4140625

- Error: 0.000151062 (0.0107%)
- Faster: Division can be accomplished by 7 right-shifts



D) Multiply by 91, Divide by 64 = 1.421875

- Error: 0.00766 (0.54%)
- Faster: Division done by 6 right-shifts



E) Multiply by 45, Divide by 32 = 1.40625

- Error: 0.008 (0.56%)
- Faster: Division done by 5 right-shifts



F) Multiply by 23, Divide by 16 = 1.4375

- Error: 0.0233 (1.647%)
- Faster: Division done by 4 right-shifts


G) Multiply by 11, Divide by 8 = 1.375

- Error: 0.0392 (2.77%)
- Fast: Division by 3 right-shifts


H) Multiply by 3, Divide by 2 = 1.5

- Error: 0.0858 (6.07%)
- Fast: Division by single right-shift


NOTE: Have a constant for which you'd like an approximation? Let me know.


Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.