Never shy away from public channels. Can you at least tell me which part is insulting?
I usually do the following substitutions: ..... It's an issue of performance and choices, and it is not a problem of |. I might really want to read those wikipedia entries. Here is roughly what j is thinking: n=.14^2 5729082486784839 = 5729082486784839 + n 1 If I can't reason within my problem domain and can't foresee precision issues, I have the choice of using extended precisions and my problem is solved. ..... So I found it is not only the issue of |, and both + and = do weird things when my numbers are large enough that my computer is unable to work with them reliably. I don't really know how large my numbers would become and I have no idea whether a simple + or = or | would do with my numbers, so I suffixed all my numbers with x. Problem solved. I remove those x when I know that my numbers are within 64 bit integer/floating point numbers within my problem domain, and I can have the best performance I can have in j. > On Sep 7, 2017, at 1:25 PM, Rob B <rb75...@me.com> wrote: > > Sent to you personally. > > I find your reply insulting, I was looking to make the code more friendly for > beginners so they would not have the confusion I felt when I first came > across this. > >> On 7 Sep 2017, at 19:10, Xiao-Yong Jin <jinxiaoy...@gmail.com> wrote: >> >> It's an issue of performance and choices, and it is not a problem of |. You >> might really want to read those wikipedia entries. Here is roughly what j >> is thinking: >> >> n=.14^2 >> 5729082486784839 = 5729082486784839 + n >> 1 >> >> If you can't reason within your problem domain and can't foresee precision >> issues, you have the choice of using extended precisions and your problem is >> solved. >> >>> On Sep 7, 2017, at 1:00 PM, Rob B <rb75...@me.com> wrote: >>> >>> Don, >>> >>> It's not just that giving an answer of zero instead of 147 is 'imprecise'. >>> It is horribly wrong, as it implies divisibility where none exists. >>> >>> Regards, Rob. >>> >>>> On 7 Sep 2017, at 18:40, Don Guinn <dongu...@gmail.com> wrote: >>>> >>>> Never assume that floating point numbers are exact. >>>> >>>> On Sep 7, 2017 10:50 AM, "'Bo Jacoby' via Programming" < >>>> programm...@jsoftware.com> wrote: >>>> >>>>> Elementary linear algebra breaks down for so-called ill-conditioned >>>>> problems needing more precision than is provided by standard floating >>>>> point >>>>> numbers. Condition number >>>>> >>>>> | >>>>> | | >>>>> Condition number >>>>> The condition number is an application of the derivative, and is formally >>>>> defined as the value of the asymptotic... | | >>>>> >>>>> | >>>>> >>>>> >>>>> >>>>> >>>>> Den 18:35 torsdag den 7. september 2017 skrev Marshall Lochbaum < >>>>> mwlochb...@gmail.com>: >>>>> >>>>> >>>>> Primality testing is a much less common use case than you think, and in >>>>> fact I'm not aware of any use for extended-precision integers outside of >>>>> recreational mathematics (I guess you can count cryptography, but anyone >>>>> using extended-precision integers instead of large fixed-width integers >>>>> for that falls squarely on the recreational side as well). It would be a >>>>> poor choice to severely degrade J's performance to help out people doing >>>>> Project Euler problems. >>>>> >>>>> Marshall >>>>> >>>>>> On Thu, Sep 07, 2017 at 12:54:58PM +0100, Rob B wrote: >>>>>> Thanks Raul, I am familiar with these ideas, and using x: is almost a >>>>> reflex now. >>>>>> >>>>>> I feel that to protect the new J user, mod should convert to extended >>>>> precision automatically or issue an warning message. Giving tha answer >>>>> zero >>>>> is very misleading. >>>>>> >>>>>> PS I am not so concerned with small numbers and measurability as with >>>>> large numbers and primality. Heisenberg's Uncertainty Principle is not >>>>> usually an issue for me :) >>>>>> >>>>>> Ragards, Rob. >>>>>> >>>>>>> On 7 Sep 2017, at 11:32, Raul Miller <rauldmil...@gmail.com> wrote: >>>>>>> >>>>>>> The answer, oddly enough, is: yes. >>>>>>> >>>>>>> The philosophical arguments are buried here: >>>>>>> >>>>>>> https://en.wikipedia.org/wiki/Accuracy_and_precision >>>>>>> >>>>>>> The technical issues are buried here: >>>>>>> >>>>>>> https://en.wikipedia.org/wiki/IEEE_754 >>>>>>> >>>>>>> That said, if you have reason to be using numbers which are precise >>>>>>> beyond anyone's ability to measure (and keep in mind Heisenberg >>>>>>> Uncertainty as one of the practical limits on measurability), you >>>>>>> should probably be using extended precision numbers (123x instead of >>>>>>> 123). This will give you exact results in exchange for a performance >>>>>>> penalty. >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> -- >>>>>>> Raul >>>>>>> >>>>>>> >>>>>>>> On Thu, Sep 7, 2017 at 4:42 AM, Rob B <rb75...@me.com> wrote: >>>>>>>> On reflection my real question is; should mod suddenly and without >>>>> warning give the wrong answer when a number gets suffiently large? I have >>>>> been caught by this many times. The incorrect answer zero is problematic >>>>> as >>>>> it suggests divisibility. >>>>>>>> >>>>>>>> Apologies if this has all been discussed before. >>>>>>>> >>>>>>>> Regards, Rob Burns. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>> On 6 Sep 2017, at 09:11, Rob B <rb75...@icloud.com> wrote: >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> >>>>>>>>> I now see it's reasonable for ^ to convert to flost and *: to remain >>>>> exact. >>>>>>>>> >>>>>>>>> The other discrepancy is probably due to my old version, iPad 701. >>>>>>>>> >>>>>>>>> Regards, Rob Burns. >>>>>>>>> >>>>>>>>>> On 5 Sep 2017, at 17:48, HenryRich <henryhr...@gmail.com> wrote: >>>>>>>>>> >>>>>>>>>> datatype 47^2 >>>>>>>>>> >>>>>>>>>> floating >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> So >>>>>>>>>> >>>>>>>>>> (n^2) | 5729082486784839 >>>>>>>>>> >>>>>>>>>> is promoted to float, and loses precision. Same when the big >>>>> number is extended - it's converted to float. >>>>>>>>>> >>>>>>>>>> For >>>>>>>>>> >>>>>>>>>> (x: n^2) | 5729082486784839 >>>>>>>>>> >>>>>>>>>> I get 147 as the result. >>>>>>>>>> >>>>>>>>>> Henry Rich >>>>>>>>>> >>>>>>>>>>> On 9/5/2017 12:41 PM, Rob B wrote: >>>>>>>>>>> Could someone explain this please? >>>>>>>>>>> >>>>>>>>>>> n=.14 >>>>>>>>>>> n >>>>>>>>>>> 14 >>>>>>>>>>> (*: n) | 5729082486784839 >>>>>>>>>>> 147 >>>>>>>>>>> 196 | 5729082486784839 >>>>>>>>>>> 147 >>>>>>>>>>> (n^2) | 5729082486784839 >>>>>>>>>>> 0 >>>>>>>>>>> (n^2) | 5729082486784839x >>>>>>>>>>> 0 >>>>>>>>>>> (x: n^2) | 5729082486784839 >>>>>>>>>>> 0 >>>>>>>>>>> (x: n^2) | 5729082486784839x >>>>>>>>>>> 147 >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Regards, Rob Burns >>>>>>>>>>> ------------------------------------------------------------ >>>>> ---------- >>>>>>>>>>> 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 >>>>> ---------------------------------------------------------------------- >>>>> 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 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm