% p: i.11 0.5 0.333333 0.2 0.142857 0.0909091 0.0769231 0.0588235 0.0526316 0.0434783 0.0344828 0.0322581 Two is a prime, too.
Linda Q Sent from my Verizon, Samsung Galaxy smartphone -------- Original message -------- From: 'Pascal Jasmin' via Programming <programm...@jsoftware.com> Date: 8/1/19 7:30 PM (GMT-05:00) To: programm...@jsoftware.com Subject: Re: [Jprogramming] Extended precision tolerance if the original numbers have "full" precision (instead of 4 decimals) J gives the result you want x: % p: 1 + i.10 1r3 1r5 1r7 1r11 1r13 1r17 1r19 1r23 1r29 1r31 x: % +: p: 1 + i.10 1r6 1r10 1r14 1r22 1r26 1r34 1r38 1r46 1r58 1r62 On Thursday, August 1, 2019, 05:01:44 p.m. EDT, Nimp O <tr...@outlook.com> wrote: Ah, so it appears there is a very low global upper bound (2^_34) on the tolerance of all verbs that can use Fit. Perhaps this upper bound could be removed, at least for x:, since I believe the main use cases for tolerance on this verb would be bigger values, as illustrated in my earlier example. At least in this context, I can't see anything catastrophic happening by increasing this tolerance, on the contrary. But maybe this change cannot be made in such an isolated way. Thanks. ________________________________ From: Programming <programming-boun...@forums.jsoftware.com> on behalf of Raul Miller <rauldmil...@gmail.com> Sent: Thursday, August 1, 2019 11:12 AM To: Programming forum <programm...@jsoftware.com> Subject: Re: [Jprogramming] Extended precision tolerance Looks like this specifies comparison tolerance. https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcode.jsoftware.com%2Fwiki%2FEssays%2FTolerant_Comparison&data=02%7C01%7C%7C0c31d1d8917648d9640508d716d84e14%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637002990584757576&sdata=o8VPnvXKLgAZrIhoY2h2NEYykvBccpf2xnS%2Bgl9Pijo%3D&reserved=0 "Appendix C, System Conventions and Limits, says that the tolerance is less than or equal to 2^_34 . Historically, the upper bound on the tolerance was chosen so that comparisons involving 32-bit integers are exact (as if the tolerance is 0)." FYI, -- Raul On Thu, Aug 1, 2019 at 9:33 AM Nimp O <tr...@outlook.com> wrote: > > Hello everyone, > > What is the use of non-zero tolerance for the x: verb? > > A little example: > > a=:0.1667 0.8333 0.4286 0.1111 > > x:a > 1667r10000 8333r10000 2143r5000 1111r10000 > > > In Mathematica: > In[1]:= Rationalize[{0.1667, 0.8333, 0.4286, 0.1111}] > Out[1]= {1667/10000, 8333/10000, 2143/5000, 1111/10000} > > In[2]:= Rationalize[{0.1667, 0.8333, 0.4286, 0.1111}, 0.01] > Out[2]= {1/6, 5/6, 3/7, 1/9} > > Back to J: > I was expecting the that Fit could be used the same way, as in a tolerance > for the rationalization, but I get: > > x:(!.0.01) a > |domain error > | x: (!.0.01)a > > I was waiting for this expression to return my desired output: > 1r6 5r6 3r7 1r9 > > Thanks. > > > > ---------------------------------------------------------------------- > For information about J forums see > https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C0c31d1d8917648d9640508d716d84e14%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637002990584757576&sdata=4cAHz8Lm7avqiuHIIS4AHbfEWky8Cn5ywP%2BBSldg3%2BA%3D&reserved=0 ---------------------------------------------------------------------- For information about J forums see https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C0c31d1d8917648d9640508d716d84e14%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637002990584757576&sdata=4cAHz8Lm7avqiuHIIS4AHbfEWky8Cn5ywP%2BBSldg3%2BA%3D&reserved=0 ---------------------------------------------------------------------- For information about J forums see https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C0c31d1d8917648d9640508d716d84e14%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637002990584767595&sdata=G9l10Btcq9Hxjc95G9sEbTbJ8x3IBHY3eCHIZis48cA%3D&reserved=0 ---------------------------------------------------------------------- For information about J forums see https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C0c31d1d8917648d9640508d716d84e14%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637002990584767595&sdata=G9l10Btcq9Hxjc95G9sEbTbJ8x3IBHY3eCHIZis48cA%3D&reserved=0 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm