Floating point digits beyond the 17th are illusory on my 32-bit machine:
0j42 ": x:^:_1 [ 5r3
1.666666666666666740681534975010436028242111
Can use _1 x: y for x:^_1 y
0j42 ": _1 x: 5r3
1.666666666666666740681534975010436028242111
--Kip
Sent from my iPad
> On Feb 23, 2014, at 11:58 PM, Don Guinn <[email protected]> wrote:
>
> Use the inverse of x: to convert rational to real (floating point):
>
> [r=:x:^:_1 B
>
> 1.61803
>
> 3!:0 r
>
> 8
>
>
> To display the value more accurately use format (":):
>
> 0j42":B
>
> 1.618033988749894848204586834365638117720309
>
>
> On Sun, Feb 23, 2014 at 6:41 PM, Linda Alvord <[email protected]>wrote:
>
>> I just saw that there are several other ways to get the golden ration.
>> Before I look at them I don't know how to change the rational numbers A
>> and B to decimals with many digits.
>>
>> g=: 13 :'(+%)/\y$1x'
>> g
>> [: (+ %)/\ 1x $~ ]
>>
>>
>> A=:0{|. g 100
>>
>> A
>> 573147844013817084101r354224848179261915075
>>
>>
>> B=:0{|. g 200
>> B
>>
>> 453973694165307953197296969697410619233826r280571172992510140037611932413038
>> 677189525
>>
>> Linda
>>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of PMA
>> Sent: Sunday, February 23, 2014 3:48 PM
>> To: [email protected]
>> Subject: Re: [Jprogramming] A Tale Without End
>>
>> My favorite..
>>
>> -:>:%:5
>> 1.61803
>>
>>
>> Nimp O wrote:
>>> And also..
>>>
>>> (+ %:)/ 0,20$1
>>> 1.61803
>>>
>>>> Date: Sun, 23 Feb 2014 20:11:11 +0000
>>>> From: [email protected]
>>>> To: [email protected]
>>>> Subject: Re: [Jprogramming] A Tale Without End
>>>>
>>>> {.>{:p. 1 1 _1
>>>> 1.61803
>>> s.htm
>>>
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm