🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #6830

Re: GNU C Floating Point Math

#6830
From: Piet van Oostrum
Date: Mon, 11 Dec 1989 12:39
42 lines
1723 bytes
In article <4470.257da18c@uwovax.uwo.ca>, 7103_2622@uwovax (Eric Smith) writes:
 `
 `One other note: the library as distributed has a serious bug in the compare
 `routine for floats. That should be fixed soon; a temporary workaround is
 `to use doubles instead of floats. This may have been causing your problems.
 `--
I published a patch for this problem a month or so ago.

Here is the new source for ___cmpsf2:


.text
	.even
.globl ___cmpsf2
___cmpsf2:
	movel	sp@(4),d0	| get a
	movel	sp@(8),d1	| get b

	bpl	cmpsf2_p
	tstl	d0
	bpl	cmpsf2_p
	cmpl	d1,d0
	bgt	cmpsf2_m
	blt	cmpsf2_1
cmpsf2_z:
	clrl	d0
	rts
cmpsf2_p:
	cmpl	d1,d0
	bgt	cmpsf2_1
	beq	cmpsf2_z
cmpsf2_m:
	movel	#-1,d0
	rts
cmpsf2_1:
	movel	#1,d0
	rts			| sigh
-- 
Piet* van Oostrum, Dept of Computer Science, Utrecht University,
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31-30-531806   Uucp:   uunet!mcsun!hp4nl!ruuinf!piet
Telefax:   +31-30-513791   Internet:  piet@cs.ruu.nl   (*`Pete')
Technical Details
Message-ID: <2150@ruuinf.cs.ruu.nl>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!eru!luth!sunic!mcsun!hp4nl!ruuinf!cs.ruu.nl
References: <3497@jhunix.HCF.JHU.EDU> <1989Dec4.210245.2798@usenet.ins.cwru.edu> <3526@jhunix.HCF.JHU.EDU> <4470.257da18c@uwovax.uwo.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!eru!luth!sunic!mcsun!hp4nl!ruuinf!cs.ruu.nl
From: piet@cs.ruu.nl (Piet van Oostrum)
Newsgroups: comp.sys.atari.st
Subject: Re: GNU C Floating Point Math
Message-ID: <2150@ruuinf.cs.ruu.nl>
Date: 11 Dec 89 12:39:18 GMT
References: <3497@jhunix.HCF.JHU.EDU> <1989Dec4.210245.2798@usenet.ins.cwru.edu> <3526@jhunix.HCF.JHU.EDU> <4470.257da18c@uwovax.uwo.ca>
Sender: news@ruuinf.cs.ruu.nl
Reply-To: piet@cs.ruu.nl (Piet van Oostrum)
Organization: Dept of Computer Science, Utrecht University, The Netherlands
Lines: 42
In-reply-to: 7103_2622@uwovax.uwo.ca (Eric Smith)