Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.6.2.17 $; site uokvax.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!uokvax!emjej From: emjej@uokvax.UUCP Newsgroups: net.micro.6809 Subject: Re: BASIC09 floating point faster than C Message-ID: <3500054@uokvax.UUCP> Date: Thu, 29-Nov-84 14:05:00 EST Article-I.D.: uokvax.3500054 Posted: Thu Nov 29 14:05:00 1984 Date-Received: Tue, 4-Dec-84 04:49:47 EST References: <2314@ihnss.UUCP> Lines: 29 Nf-ID: #R:ihnss:-231400:uokvax:3500054:000:1481 Nf-From: uokvax!emjej Nov 29 13:05:00 1984 /***** uokvax:net.micro.6809 / ihnss!knudsen / 9:18 pm Nov 26, 1984 */ This is so crazy that I'm almost afraid to post it. It appears that the same program runs faster in Basic09 than in Microware C (both on a Coco). However, C and Basic09 both use 32-bit floats (I declared everything float, not double in C), and I'd expect C to be at least as fast as Basic09. What UNIVAC I (c. 1950) did Microware steal their floating point operators from for C? Should they take the guys across the hall in the Basic09 dept. out for a few beers and borrow their floating +-*/ ? mike k /* ---------- */ Actually, internally BASIC09 floats are five-byte quantities, like Microshaft BASIC for the CoCo. (One byte exponent, four-byte mantissa, the moral near- equivalent of ~9-10 significant decimal digits.) However, I heartily agree with you: the Microware C floating-point stuff is REAL SLOW. This is the only point at which a 2MHz 6809 won't keep ahead of an IBM PC and only slightly behind slower compilers for 10 MHz 8086 systems. It's a shame--they really ought to borrow floating-point routines from BASIC09 (both arithmetic and math library: the BASIC09 docs say that they use CORDIC methods, by the way, for those who have been following the stuff in net.lang.c about sin & cos). BTW, a fellow (name lamentably forgotten, or I'd give credit where due) posted a math library he wrote to the OS-9 SIG on CompuServe; it should be available for the downloading. James Jones