Re: [Jprogramming] comparison

2022-05-17 Thread Raul Miller
On Tue, May 17, 2022 at 12:23 PM 'Viktor Grigorov' via Programming wrote: > I get domain errors for most of the values above 1e_11 Oh... I hadn't actually tried it. (Oops.) I guess this is because of the non-obvious consequences which typically result from using larger tolerance values. That s

Re: [Jprogramming] comparison

2022-05-17 Thread 'Viktor Grigorov' via Programming
I get domain errors for most of the values above 1e_11 May 17, 2022, 18:59 by rauldmil...@gmail.com: > On Tue, May 17, 2022 at 10:22 AM 'Viktor Grigorov' via Programming > wrote: > >> 9!:19 0.1 >> 9!:19 1.8e_5 >> ({.e.}.)"1 w >> 0 0 0 0 0 >> >> Lowering the comparison tolera

Re: [Jprogramming] comparison

2022-05-17 Thread Raul Miller
On Tue, May 17, 2022 at 10:22 AM 'Viktor Grigorov' via Programming wrote: >9!:19 0.1 > 9!:19 1.8e_5 >({.e.}.)"1 w > 0 0 0 0 0 > > Lowering the comparison tolerance further doesn't help. What am I doing > wrong? This can't be a 904 issue, since it happens on the 9.03.08

Re: [Jprogramming] comparison

2022-05-17 Thread 'Viktor Grigorov' via Programming
Then, I guess, this is a suboptimal way of solving the problem. Keeping track of the digits in a seperate variable in a recursive tacit function seems like a pain compared to being removing limitations on comparisons. 4--5 decimal places is more than enough for this case. May 17, 2022, 17:54 b

Re: [Jprogramming] comparison

2022-05-17 Thread Hauke Rehr
you can’t go much higher than that so if anything I would have worked my way /down/ from there for an analytical perspective correct the mistake in my first answer replacing max with min and you may start upwards from ~8.23e_13 Am 17.05.22 um 16:48 schrieb 'Viktor Grigorov' via Programming: So,

Re: [Jprogramming] comparison

2022-05-17 Thread 'Viktor Grigorov' via Programming
So, it's more a problem of digits being lost somewhere rather and not using a suitable compaison tolerance? Did you have to sequentially test all possibilities from the default upwards, or did you analytically come to 1e-11 somehow? May 17, 2022, 17:44 by hauke.r...@uni-jena.de: > but with > (

Re: [Jprogramming] comparison

2022-05-17 Thread 'Viktor Grigorov' via Programming
Here's my solution, working with remainders only, with the recursion happening only on members past the first (which would correspond to the first digit in the brackets in the notation used in the problem),  ({{($:`(<:@#))@.({.e.}.)y=.((1&|@%@{.),])y}}@(1&|)@:%:) Given I'm not using extended pre

Re: [Jprogramming] comparison

2022-05-17 Thread Hauke Rehr
but with (9!:19) 1e_11 I get ({.e.}.)"1 w 0 0 0 1 1 Am 17.05.22 um 16:40 schrieb Hauke Rehr: oops, ignore that one – I see my mistake now Am 17.05.22 um 16:37 schrieb Hauke Rehr: I didn’t revisit pe80 (its been quite some time I last looked at pe) but I get <./ ({.>./@:|@:-}.)"1 w 0.539284 s

Re: [Jprogramming] comparison

2022-05-17 Thread Hauke Rehr
oops, ignore that one – I see my mistake now Am 17.05.22 um 16:37 schrieb Hauke Rehr: I didn’t revisit pe80 (its been quite some time I last looked at pe) but I get <./ ({.>./@:|@:-}.)"1 w 0.539284 so you would need a tolerance greater than that if you want to get at least one 1 with a sane va

Re: [Jprogramming] comparison

2022-05-17 Thread Hauke Rehr
I didn’t revisit pe80 (its been quite some time I last looked at pe) but I get <./ ({.>./@:|@:-}.)"1 w 0.539284 so you would need a tolerance greater than that if you want to get at least one 1 with a sane value for tolerance, a 1 is not to be expected so what do you want to achieve, what do you

[Jprogramming] comparison

2022-05-17 Thread 'Viktor Grigorov' via Programming
Hey, I'm working on project euler 80, and I'm getting stack errors. Tracing the values, step by step, everything is in order, other than the comparison. I have the following:    ]w=:{{  ((1&|@%@{.),])y }}^:(>:i.5) @(1&|)@%: 23 0.256547 0.795832    0    0    0    0 0.897916 0.256