You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz Wo Nicholas Sze (JIRA)" <ji...@apache.org> on 2017/11/15 02:58:00 UTC

[jira] [Updated] (RATIS-142) Test ArithmeticStateMachine with the Gauss–Legendre algorithm

     [ https://issues.apache.org/jira/browse/RATIS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo Nicholas Sze updated RATIS-142:
--------------------------------------
    Attachment: r142_20171114.patch

r142_20171114.patch: 1st patch.

It turns out that it converges at the third iteration with pi_3 = 3.141592653589794 with 14 decimal places.  The 15th decimal place has round off error since the computation is over 64-bit doubles.

> Test ArithmeticStateMachine with the Gauss–Legendre algorithm
> -------------------------------------------------------------
>
>                 Key: RATIS-142
>                 URL: https://issues.apache.org/jira/browse/RATIS-142
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>            Priority: Minor
>         Attachments: r142_20171114.patch
>
>
> The Gauss–Legendre algorithm, a.k.a. the arithmetic–geometric mean method, is a fast algorithm to compute pi; see https://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_algorithm
> We use it to test the ArithmeticStateMachine example.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)