From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Fun with Unbounded Rational Numbers Date: Sun, 9 Apr 2017 10:47:05 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 9 Apr 2017 08:44:02 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="a97849d36a3c8ea2c5f5f919cb6231fd"; logging-data="6628"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jnPHg32hkE0M6/xJO0XjizfSSSGHEyHg=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Cancel-Lock: sha1:+sMtQHR8qY4N+1rfaGKx5FeMIiQ= Xref: news.eternal-september.org comp.lang.ada:46547 Date: 2017-04-09T10:47:05+02:00 List-Id: On 04/09/2017 02:30 AM, antispam@math.uni.wroc.pl wrote: > > newton(y : Fraction(Integer), eps : Fraction(Integer)) : Fraction(Integer) == > x : Fraction(Integer) := 1 > while abs(y - x^2) >= eps repeat > x := (x + y/x)/2 > x Maybe I'm missing something, but this doesn't look like Newton's method to me. -- Jeff Carter "This trial is a travesty. It's a travesty of a mockery of a sham of a mockery of a travesty of two mockeries of a sham. ... Do you realize there's not a single homosexual on that jury?" Bananas 27