Xref: utzoo comp.sys.m68k:738 comp.arch:3359 Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!pyramid!prls!mips!earl From: earl@mips.COM (Earl Killian) Newsgroups: comp.sys.m68k,comp.arch Subject: Re: Motorola MC68881/68882 Manual published by Prentice-Hall Message-ID: <1519@gumby.mips.COM> Date: 8 Feb 88 07:22:11 GMT References: <41174@sun.uucp> Lines: 42 Keywords: CISC RISC In article <41174@sun.uucp> dgh%dgh@Sun.COM (David Hough) writes: From a practical point of view, most chip vendors probably would not be smart enough to give away the software elementary transcendental function implementations for their chips. They'd try to make money by selling the code which hardly anybody would buy (why not just take the stuff that comes "free" with System V or 4.2?) and the result would be that their customers, the system integrators, would produce systems with inaccurate transcendental functions that aren't much faster than the 68881's. Why not take the stuff that comes "free" with 4.3 instead of ancient 4.2? The accuracy is quite good. Consider Zliu's test suite on 4.3bsd libm and the 68881: NME = Negative Maximum Error observed in ULPs PME = Positive Maximum Error observed in ULPs NMC = Non-monotonicity count. [ From , to ) N.M.E. P.M.E. NMC 4.3bsd libm: SIN(X) ALL [ +0.0000000e+00, +1.5707960e+00) -0.6730 +1.0640 0 EXP(X) ALL [ -1.0371094e+00, +1.0087891e+00) -0.7630 +0.7720 0 EXPM1(X) ALL [ -1.0371094e+00, +1.0087891e+00) -0.8070 +0.8630 0 LOG1P(X) ALL [ -2.9289320e-01, +4.1421360e-01) -0.8430 +0.8110 0 ATAN(X) ALL [ -6.5536000e+04, +6.5536000e+04) -1.0610 +1.0680 0 LOG(X) ALL [ +7.0710680e-01, +1.2851563e+00) -0.8100 +0.8030 0 68881: SIN(X) ALL [ +0.0000000e+00, +1.5707960e+00) -0.5500 +0.5540 0 EXP(X) ALL [ -1.0371094e+00, +1.0087891e+00) -0.5100 +0.5110 0 EXPM1(X) ALL [ -1.0371094e+00, +1.0087891e+00) -0.5560 +0.5550 0 LOG1P(X) ALL [ -2.9289320e-01, +4.1421360e-01) -0.5930 +0.5560 0 ATAN(X) ALL [ -6.5536000e+04, +6.5536000e+04) -0.5450 +0.5460 0 LOG(X) ALL [ +7.0710680e-01, +1.4142136e+00) -0.5930 +0.5610 0 What's more, because the 68881 is so slow, I'd guess that the 4.3 libm is likely to be faster, given a decent implementation of add, multiply, and divide.