Re: sqrt and Buf question

2020-05-16 Thread ToddAndMargo via perl6-users
On 2020-05-16 14:48, William Michels via perl6-users wrote: Yes, ** stands for exponentiation Thank you!

Re: sqrt and Buf question

2020-05-16 Thread William Michels via perl6-users
Hi Todd, Yes, ** stands for exponentiation. And exponentiation has higher precedence than multiplication. See below (I dropped a few zeros to help clarify): > put 2 * 10 ** 20 2 > put (2 * 10) ** 20 1048576 > put 2 * (10 ** 20) 2 > 20 **

Re: sqrt and Buf question

2020-05-16 Thread ToddAndMargo via perl6-users
On 2020-05-14 22:26, Peter Pentchev wrote: And what is `2 * 100 ** 2000 `? Is that `(2 x 100)^ 2000` ((2 times 100) to the 2000 power? Point 1: exponentiation has a higher priority than multiplication. Point 2:https://rosettacode.org/wiki/Integer_roots Any chance of you answering the questio

Re: sqrt and Buf question

2020-05-15 Thread ToddAndMargo via perl6-users
On 2020-05-15 12:09, Bruce Gray wrote: On May 14, 2020, at 4:36 PM, ToddAndMargo via perl6-users wrote: On 2020-05-14 08:13, Bruce Gray wrote: On May 14, 2020, at 7:27 AM, ToddAndMargo via perl6-users wrote: Hi All, 1) how do I get 40 or more digits out of sqrt? —snip— Use an Integer

Re: sqrt and Buf question

2020-05-15 Thread Bruce Gray
> On May 14, 2020, at 4:36 PM, ToddAndMargo via perl6-users > wrote: > > On 2020-05-14 08:13, Bruce Gray wrote: >>> On May 14, 2020, at 7:27 AM, ToddAndMargo via perl6-users >>> wrote: >>> >>> Hi All, >>> >>> 1) how do I get 40 or more digits out of sqrt? >> —snip— >> Use an Integer Root

Re: sqrt and Buf question

2020-05-14 Thread Peter Pentchev
On Thu, May 14, 2020 at 02:36:30PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-14 08:13, Bruce Gray wrote: > > > > > > > On May 14, 2020, at 7:27 AM, ToddAndMargo via perl6-users > > > wrote: > > > > > > Hi All, > > > > > > 1) how do I get 40 or more digits out of sqrt? > > > > —

Re: sqrt and Buf question

2020-05-14 Thread ToddAndMargo via perl6-users
On 2020-05-14 05:51, Tobias Boege wrote: On Thu, 14 May 2020, ToddAndMargo via perl6-users wrote: Hi All, 1) how do I get 40 or more digits out of sqrt? Meaningful digits? Not possible as sqrt uses limited precision. I think the IEEE 754 doubles that I would suspect to be used internally are

Re: sqrt and Buf question

2020-05-14 Thread ToddAndMargo via perl6-users
On 2020-05-14 08:13, Bruce Gray wrote: On May 14, 2020, at 7:27 AM, ToddAndMargo via perl6-users wrote: Hi All, 1) how do I get 40 or more digits out of sqrt? —snip— Use an Integer Root algorithm on ($number-you-want-the-root-of * 100 ** $number-of-digits-you-want), then shift the deci

Re: sqrt and Buf question

2020-05-14 Thread Bruce Gray
> On May 14, 2020, at 7:27 AM, ToddAndMargo via perl6-users > wrote: > > Hi All, > > 1) how do I get 40 or more digits out of sqrt? —snip— Use an Integer Root algorithm on ($number-you-want-the-root-of * 100 ** $number-of-digits-you-want), then shift the decimal point of the result. Exac

Re: sqrt and Buf question

2020-05-14 Thread ToddAndMargo via perl6-users
On 2020-05-14 05:51, Tobias Boege wrote: On Thu, 14 May 2020, ToddAndMargo via perl6-users wrote: Hi All, 1) how do I get 40 or more digits out of sqrt? Meaningful digits? In this instance, I do not care about meaningful. I only care about the noise. Just has to be repeatable. I may ha

Re: sqrt and Buf question

2020-05-14 Thread Tobias Boege
On Thu, 14 May 2020, ToddAndMargo via perl6-users wrote: > Hi All, > > 1) how do I get 40 or more digits out of sqrt? > Meaningful digits? Not possible as sqrt uses limited precision. I think the IEEE 754 doubles that I would suspect to be used internally are capped way below 40 significant deci

Re: sqrt

2004-04-28 Thread Dan Sugalski
At 10:29 PM -0400 4/27/04, Matt Fowles wrote: All~ Perhaps it is just the mathematician in me speaking, but I think that a sqrt op might be superfluous and could be replaced with exp as sqrt(x) == exp(x,0.5). I cannot say anything about numerical stability of precision, though, so feel free to

Re: sqrt

2004-04-28 Thread Uri Guttman
> "MF" == Matt Fowles <[EMAIL PROTECTED]> writes: MF> Perhaps it is just the mathematician in me speaking, but I think that MF> a sqrt op might be superfluous and could be replaced with exp as MF> sqrt(x) == exp(x,0.5). I cannot say anything about numerical MF> stability of precision,

Re: sqrt

2004-04-27 Thread Peter Behroozi
On Tue, 2004-04-27 at 22:29, Matt Fowles wrote: > All~ > > Perhaps it is just the mathematician in me speaking, but I think that a > sqrt op might be superfluous and could be replaced with exp as sqrt(x) > == exp(x,0.5). I cannot say anything about numerical stability of > precision, though, s

Re: sqrt

2004-04-27 Thread Matt Fowles
All~ Perhaps it is just the mathematician in me speaking, but I think that a sqrt op might be superfluous and could be replaced with exp as sqrt(x) == exp(x,0.5). I cannot say anything about numerical stability of precision, though, so feel free to shoot me down. Matt Dan Sugalski wrote: At 4:

Re: sqrt

2004-04-27 Thread Dan Sugalski
At 4:50 PM +0200 4/27/04, Stefan Lidman wrote: >Everything is right, except... you forgot either the -c or -u switch for the diff. (And no, I don't know why the default output from diffs is mostly useless. Just one of those things, I expect) ok resend with -u switch. And it's in. Thanks! --

Re: sqrt

2004-04-27 Thread Stefan Lidman
>Everything is right, except... you forgot either the -c or -u switch >for the diff. (And no, I don't know why the default output from diffs >is mostly useless. Just one of those things, I expect) ok resend with -u switch. /Stefan Index: ops/math.ops ===

Re: sqrt

2004-04-27 Thread Dan Sugalski
At 3:29 AM +0200 4/27/04, Stefan Lidman wrote: This adds a square root op and fixes a typo. It is also my first patch so I might have missed something, please tell me what I did wrong. Everything is right, except... you forgot either the -c or -u switch for the diff. (And no, I don't know why the