summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/softfloat/fpu_constant.h
blob: fdd9719eb997321095bdbd0f1351c285b02d365a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*============================================================================
This source file is an extension to the SoftFloat IEC/IEEE Floating-point
Arithmetic Package, Release 2b, written for Bochs (x86 achitecture simulator)
floating point emulation.

THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort has
been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.

Derivative works are acceptable, even for commercial purposes, so long as
(1) the source code for the derivative work includes prominent notice that
the work is derivative, and (2) the source code includes prominent notice with
these four paragraphs for those parts of this code that are retained.
=============================================================================*/

#ifndef _FPU_CONSTANTS_H_
#define _FPU_CONSTANTS_H_

// Pentium CPU uses only 68-bit precision M_PI approximation
#define BETTER_THAN_PENTIUM

/*============================================================================
 * Written for Bochs (x86 achitecture simulator) by
 *            Stanislav Shwartsman [sshwarts at sourceforge net]
 * ==========================================================================*/

//////////////////////////////
// PI, PI/2, PI/4 constants
//////////////////////////////

#define FLOATX80_PI_EXP  (0x4000)

// 128-bit PI fraction
#ifdef BETTER_THAN_PENTIUM
#define FLOAT_PI_HI (0xc90fdaa22168c234U)
#define FLOAT_PI_LO (0xc4c6628b80dc1cd1U)
#else
#define FLOAT_PI_HI (0xc90fdaa22168c234U)
#define FLOAT_PI_LO (0xC000000000000000U)
#endif

#define FLOATX80_PI2_EXP  (0x3FFF)
#define FLOATX80_PI4_EXP  (0x3FFE)

//////////////////////////////
// 3PI/4 constant
//////////////////////////////

#define FLOATX80_3PI4_EXP (0x4000)

// 128-bit 3PI/4 fraction
#ifdef BETTER_THAN_PENTIUM
#define FLOAT_3PI4_HI (0x96cbe3f9990e91a7U)
#define FLOAT_3PI4_LO (0x9394c9e8a0a5159cU)
#else
#define FLOAT_3PI4_HI (0x96cbe3f9990e91a7U)
#define FLOAT_3PI4_LO (0x9000000000000000U)
#endif

//////////////////////////////
// 1/LN2 constant
//////////////////////////////

#define FLOAT_LN2INV_EXP  (0x3FFF)

// 128-bit 1/LN2 fraction
#ifdef BETTER_THAN_PENTIUM
#define FLOAT_LN2INV_HI (0xb8aa3b295c17f0bbU)
#define FLOAT_LN2INV_LO (0xbe87fed0691d3e89U)
#else
#define FLOAT_LN2INV_HI (0xb8aa3b295c17f0bbU)
#define FLOAT_LN2INV_LO (0xC000000000000000U)
#endif

