Bill Allombert on Mon, 11 Sep 2023 15:59:18 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Power (^) function speed depending on argument types
|
- To: pari-users <pari-users@pari.math.u-bordeaux.fr>
- Subject: Re: Power (^) function speed depending on argument types
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Mon, 11 Sep 2023 15:54:29 +0200
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1694440461; c=relaxed/relaxed; bh=KNHxosH26JVrhtuxUr2ZcnNH0UI8cm8fJ3r4OrkGkzw=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=NX1eG7GUWOlYhHtYXK+kEQhhHfB+4Rpmmdp4AnU0QhmmmfPcIj/IFCikW9FQdJT9G2i8vSJNjwv6ft3tX/TkEMAM+/PmpqaSeT0/Im8Nw414RlrTKkFY7BRu0d33FFKoemJNJg3jonbmEoSAyEoHBf+mroj4qpft+0EX3goUR0dpazgWC6ysvQkWid6fd+BhREKE28AKYSbETpofY02tUKy2rgAIgDJi+qMY/t+QauO7Mz/ee3ZeCN5fui+fQ1jOg85nYkkhtTOlobZTb3vq6BisAnUF4nv4YpAqvOhwJYfIxRVLEUax/D7AgBORZ43yL7UMDxVS5B7uhjiGnOASExG63ZsAbTLNYvwsg0BvypCGGbVqjOryemEH5e0XAKV0YQYLv2G4J75sgArRzWN82z7qd8ujcvZxEmppZViM1KdwKZi4SLpPHs4u2qehZklY40igkrmE6TRBUrRhIgvaCvPXYJ081lQ78xfzNfikJNlZ97wIYXHEF8mCJvaPpo4nIu+DP6xbYLEyM6Bkavh0IbLShV53jXWNDAmOBODzsH8f/NcH8LasM3t4sR3KDAEK1zJO9YsR8rIZOT80XwXen+v1ljewabL2lE1SphYuYctprhgd7acNqx9CGSZI0uWFbNnBisTw+H+rvgZbDSAT1NrFUdMG4/PrzTzeNX33Sl0=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1694440461; cv=none; b=cMihntiEBvV8G/Gq1GSPZ3h8iXA+P8ENzclsvL0xD4DvvjWujiNXSiD3vm4qkbdjRmDL+UvT9SCg1wo+1kuWB1I5dMc4l4f9YVRi8YOocVdZFhzsDweVkwR9npDlHqWTutShg+IMJZu7oQkFHmpIvPcHuu/HsEapNJH/AMeZKzSV7W7Kj/G/ZEvzhfAvWXV8fJDZwaNvIjvp917eDp2L0nQGnDFqv47jwc3LWegOkmL35mGMCt08GO0S0N2o5sWYp3kAexCUxrz1jQs4cjHisjRYgH8KVaDuQoSYqAOr9cfvp06UTPfCBmps8Yc7hXvi+qR+3fG8Tz+pj0RIQ3iGgNXmMntTmZCgpa0NFdYXZcG9VRbbyna5AzXDdiVfeknkvWLLM5vx6RyoCdS4j+DM+gVLUw8g+OSwj8xpA/JMpOr2x5TJIJCoDS0JbCb8fhRgDiL62FaqVxLsMKZoUcMa32FpD9foELB+qWB5vC7L8sysCh9F7MW+oSHgOYsDy7sfYVS2/lncbfOeDBMgUS+1dIjOhdB9QZxt7V8MtYaucqmoofQDwbT/6hwiwsil1smrLKbrTRRIziT8Hr0uolNg7wuw9VrErD7vlb6KFdNfq3dJ6nsVbKK5qZb7bpda73WhAeXm6UQfuEryQNRcma+JGriofNj2DE3/Q5YB7EXhtZI=
- Authentication-results: smail; dmarc=none header.from=math.u-bordeaux.fr
- Authentication-results: smail; arc=none
- Delivery-date: Mon, 11 Sep 2023 15:59:19 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1694440461; bh=KNHxosH26JVrhtuxUr2ZcnNH0UI8cm8fJ3r4OrkGkzw=; h=Date:From:To:Subject:References:In-Reply-To:From; b=SkHBfC+9ZgKiRua3eqlHP7363i6vgDcsMlFreyb4EVe/ZPsAakjr7kaqlKqd+sFKw 1ELdudjXxNI63sId/QuRDU9jdZouLSMI08+Zj48uz3lDokKS5XhrExDYUTiIoRJY8k c7YcekQptvjX2gFLI8Ph5az9djLgWN9yCNkcsWcRhOWZ/we386nrpRsFfYEUlEJ+vP cXaU7I9TTzsdxTE/p6RKZH9TbFoz9GUDXan18KFFwSRW28ohy7Yfl+Vm475Bv9hede DFLV+QP/rHWz44ikDuPT9f+XSRX6WdjtU6yDcHdQOCV/Cxp7R4pA2JIHPB/eqlrNOA WtE78A69lXQKHXj3ZyR4MWqmxzbOlhhNud5MuufPUZ5h2OQ1um8XJEP7UlOrgtoVCo pwVQ5QPalNrBTo3zMWfL5I8441a38zbfSZzAR3ICtJpCrLIUB8z6aIkC/nt7XO3+GU WvWQWiVqo1u9SGgWEL+HedvtJM3BP8W3QGuYUBreHJ+L23fRT+cLq8fxYAoEQQWX0t UXvPhSHmS4NETr2Ts6qk8c4Hwq0PYiKE6Wa7oT7kJVNDyjnleYYuCdoAqnCZpQVMXd ExVdmTonPUsvpkJ1vY8FsSqFcE7d6nn/DJlDYg0oJFjPwSCYXp6rDQ9ZBnM0/wNaPA BKkMhj1NY2+qO++qvr4RTEDo=
- In-reply-to: <791780326.9560481.1694439227024.JavaMail.zimbra@unicaen.fr>
- Mail-followup-to: pari-users <pari-users@pari.math.u-bordeaux.fr>
- References: <CAEn4z=7cVuuh-mxX9juiexKpty=9_-prUnF9-q2NYO5yxdbY7A@mail.gmail.com> <ZP4u14Spwnw6uhu0@seventeen> <2093030652.9384973.1694430327575.JavaMail.zimbra@unicaen.fr> <ZP8AWvLFBGev906a@math.u-bordeaux.fr> <791780326.9560481.1694439227024.JavaMail.zimbra@unicaen.fr>
On Mon, Sep 11, 2023 at 03:33:47PM +0200, Denis Simon wrote:
> Hi Karim and Bill,
>
> An increase of 64 bits ???
> I find it a little optimistic.
> I would understand 1 or 2, or up to 14 when I compute 20000 + s
> (because log_2(i) ~= 14 and log_2(s) ~= 0), but not 64.
Alas, PARI t_REAL precision is always a multiple of 64 bits.
Whether this is pessimistic or optimistic is a matter of perspective:
Compare this:
? s=0.;n=20;t=100.;for(i=1,n,s=(s+t)^(1/5));forstep(i=n,1,-1,s=s^5-t);s
%38 = -3.3995948126355403614265653237903756818E64
? s=0.;n=20;t=100;for(i=1,n,s=(s+t)^(1/5));forstep(i=n,1,-1,s=s^5-t);s
%39 = -4.3414201952566371428595921256072201009E-56
%38 is completly wrong while %39 is quite accurate.
Cheers,
Bill