Re: [Jprogramming] Chudnovsky algo for π (Pi) using extended arithmetic

2020-12-23 Thread Devon McCormick
I knew I should have noted it when I saw it. I think it was a response on a blog. I will see if I can dig it up. It was a few months ago. On Wed, Dec 23, 2020 at 5:03 AM R.E. Boss wrote: > " I found it discouraging to read a recent missive from Niklaus Wirth > where he takes a jab at this use

Re: [Jprogramming] Random numbers not as expected

2020-12-23 Thread emacstheviking
Yes, Bjorn! Back in the day, when I work on a Vax 11/780 the walk to the printer room and back usually solved the issue. These days it is called Yoda programming I think but I know it as 'Cardboard Programmer' syndrome, when talking to a cardboard cut-out quite often suffices. On Wed, 23 Dec 202

Re: [Jprogramming] Random numbers not as expected

2020-12-23 Thread Björn Helgason
In general trying to explain something you are trying to solve to someone often makes you see the solution even if that somone does not understand what you are talking about. Þann mið., 23. des. 2020, 15:23 emacstheviking skrifaði : > Henry, > > Yes I managed to figure it out myself in between em

Re: [Jprogramming] Random numbers not as expected

2020-12-23 Thread emacstheviking
Henry, Yes I managed to figure it out myself in between emails! Funny how sending an email somehow brings things to light... but about 2 femtoseconds after pressing Send. Thank you very much. J continues to both delight me and mentally destroy me . On Wed, 23 Dec 2020 at 15:02, Henry Rich w

Re: [Jprogramming] Random numbers not as expected

2020-12-23 Thread Henry Rich
Order of evaluation is right to left.  These are all monads. ?2, ?100, ?100 ?2, ? 100 , rand0 If rand0 is 0 the next ? will return a float. Henry Rich On 12/23/2020 9:39 AM, emacstheviking wrote: Henry, I am not exactly sure what you mean but after posting I spotted that I was assigning typ

Re: [Jprogramming] Random numbers not as expected

2020-12-23 Thread emacstheviking
Henry, I am not exactly sure what you mean but after posting I spotted that I was assigning type to a random value then using that as the argument to roll, I fixed that. If you start a jconsole session and type ?2, ?100, ?100 sooner or later you get a float... placing parens. around it (?2), (?

Re: [Jprogramming] Random numbers not as expected

2020-12-23 Thread Henry Rich
Are you SURE that value of stargen matches the printed results? Henry Rich On 12/23/2020 9:14 AM, emacstheviking wrote: I am confused as to why trying to return a list of random numbers produces floating point values now and then, seemingly random! :D Passing >0 is, as I understand it, a half-o

[Jprogramming] Random numbers not as expected

2020-12-23 Thread emacstheviking
I am confused as to why trying to return a list of random numbers produces floating point values now and then, seemingly random! :D Passing >0 is, as I understand it, a half-open interval, as an integer so why the floats? stargen=: 3 : 0 'maxx maxy'=.y smoutput 'maxx:',(":maxx),' maxy:',(":maxy) t

Re: [Jprogramming] Chudnovsky algo for π (Pi) using extended arithmetic

2020-12-23 Thread R.E. Boss
" I found it discouraging to read a recent missive from Niklaus Wirth where he takes a jab at this useful simplification as an example of an unwarranted complication. It's sad that an eminent luminary like this has failed to grasp, after all these years, how useful this convention is." What w