#endif
00:24:03 +0100'>4 years qt6_position-fixchore: identifier changed pattern ... angelosa4 months rendlay_vid-render: Added optional per-frame update support to layout elements. [Ryan Ho... mooglyguy5 years saturn_cdblockAttempting to change transfer active mechanism, doesn't change anything, to b... angelosa10 years saturn_vdp_splitsegasaturn_vdp2.cpp: add m_gfxdecode device, fix startup crash. Add notes rev... angelosa3 years save-experimentsBetter handling of null/missing items. More consistent error handling. Reduce... Aaron Giles4 years save_structsUpdate voodoo code to leverage new save_registrar instead of its own temporar... Aaron Giles4 years shangha3_dropshangha3_v.cpp: proposed fix for shangha3 drawing phantom drop shadows for pl... angelosa3 years taitoair_vcotaito/tc0080vco.cpp: describe fix angelosa2 years taitowlf_zoomtaito/taitowlf.cpp: preliminary Zoom hookup angelosa23 months time-experimentsRemaining fixes Aaron Giles4 years time-experiments2Stop memsetting structures. Aaron Giles4 years vamphalf_misncrftvamphalf.cpp: move wyvernwg to own state machine, add some basic protection t... angelosa3 years voodoo_directx11Fix some vegas games not booting Ted Green5 years x86_std-exceptionscpu/i386: saner fatal error handling angelosa13 months xbox_swlisthash/xbox_hdd.xml: QA and srcclean angelosa10 months xtalfull xtal conversion Olivier Galibert47 hours ymfm-delayClean up delay implementation a bit. Move delay setting to immediately after ... Aaron Giles4 years  TagDownloadAuthorAge mame0277commit 84cb44566c... Vas Crabb3 days mame0276commit 758c8a169a... Vas Crabb5 weeks mame0275commit 455ffbbd7e... Vas Crabb2 months mame0274commit cd82a83c3d... Vas Crabb3 months mame0273commit e11cae0a15... Vas Crabb4 months mame0272commit 5d8e4cf07e... Vas Crabb5 months mame0271commit 4da96a0c4f... Vas Crabb6 months mame0270commit ef032a31e5... Vas Crabb7 months mame0269commit 6d1970f5f1... Vas Crabb8 months mame0268commit acea8712d6... Vas Crabb9 months mame0267commit 663abae071... Vas Crabb10 months mame0266commit cd7817b220... Vas Crabb11 months mame0265commit f8af5cc2cf... Vas Crabb12 months mame0264commit 5b670ad51f... Vas Crabb13 months mame0263commit 93d8318325... Vas Crabb14 months mame0262commit d48a61f921... Vas Crabb15 months mame0261commit ca50094e8d... Vas Crabb17 months mame0260commit 0a7f1fe9cf... Vas Crabb18 months mame0259commit 4ff20056c3... Vas Crabb19 months mame0258commit 2e0aa82350... Vas Crabb20 months mame0257commit f811a66c53... Vas Crabb21 months mame0256commit b41370db02... Vas Crabb22 months mame0255commit c6650dc072... Vas Crabb23 months mame0254commit bfa8d724a0... Vas Crabb2 years mame0253commit b6d9756c5e... Vas Crabb2 years mame0252commit fb98822c34... Vas Crabb2 years mame0251commit 34e6ec1ef8... Vas Crabb2 years mame0250commit b7cbe74c4b... Vas Crabb2 years mame0249commit 91c5b9ecea... Vas Crabb3 years mame0248commit 2d3d0deec8... Vas Crabb3 years mame0247commit fa2d36c634... Vas Crabb3 years mame0246commit 205b03897c... Vas Crabb3 years mame0245commit 5d31f0fc97... Vas Crabb3 years mame0244commit bcf77373a5... Vas Crabb3 years mame0243commit addbb8ab40... Vas Crabb3 years mame0242commit e8166b5274... Vas Crabb3 years mame0241commit 31f001e501... Vas Crabb3 years mame0240commit f0ab44fe1c... Vas Crabb3 years mame0239commit 80bcaea1ed... Vas Crabb3 years mame0238commit fb21b78904... Vas Crabb3 years mame0237commit 34d8357465... Vas Crabb4 years mame0236commit 5e865af540... Vas Crabb4 years mame0235commit ec9ba6fa76... Vas Crabb4 years mame0234commit 2633c19a68... Vas Crabb4 years mame0233commit 05d0cf61e7... Vas Crabb4 years mame0232commit 2b0f01bc3a... Vas Crabb4 years mame0231commit 1f22113661... Vas Crabb4 years mame0230commit 943c06cba0... Vas Crabb4 years mame0229commit 4322eaae9d... Vas Crabb4 years mame0228commit 140f446933... Vas Crabb4 years mame0227commit d85735634c... Vas Crabb4 years mame0226commit 3c56452b07... Vas Crabb5 years mame0225commit 5a1fd0cc17... Vas Crabb5 years mame0224commit 5892c78a15... Vas Crabb5 years mame0223commit c55a261d26... Vas Crabb5 years mame0222commit 6d50d60a43... Vas Crabb5 years mame0221commit e8a0e0469b... Vas Crabb5 years mame0220commit c5c5723b9d... Vas Crabb5 years mame0219commit 221f006442... Vas Crabb5 years mame0218commit 0e2a252d30... Vas Crabb5 years mame0217commit 13997a8f31... Vas Crabb5 years mame0216commit b8b7c7e232... Vas Crabb5 years mame0215commit e9ef4808dd... Vas Crabb6 years mame0214commit 24d07a12d7... Vas Crabb6 years mame0213commit f7172322a2... Vas Crabb6 years mame0212commit 1182bd9325... Vas Crabb6 years mame0211commit 1b969a8acb... Vas Crabb6 years mame0210commit ad45c9c609... Vas Crabb6 years mame0209commit 2b317bf296... Vas Crabb6 years mame0208commit 9483624864...