📄 readme
字号:
measured on a 33MHz 386 with 64k cache. The Turbo C tests were underms-dos, the next two columns are for emulators running with the djgppms-dos extender. The final column is for wm-FPU-emu in Linux 0.97,using libm4.0 (hard).function Turbo C djgpp 1.06 WM-emu387 wm-FPU-emu + 60.5 154.8 76.5 139.4 - 61.1-65.5 157.3-160.8 76.2-79.5 142.9-144.7 * 71.0 190.8 79.6 146.6 / 61.2-75.0 261.4-266.9 75.3-91.6 142.2-158.1 sin() 310.8 4692.0 319.0 398.5 cos() 284.4 4855.2 308.0 388.7 tan() 495.0 8807.1 394.9 504.7 atan() 328.9 4866.4 601.1 419.5-491.9 sqrt() 128.7 crashed 145.2 227.0 log() 413.1-419.1 5103.4-5354.21 254.7-282.2 409.4-437.1 exp() 479.1 6619.2 469.1 850.8The performance under Linux is improved by the use of look-ahead code.The following results show the improvement which is obtained underLinux due to the look-ahead code. Also given are the times for theoriginal Linux emulator with the 4.1 'soft' lib. [ Linus' note: I changed look-ahead to be the default under linux, as there was no reason not to use it after I had edited it to be disabled during tracing ] wm-FPU-emu w original w look-ahead 'soft' lib + 106.4 190.2 - 108.6-111.6 192.4-216.2 * 113.4 193.1 / 108.8-124.4 700.1-706.2 sin() 390.5 2642.0 cos() 381.5 2767.4 tan() 496.5 3153.3 atan() 367.2-435.5 2439.4-3396.8 sqrt() 195.1 4732.5 log() 358.0-387.5 3359.2-3390.3 exp() 619.3 4046.4These figures are now somewhat out-of-date. The emulator has becomeprogressively slower for most functions as more of the 80486 featureshave been implemented.----------------------- Accuracy of wm-FPU-emu -----------------------Accuracy: The following table gives the accuracy of the sqrt(), trigand log functions. Each function was tested at about 400 points. Idealresults would be 64 bits. The reduced accuracy of cos() and tan() forarguments greater than pi/4 can be thought of as being due to theprecision of the argument x; e.g. an argument of pi/2-(1e-10) which isaccurate to 64 bits can result in a relative accuracy in cos() of about64 + log2(cos(x)) = 31 bits. Results for the Turbo C emulator are givenin the last column.Function Tested x range Worst result Turbo C (relative bits)sqrt(x) 1 .. 2 64.1 63.2atan(x) 1e-10 .. 200 62.6 62.8cos(x) 0 .. pi/2-(1e-10) 63.2 (x <= pi/4) 62.4 35.2 (x = pi/2-(1e-10)) 31.9sin(x) 1e-10 .. pi/2 63.0 62.8tan(x) 1e-10 .. pi/2-(1e-10) 62.4 (x <= pi/4) 62.1 35.2 (x = pi/2-(1e-10)) 31.9exp(x) 0 .. 1 63.1 62.9log(x) 1+1e-6 .. 2 62.4 62.1As of version 1.3 of the emulator, the accuracy of the basicarithmetic has been improved (by a small fraction of a bit). Care hasbeen taken to ensure full accuracy of the rounding of the basicarithmetic functions (+,-,*,/,and fsqrt), and they all now produceresults which are exact to the 64th bit (unless there are any bugsleft). To ensure this, it was necessary to effectively get informationof up to about 128 bits precision. The emulator now passes the"paranoia" tests (compiled with gcc 2.3.3) for 'float' variables (24bit precision numbers) when precision control is set to 24, 53 or 64bits, and for 'double' variables (53 bit precision numbers) whenprecision control is set to 53 bits (a properly performing FPU cannotpass the 'paranoia' tests for 'double' variables when precisioncontrol is set to 64 bits).For version 1.5, the accuracy of fprem and fprem1 has been improved.These functions now produce exact results. The code for reducing theargument for the trig functions (fsin, fcos, fptan and fsincos) hasbeen improved and now effectively uses a value for pi which isaccurate to more than 128 bits precision. As a consquence, theaccuracy of these functions for large arguments has been dramaticallyimproved (and is now very much better than an 80486 FPU). There isalso now no degradation of accuracy for fcos and ftan for operandsclose to pi/2. Measured results are (note that the definition ofaccuracy has changed slightly from that used for the above table):Function Tested x range Worst result (absolute bits)cos(x) 0 .. 9.22e+18 62.0sin(x) 1e-16 .. 9.22e+18 62.1tan(x) 1e-16 .. 9.22e+18 61.8It is possible with some effort to find very large arguments whichgive much degraded precision. For example, the integer number 8227740058411162616.0is within about 10e-7 of a multiple of pi. To find the tan (forexample) of this number to 64 bits precision it would be necessary tohave a value of pi which had about 150 bits precision. The FPUemulator computes the result to about 42.6 bits precision (the correctresult is about -9.739715e-8). On the other hand, an 80486 FPU returns0.01059, which in relative terms is hopelessly inaccurate.For arguments close to critical angles (which occur at multiples ofpi/2) the emulator is more accurate than an 80486 FPU. For very largearguments, the emulator is far more accurate.------------------------- Contributors -------------------------------A number of people have contributed to the development of theemulator, often by just reporting bugs, sometimes with suggestedfixes, and a few kind people have provided me with access in one wayor another to an 80486 machine. Contributors include (to those peoplewho I may have forgotten, please forgive me):Linus TorvaldsTommy.Thorn@daimi.aau.dkAndrew.Tridgell@anu.edu.auNick Holloway, alfie@dcs.warwick.ac.ukHermano Moura, moura@dcs.gla.ac.ukJon Jagger, J.Jagger@scp.ac.ukLennart BenschopBrian Gallew, geek+@CMU.EDUThomas Staniszewski, ts3v+@andrew.cmu.eduMartin Howell, mph@plasma.apana.org.auM Saggaf, alsaggaf@athena.mit.eduPeter Barker, PETER@socpsy.sci.fau.edutom@vlsivie.tuwien.ac.atDan Russel, russed@rpi.eduDaniel Carosone, danielce@ee.mu.oz.aucae@jpmorgan.comHamish Coleman, t933093@minyos.xx.rmit.oz.auBruce Evans, bde@kralizec.zeta.org.auTimo Korvola, Timo.Korvola@hut.fi ...and numerous others who responded to my request for help witha real 80486.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -