🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #3670

Re: Fixed point sqrt anyone?

#3670
From: eivind hagen
Date: Wed, 27 Jan 1993 12:13
16 lines
1399 bytes
Here's another way of calculating Sqrt, integer.

n1=4
n2=5
s1=n1*n1
s2=n2*n2

These 4 numbers are connected, as are all similar adjacent pairs of integers
and their squares. Rule : s2=s1+n1+n2
Use this to move up/down till you reach the desired value in s2, then
the answer is in n2 (or s1,n1 for that matter...)

I--------------------------------------I-------------------------------------I
I Eivind Hagen (eivind@samson.kih.no)  I  "I've got the POWER"               I
I Zynx of Arc Empire                   I  (ARM 3 + cx486slc / 8 MB RAM)      I
I--------------------------------------I-------------------------------------I
Technical Details
Message-ID: <1993Jan27.121349.9076@ulrik.uio.no>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sunic!ugle.unit.no!nuug!nntp.uio.no!eivind
References: <Jan20.020814.50105@yuma.ACNS.ColoState.EDU>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer,comp.graphics,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sunic!ugle.unit.no!nuug!nntp.uio.no!eivind
From: eivind@kih.no (eivind hagen)
Subject: Re: Fixed point sqrt anyone?
Message-ID: <1993Jan27.121349.9076@ulrik.uio.no>
Followup-To: comp.os.os2.programmer,comp.graphics,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer
Sender: news@ulrik.uio.no (Mr News)
Nntp-Posting-Host: samson.kih.no
Organization: Kongsberg Ingeniorhogskole
X-Newsreader: TIN [version 1.1 PL8]
References: <Jan20.020814.50105@yuma.ACNS.ColoState.EDU>
Date: Wed, 27 Jan 1993 12:13:49 GMT
Lines: 16