[Jprogramming] Am I understanding m/y ?

Louis de Forcrand olius at bluewin.ch
Mon Feb 22 23:30:01 UTC 2016


One use of gerund insertion is continued fractions: http://www.wolframalpha.com/input/?i=continued+fraction+golden+ratio <http://www.wolframalpha.com/input/?i=continued+fraction+golden+ratio>
phi = 1 + 1 % 1 + 1 % 1 + …

	+`%/ 50 # 1
1.61803

which is the golden ratio.
I believe this was in one of the labs.

Louis

> On 22 Feb 2016, at 23:37, Henry Rich <henryhrich at gmail.com> wrote:
> 
> That would be a potential improvement; but there are details - like what happens if there is an overflow during the scan.
> 
> In any case, I was looking for code that's fast right now.
> 
> Henry Rich
> 
> On 2/22/2016 5:30 PM, Raul Miller wrote:
>> The problem with the existing implementation is that there's no
>> efficient way to use it in a scan.
>> 
>> That said, Henry's point about constant time overhead might be relevant.
>> 
>> That said, I don't think the implementation would need to do the full
>> verb overhead for primitive scalar verbs (where we've already got
>> tables of their underlying mechanisms for each numeric type).
>> 
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



More information about the Programming mailing list