[Jprogramming] Square Roots and Extended Arithmetic

Roger Hui rogerhui.canada at gmail.com
Thu Nov 1 23:13:32 UTC 2018


See https://code.jsoftware.com/wiki/Essays/Extended_Precision_Functions, in
particular the Square Root section.
On Thu, Nov 1, 2018 at 12:13 PM Skip Cave <skip at caveconsulting.com> wrote:
> a=:1234567890101020405060708090x
>>> a=2^~a^1r2
>> 1
>> a=2^~%:a
>> 1
>> a-:2^~a^1r2
>> 1
>> a-:2^~%:a
>> 1
>>> NB. All looking good. However:
>>> x:2^~a^1r2
>> 1234567890101024064259751936
>> a
>> 1234567890101020405060708090
>>> NB. Clearly not equal.
>>> x:2^~%:a
>> 1234567890101020490846961664
>> a
>> 1234567890101020405060708090
>>> NB. Also clearly not equal, and different from the first one!
>>> What's going on!
>>> Skip
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm


More information about the Programming mailing list

AltStyle によって変換されたページ (->オリジナル) /