News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Multiplier table

Started by jj2007, July 09, 2009, 10:50:41 AM

Previous topic - Next topic

dedndave

i googled "precise pi"
found this interesting goody on codeproject - Pi = 4 * Atn(1)
anyways, i found several links by googling "precise constant tables" or "precise constant table pi"

this is the wiki page - the reference material at the bottom has lots of nice links...
http://en.wikipedia.org/wiki/Mathematical_constant

http://mathworld.wolfram.com/topics/Constants.html

as you said - context - in most applications, intermediate values eventually get mulitplied or divided
in such cases, the geometrically closest value is the one to have
of course, when you have 64 bits of precision to begin with, +/-1 lsb is kind of splitting hairs
but, i was trying to approach it from a theoretical viewpoint
i can, however, see scientific applications where it might make a difference
these are the applications where extended reals are most valuable
i suppose, by use of a bit of trickery, extended-extended reals are possible
i.e. using 2 80-bit extended real values to perform the equivalent of 128-bit precision math (probably 127 bit equivalent at best)
in these cases, the correct result is a bit more important
of course, they can make any precision system they want, outside the intel 86/87 framework
for my own applications, i have many times performed calculations using high-precision,
then used single-precision final results
in electronics, very few instruments are capable of displaying values beyond 4 or 5 digits
frequency counters are one exception - i have used counters with 12 or 13 digits - and they were pretty damn close to accurate, too
(time and frequency are two measurements on which we spend much toil - lol)
components with electrical tolerences of +/- 0.1% are considered to be very good (resistors, etc)
so, to calculate the value of a resistor with 64 bit precision is a waste of time - lol
if i cut a board to within +/- 1/32", i am doing pretty well - it will likely swell and shrink with temperature and humidity more than that
with dial calipers, i can measure a small item to about .00025" accuracy
electron beam microscopes can get down to very tiny resolutions, i dunno anyone who has one in their pocket
for many scientific needs, we rely on the National Institute of Standards and Technology for accurate measurements...
http://physics.nist.gov/cuu/

dedndave

here you go, Jochen - an updated version of what i was using - lol - very handy
Numerical Cumputation Guide
http://docs.sun.com/app/docs/doc/819-3693

direct link
http://dlc.sun.com/pdf/819-3693/819-3693.pdf

Astro

Can I ask what the aim of these tables are? Apologies if it is obvious.

dedndave

Jochen (jj2007) is writing a floating point library
he wants the table for float to string conversion
this particular table is for extended reals (80-bit)
the table may be defined as data, but it takes up 3,010 bytes
he was looking for a simple way to generate the table during library initialization and make the library a little smaller
i got the code+data down to 196 bytes - he is at 188 - lol
but, the last change i made makes the routine take twice as long
i am going to try a different approach

jj2007

Quote from: dedndave on July 16, 2009, 11:47:09 PM
he wants the table for float to string conversion
this particular table is for extended reals (80-bit)

Test it

dedndave

Jochen, I started a new thread with my version of the table generator.
I wanted to use it to try and resolve some timing issues....

http://www.masm32.com/board/index.php?topic=11908.msg90299#msg90299