John Randall wrote:

> Mathematically, n is y%^.2 rounded to the nearest integer, so
> 0.5:>|n-y%^.2 , and ^.2:|y-n*^.2 , and only a few Taylor series terms
> are needed.  For large y, you need to use a value of ^.2 to higher
> precision than 64 bits, otherwise you will get the loss of
> significance you observe.
>

Perhaps I should have proofread this: sorry.  I meant:

Mathematically, n is y%^.2 rounded to the nearest integer, so
0.5:>|n-y%^.2 , and (%^.2)>:|y-n*^.2 , and only a few Taylor series terms
are needed.  For large y, you need to use a value of ^.2 to higher
precision than 64 bits, otherwise you will get the loss of
significance you observe.

John

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to