|
35 | 35 | [>=.f32 #:spec (>= x y) #:impl >= #:cost 128]) |
36 | 36 |
|
37 | 37 | (define-operations () <binary32> #:fpcore (:precision binary32) |
38 | | - [PI.f32 #:spec (PI) #:impl (const (flsingle pi)) #:fpcore PI #:cost 32] |
39 | | - [E.f32 #:spec (E) #:impl (const (flsingle (exp 1))) #:fpcore E #:cost 32] |
40 | | - [INFINITY.f32 #:spec (INFINITY) #:impl (const +inf.0) #:fpcore INFINITY #:cost 32] |
41 | | - [NAN.f32 #:spec (NAN) #:impl (const +nan.0) #:fpcore NAN #:cost 32]) |
| 38 | + [PI.f32 #:spec (PI) #:impl (const (flsingle pi)) #:fpcore PI #:cost 32] |
| 39 | + [E.f32 #:spec (E) #:impl (const (flsingle (exp 1))) #:fpcore E #:cost 32] |
| 40 | + [INFINITY.f32 #:spec (INFINITY) #:impl (const +inf.0) #:fpcore INFINITY #:cost 32] |
| 41 | + [NAN.f32 #:spec (NAN) #:impl (const +nan.0) #:fpcore NAN #:cost 32]) |
42 | 42 |
|
43 | 43 | (define-operation (neg.f32 [x <binary32>]) <binary32> |
44 | 44 | #:spec (neg x) #:impl (compose flsingle -) |
45 | 45 | #:fpcore (! :precision binary32 (- x)) #:cost 64) |
46 | | - |
47 | | - (define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (:precision binary32) |
48 | | - [+.f32 #:spec (+ x y) #:impl (compose flsingle +) #:cost 64] |
49 | | - [-.f32 #:spec (- x y) #:impl (compose flsingle -) #:cost 64] |
50 | | - [*.f32 #:spec (* x y) #:impl (compose flsingle *) #:cost 128] |
51 | | - [/.f32 #:spec (/ x y) #:impl (compose flsingle /) #:cost 320]) |
52 | | - |
53 | | - (define-operations ([x <binary32>]) <binary32> #:fpcore (:precision binary32) |
54 | | - [fabs.f32 #:spec (fabs x) #:impl (from-libm 'fabsf) #:cost 64] |
55 | | - [sin.f32 #:spec (sin x) #:impl (from-libm 'sinf) #:cost 3200] |
56 | | - [cos.f32 #:spec (cos x) #:impl (from-libm 'cosf) #:cost 3200] |
57 | | - [tan.f32 #:spec (tan x) #:impl (from-libm 'tanf) #:cost 3200] |
58 | | - [sinh.f32 #:spec (sinh x) #:impl (from-libm 'sinhf) #:cost 3200] |
59 | | - [cosh.f32 #:spec (cosh x) #:impl (from-libm 'coshf) #:cost 3200] |
60 | | - [acos.f32 #:spec (acos x) #:impl (from-libm 'acosf) #:cost 3200] |
61 | | - [acosh.f32 #:spec (acosh x) #:impl (from-libm 'acoshf) #:cost 3200] |
62 | | - [asin.f32 #:spec (asin x) #:impl (from-libm 'asinf) #:cost 3200] |
63 | | - [asinh.f32 #:spec (asinh x) #:impl (from-libm 'asinhf) #:cost 3200] |
64 | | - [atan.f32 #:spec (atan x) #:impl (from-libm 'atanf) #:cost 3200] |
65 | | - [atanh.f32 #:spec (atanh x) #:impl (from-libm 'atanhf) #:cost 3200] |
66 | | - [cbrt.f32 #:spec (cbrt x) #:impl (from-libm 'cbrtf) #:cost 3200] |
67 | | - [ceil.f32 #:spec (ceil x) #:impl (from-libm 'ceilf) #:cost 3200] |
68 | | - [erf.f32 #:spec (erf x) #:impl (from-libm 'erff) #:cost 3200] |
69 | | - [exp.f32 #:spec (exp x) #:impl (from-libm 'expf) #:cost 3200] |
70 | | - [exp2.f32 #:spec (exp2 x) #:impl (from-libm 'exp2f) #:cost 3200] |
71 | | - [floor.f32 #:spec (floor x) #:impl (from-libm 'floorf) #:cost 3200] |
72 | | - [lgamma.f32 #:spec (lgamma x) #:impl (from-libm 'lgammaf) #:cost 3200] |
73 | | - [log.f32 #:spec (log x) #:impl (from-libm 'logf) #:cost 3200] |
74 | | - [log10.f32 #:spec (log10 x) #:impl (from-libm 'log10f) #:cost 3200] |
75 | | - [log2.f32 #:spec (log2 x) #:impl (from-libm 'log2f) #:cost 3200] |
76 | | - [logb.f32 #:spec (logb x) #:impl (from-libm 'logbf) #:cost 3200] |
77 | | - [rint.f32 #:spec (rint x) #:impl (from-libm 'rintf) #:cost 3200] |
78 | | - [round.f32 #:spec (round x) #:impl (from-libm 'roundf) #:cost 3200] |
79 | | - [sqrt.f32 #:spec (sqrt x) #:impl (from-libm 'sqrtf) #:cost 320] |
80 | | - [tanh.f32 #:spec (tanh x) #:impl (from-libm 'tanhf) #:cost 3200] |
81 | | - [tgamma.f32 #:spec (tgamma x) #:impl (from-libm 'tgammaf) #:cost 3200] |
82 | | - [trunc.f32 #:spec (trunc x) #:impl (from-libm 'truncf) #:cost 3200]) |
83 | | - |
84 | | - (define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (:precision binary32) |
85 | | - [pow.f32 #:spec (pow x y) #:impl (from-libm 'powf) #:cost 3200] |
86 | | - [atan2.f32 #:spec (atan2 x y) #:impl (from-libm 'atan2f) #:cost 3200] |
87 | | - [copysign.f32 #:spec (copysign x y) #:impl (from-libm 'copysignf) #:cost 3200] |
88 | | - [fdim.f32 #:spec (fdim x y) #:impl (from-libm 'fdimf) #:cost 3200] |
89 | | - [fmax.f32 #:spec (fmax x y) #:impl (from-libm 'fmaxf) #:cost 3200] |
90 | | - [fmin.f32 #:spec (fmin x y) #:impl (from-libm 'fminf) #:cost 3200] |
91 | | - [fmod.f32 #:spec (fmod x y) #:impl (from-libm 'fmodf) #:cost 3200] |
92 | | - [remainder.f32 #:spec (remainder x y) #:impl (from-libm 'remainderf) #:cost 3200]) |
93 | | - |
94 | | - (define-operations ([x <binary32>]) <binary32> #:fpcore (:precision binary32) |
95 | | - [erfc.f32 #:spec (- 1 (erf x)) #:impl (from-libm 'erfcf) #:fpcore (erfc x) #:cost 3200] |
96 | | - [expm1.f32 #:spec (- (exp x) 1) #:impl (from-libm 'expm1f) #:fpcore (expm1 x) #:cost 3200] |
97 | | - [log1p.f32 #:spec (log (+ 1 x)) #:impl (from-libm 'log1pf) #:fpcore (log1p x) #:cost 3200]) |
98 | | - |
| 46 | + |
| 47 | +(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (:precision binary32) |
| 48 | + [+.f32 #:spec (+ x y) #:impl (compose flsingle +) #:cost 64] |
| 49 | + [-.f32 #:spec (- x y) #:impl (compose flsingle -) #:cost 64] |
| 50 | + [*.f32 #:spec (* x y) #:impl (compose flsingle *) #:cost 128] |
| 51 | + [/.f32 #:spec (/ x y) #:impl (compose flsingle /) #:cost 320]) |
| 52 | + |
| 53 | +(define-operations ([x <binary32>]) <binary32> #:fpcore (:precision binary32) |
| 54 | + [fabs.f32 #:spec (fabs x) #:impl (from-libm 'fabsf) #:cost 64] |
| 55 | + [sin.f32 #:spec (sin x) #:impl (from-libm 'sinf) #:cost 3200] |
| 56 | + [cos.f32 #:spec (cos x) #:impl (from-libm 'cosf) #:cost 3200] |
| 57 | + [tan.f32 #:spec (tan x) #:impl (from-libm 'tanf) #:cost 3200] |
| 58 | + [sinh.f32 #:spec (sinh x) #:impl (from-libm 'sinhf) #:cost 3200] |
| 59 | + [cosh.f32 #:spec (cosh x) #:impl (from-libm 'coshf) #:cost 3200] |
| 60 | + [acos.f32 #:spec (acos x) #:impl (from-libm 'acosf) #:cost 3200] |
| 61 | + [acosh.f32 #:spec (acosh x) #:impl (from-libm 'acoshf) #:cost 3200] |
| 62 | + [asin.f32 #:spec (asin x) #:impl (from-libm 'asinf) #:cost 3200] |
| 63 | + [asinh.f32 #:spec (asinh x) #:impl (from-libm 'asinhf) #:cost 3200] |
| 64 | + [atan.f32 #:spec (atan x) #:impl (from-libm 'atanf) #:cost 3200] |
| 65 | + [atanh.f32 #:spec (atanh x) #:impl (from-libm 'atanhf) #:cost 3200] |
| 66 | + [cbrt.f32 #:spec (cbrt x) #:impl (from-libm 'cbrtf) #:cost 3200] |
| 67 | + [ceil.f32 #:spec (ceil x) #:impl (from-libm 'ceilf) #:cost 3200] |
| 68 | + [erf.f32 #:spec (erf x) #:impl (from-libm 'erff) #:cost 3200] |
| 69 | + [exp.f32 #:spec (exp x) #:impl (from-libm 'expf) #:cost 3200] |
| 70 | + [exp2.f32 #:spec (exp2 x) #:impl (from-libm 'exp2f) #:cost 3200] |
| 71 | + [floor.f32 #:spec (floor x) #:impl (from-libm 'floorf) #:cost 3200] |
| 72 | + [lgamma.f32 #:spec (lgamma x) #:impl (from-libm 'lgammaf) #:cost 3200] |
| 73 | + [log.f32 #:spec (log x) #:impl (from-libm 'logf) #:cost 3200] |
| 74 | + [log10.f32 #:spec (log10 x) #:impl (from-libm 'log10f) #:cost 3200] |
| 75 | + [log2.f32 #:spec (log2 x) #:impl (from-libm 'log2f) #:cost 3200] |
| 76 | + [logb.f32 #:spec (logb x) #:impl (from-libm 'logbf) #:cost 3200] |
| 77 | + [rint.f32 #:spec (rint x) #:impl (from-libm 'rintf) #:cost 3200] |
| 78 | + [round.f32 #:spec (round x) #:impl (from-libm 'roundf) #:cost 3200] |
| 79 | + [sqrt.f32 #:spec (sqrt x) #:impl (from-libm 'sqrtf) #:cost 320] |
| 80 | + [tanh.f32 #:spec (tanh x) #:impl (from-libm 'tanhf) #:cost 3200] |
| 81 | + [tgamma.f32 #:spec (tgamma x) #:impl (from-libm 'tgammaf) #:cost 3200] |
| 82 | + [trunc.f32 #:spec (trunc x) #:impl (from-libm 'truncf) #:cost 3200]) |
| 83 | + |
| 84 | +(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (:precision binary32) |
| 85 | + [pow.f32 #:spec (pow x y) #:impl (from-libm 'powf) #:cost 3200] |
| 86 | + [atan2.f32 #:spec (atan2 x y) #:impl (from-libm 'atan2f) #:cost 3200] |
| 87 | + [copysign.f32 #:spec (copysign x y) #:impl (from-libm 'copysignf) #:cost 3200] |
| 88 | + [fdim.f32 #:spec (fdim x y) #:impl (from-libm 'fdimf) #:cost 3200] |
| 89 | + [fmax.f32 #:spec (fmax x y) #:impl (from-libm 'fmaxf) #:cost 3200] |
| 90 | + [fmin.f32 #:spec (fmin x y) #:impl (from-libm 'fminf) #:cost 3200] |
| 91 | + [fmod.f32 #:spec (fmod x y) #:impl (from-libm 'fmodf) #:cost 3200] |
| 92 | + [remainder.f32 #:spec (remainder x y) #:impl (from-libm 'remainderf) #:cost 3200]) |
| 93 | + |
| 94 | +(define-operations ([x <binary32>]) <binary32> #:fpcore (:precision binary32) |
| 95 | + [erfc.f32 #:spec (- 1 (erf x)) #:impl (from-libm 'erfcf) #:fpcore (erfc x) #:cost 3200] |
| 96 | + [expm1.f32 #:spec (- (exp x) 1) #:impl (from-libm 'expm1f) #:fpcore (expm1 x) #:cost 3200] |
| 97 | + [log1p.f32 #:spec (log (+ 1 x)) #:impl (from-libm 'log1pf) #:fpcore (log1p x) #:cost 3200]) |
| 98 | + |
99 | 99 | (define-operation (hypot.f32 [x <binary32>] [y <binary32>]) <binary32> |
100 | 100 | #:spec (sqrt (+ (* x x) (* y y))) #:impl (from-libm 'hypotf) |
101 | 101 | #:fpcore (! :precision binary32 (hypot x y)) #:cost 3200) |
|
115 | 115 | [>.f64 #:spec (> x y) #:impl > #:cost 256] |
116 | 116 | [<=.f64 #:spec (<= x y) #:impl <= #:cost 256] |
117 | 117 | [>=.f64 #:spec (>= x y) #:impl >= #:cost 256]) |
118 | | - |
| 118 | + |
119 | 119 | (define-operations () <binary64> #:fpcore (:precision binary64) |
120 | | - [PI.f64 #:spec (PI) #:impl (const pi) #:fpcore PI #:cost 64] |
121 | | - [E.f64 #:spec (E) #:impl (const (exp 1)) #:fpcore E #:cost 64] |
122 | | - [INFINITY #:spec (INFINITY) #:impl (const +inf.0) #:fpcore INFINITY #:cost 64] |
123 | | - [NAN.f64 #:spec (NAN) #:impl (const +nan.0) #:fpcore NAN #:cost 64]) |
124 | | - |
125 | | - (define-operation (neg.f64 [x <binary64>]) <binary64> |
126 | | - #:spec (neg x) #:impl - |
127 | | - #:fpcore (! :precision binary64 (- x)) #:cost 128) |
128 | | - |
129 | | - (define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (:precision binary64) |
130 | | - [+.f64 #:spec (+ x y) #:impl + #:cost 128] |
131 | | - [-.f64 #:spec (- x y) #:impl - #:cost 128] |
132 | | - [*.f64 #:spec (* x y) #:impl * #:cost 256] |
133 | | - [/.f64 #:spec (/ x y) #:impl / #:cost 640]) |
134 | | - |
135 | | - (define-operations ([x <binary64>]) <binary64> #:fpcore (:precision binary64) |
136 | | - [fabs.f64 #:spec (fabs x) #:impl (from-libm 'fabs) #:cost 128] |
137 | | - [sin.f64 #:spec (sin x) #:impl (from-libm 'sin) #:cost 6400] |
138 | | - [cos.f64 #:spec (cos x) #:impl (from-libm 'cos) #:cost 6400] |
139 | | - [tan.f64 #:spec (tan x) #:impl (from-libm 'tan) #:cost 6400] |
140 | | - [sinh.f64 #:spec (sinh x) #:impl (from-libm 'sinh) #:cost 6400] |
141 | | - [cosh.f64 #:spec (cosh x) #:impl (from-libm 'cosh) #:cost 6400] |
142 | | - [acos.f64 #:spec (acos x) #:impl (from-libm 'acos) #:cost 6400] |
143 | | - [acosh.f64 #:spec (acosh x) #:impl (from-libm 'acosh) #:cost 6400] |
144 | | - [asin.f64 #:spec (asin x) #:impl (from-libm 'asin) #:cost 6400] |
145 | | - [asinh.f64 #:spec (asinh x) #:impl (from-libm 'asinh) #:cost 6400] |
146 | | - [atan.f64 #:spec (atan x) #:impl (from-libm 'atan) #:cost 6400] |
147 | | - [atanh.f64 #:spec (atanh x) #:impl (from-libm 'atanh) #:cost 6400] |
148 | | - [cbrt.f64 #:spec (cbrt x) #:impl (from-libm 'cbrt) #:cost 6400] |
149 | | - [ceil.f64 #:spec (ceil x) #:impl (from-libm 'ceil) #:cost 6400] |
150 | | - [erf.f64 #:spec (erf x) #:impl (from-libm 'erf) #:cost 6400] |
151 | | - [exp.f64 #:spec (exp x) #:impl (from-libm 'exp) #:cost 6400] |
152 | | - [exp2.f64 #:spec (exp2 x) #:impl (from-libm 'exp2) #:cost 6400] |
153 | | - [floor.f64 #:spec (floor x) #:impl (from-libm 'floor) #:cost 6400] |
154 | | - [lgamma.f64 #:spec (lgamma x) #:impl (from-libm 'lgamma) #:cost 6400] |
155 | | - [log.f64 #:spec (log x) #:impl (from-libm 'log) #:cost 6400] |
156 | | - [log10.f64 #:spec (log10 x) #:impl (from-libm 'log10) #:cost 6400] |
157 | | - [log2.f64 #:spec (log2 x) #:impl (from-libm 'log2) #:cost 6400] |
158 | | - [logb.f64 #:spec (logb x) #:impl (from-libm 'logb) #:cost 6400] |
159 | | - [rint.f64 #:spec (rint x) #:impl (from-libm 'rint) #:cost 6400] |
160 | | - [round.f64 #:spec (round x) #:impl (from-libm 'round) #:cost 6400] |
161 | | - [sqrt.f64 #:spec (sqrt x) #:impl (from-libm 'sqrt) #:cost 640] |
162 | | - [tanh.f64 #:spec (tanh x) #:impl (from-libm 'tanh) #:cost 6400] |
163 | | - [tgamma.f64 #:spec (tgamma x) #:impl (from-libm 'tgamma) #:cost 6400] |
164 | | - [trunc.f64 #:spec (trunc x) #:impl (from-libm 'trunc) #:cost 6400]) |
165 | | - |
166 | | - (define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (:precision binary64) |
167 | | - [pow.f64 #:spec (pow x y) #:impl (from-libm 'pow) #:cost 6400] |
168 | | - [atan2.f64 #:spec (atan2 x y) #:impl (from-libm 'atan2) #:cost 6400] |
169 | | - [copysign.f64 #:spec (copysign x y) #:impl (from-libm 'copysign) #:cost 6400] |
170 | | - [fdim.f64 #:spec (fdim x y) #:impl (from-libm 'fdim) #:cost 6400] |
171 | | - [fmax.f64 #:spec (fmax x y) #:impl (from-libm 'fmax) #:cost 6400] |
172 | | - [fmin.f64 #:spec (fmin x y) #:impl (from-libm 'fmin) #:cost 6400] |
173 | | - [fmod.f64 #:spec (fmod x y) #:impl (from-libm 'fmod) #:cost 6400] |
174 | | - [remainder.f64 #:spec (remainder x y) #:impl (from-libm 'remainder) #:cost 6400]) |
175 | | - |
176 | | - (define-operations ([x <binary64>]) <binary64> #:fpcore (:precision binary64) |
177 | | - [erfc.f64 #:spec (- 1 (erf x)) #:impl (from-libm 'erfc) #:fpcore (erfc x) #:cost 6400] |
178 | | - [expm1.f64 #:spec (- (exp x) 1) #:impl (from-libm 'expm1) #:fpcore (expm1 x) #:cost 6400] |
179 | | - [log1p.f64 #:spec (log (+ 1 x)) #:impl (from-libm 'log1p) #:fpcore (log1p x) #:cost 6400]) |
180 | | - |
181 | | - (define-operation (hypot.f64 [x <binary64>] [y <binary64>]) <binary64> |
182 | | - #:spec (sqrt (+ (* x x) (* y y))) #:impl (from-libm 'hypot) |
183 | | - #:fpcore (! :precision binary64 (hypot x y)) #:cost 6400) |
184 | | - |
185 | | - (define-operation (fma.f64 [x <binary64>] [y <binary64>] [z <binary64>]) <binary64> |
186 | | - #:spec (+ (* x y) z) #:impl (from-libm 'fma) |
187 | | - #:fpcore (! :precision binary64 (fma x y z)) #:cost 256) |
| 120 | + [PI.f64 #:spec (PI) #:impl (const pi) #:fpcore PI #:cost 64] |
| 121 | + [E.f64 #:spec (E) #:impl (const (exp 1)) #:fpcore E #:cost 64] |
| 122 | + [INFINITY #:spec (INFINITY) #:impl (const +inf.0) #:fpcore INFINITY #:cost 64] |
| 123 | + [NAN.f64 #:spec (NAN) #:impl (const +nan.0) #:fpcore NAN #:cost 64]) |
| 124 | + |
| 125 | +(define-operation (neg.f64 [x <binary64>]) <binary64> |
| 126 | + #:spec (neg x) #:impl - |
| 127 | + #:fpcore (! :precision binary64 (- x)) #:cost 128) |
| 128 | + |
| 129 | +(define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (:precision binary64) |
| 130 | + [+.f64 #:spec (+ x y) #:impl + #:cost 128] |
| 131 | + [-.f64 #:spec (- x y) #:impl - #:cost 128] |
| 132 | + [*.f64 #:spec (* x y) #:impl * #:cost 256] |
| 133 | + [/.f64 #:spec (/ x y) #:impl / #:cost 640]) |
| 134 | + |
| 135 | +(define-operations ([x <binary64>]) <binary64> #:fpcore (:precision binary64) |
| 136 | + [fabs.f64 #:spec (fabs x) #:impl (from-libm 'fabs) #:cost 128] |
| 137 | + [sin.f64 #:spec (sin x) #:impl (from-libm 'sin) #:cost 6400] |
| 138 | + [cos.f64 #:spec (cos x) #:impl (from-libm 'cos) #:cost 6400] |
| 139 | + [tan.f64 #:spec (tan x) #:impl (from-libm 'tan) #:cost 6400] |
| 140 | + [sinh.f64 #:spec (sinh x) #:impl (from-libm 'sinh) #:cost 6400] |
| 141 | + [cosh.f64 #:spec (cosh x) #:impl (from-libm 'cosh) #:cost 6400] |
| 142 | + [acos.f64 #:spec (acos x) #:impl (from-libm 'acos) #:cost 6400] |
| 143 | + [acosh.f64 #:spec (acosh x) #:impl (from-libm 'acosh) #:cost 6400] |
| 144 | + [asin.f64 #:spec (asin x) #:impl (from-libm 'asin) #:cost 6400] |
| 145 | + [asinh.f64 #:spec (asinh x) #:impl (from-libm 'asinh) #:cost 6400] |
| 146 | + [atan.f64 #:spec (atan x) #:impl (from-libm 'atan) #:cost 6400] |
| 147 | + [atanh.f64 #:spec (atanh x) #:impl (from-libm 'atanh) #:cost 6400] |
| 148 | + [cbrt.f64 #:spec (cbrt x) #:impl (from-libm 'cbrt) #:cost 6400] |
| 149 | + [ceil.f64 #:spec (ceil x) #:impl (from-libm 'ceil) #:cost 6400] |
| 150 | + [erf.f64 #:spec (erf x) #:impl (from-libm 'erf) #:cost 6400] |
| 151 | + [exp.f64 #:spec (exp x) #:impl (from-libm 'exp) #:cost 6400] |
| 152 | + [exp2.f64 #:spec (exp2 x) #:impl (from-libm 'exp2) #:cost 6400] |
| 153 | + [floor.f64 #:spec (floor x) #:impl (from-libm 'floor) #:cost 6400] |
| 154 | + [lgamma.f64 #:spec (lgamma x) #:impl (from-libm 'lgamma) #:cost 6400] |
| 155 | + [log.f64 #:spec (log x) #:impl (from-libm 'log) #:cost 6400] |
| 156 | + [log10.f64 #:spec (log10 x) #:impl (from-libm 'log10) #:cost 6400] |
| 157 | + [log2.f64 #:spec (log2 x) #:impl (from-libm 'log2) #:cost 6400] |
| 158 | + [logb.f64 #:spec (logb x) #:impl (from-libm 'logb) #:cost 6400] |
| 159 | + [rint.f64 #:spec (rint x) #:impl (from-libm 'rint) #:cost 6400] |
| 160 | + [round.f64 #:spec (round x) #:impl (from-libm 'round) #:cost 6400] |
| 161 | + [sqrt.f64 #:spec (sqrt x) #:impl (from-libm 'sqrt) #:cost 640] |
| 162 | + [tanh.f64 #:spec (tanh x) #:impl (from-libm 'tanh) #:cost 6400] |
| 163 | + [tgamma.f64 #:spec (tgamma x) #:impl (from-libm 'tgamma) #:cost 6400] |
| 164 | + [trunc.f64 #:spec (trunc x) #:impl (from-libm 'trunc) #:cost 6400]) |
| 165 | + |
| 166 | +(define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (:precision binary64) |
| 167 | + [pow.f64 #:spec (pow x y) #:impl (from-libm 'pow) #:cost 6400] |
| 168 | + [atan2.f64 #:spec (atan2 x y) #:impl (from-libm 'atan2) #:cost 6400] |
| 169 | + [copysign.f64 #:spec (copysign x y) #:impl (from-libm 'copysign) #:cost 6400] |
| 170 | + [fdim.f64 #:spec (fdim x y) #:impl (from-libm 'fdim) #:cost 6400] |
| 171 | + [fmax.f64 #:spec (fmax x y) #:impl (from-libm 'fmax) #:cost 6400] |
| 172 | + [fmin.f64 #:spec (fmin x y) #:impl (from-libm 'fmin) #:cost 6400] |
| 173 | + [fmod.f64 #:spec (fmod x y) #:impl (from-libm 'fmod) #:cost 6400] |
| 174 | + [remainder.f64 #:spec (remainder x y) #:impl (from-libm 'remainder) #:cost 6400]) |
| 175 | + |
| 176 | +(define-operations ([x <binary64>]) <binary64> #:fpcore (:precision binary64) |
| 177 | + [erfc.f64 #:spec (- 1 (erf x)) #:impl (from-libm 'erfc) #:fpcore (erfc x) #:cost 6400] |
| 178 | + [expm1.f64 #:spec (- (exp x) 1) #:impl (from-libm 'expm1) #:fpcore (expm1 x) #:cost 6400] |
| 179 | + [log1p.f64 #:spec (log (+ 1 x)) #:impl (from-libm 'log1p) #:fpcore (log1p x) #:cost 6400]) |
| 180 | + |
| 181 | +(define-operation (hypot.f64 [x <binary64>] [y <binary64>]) <binary64> |
| 182 | + #:spec (sqrt (+ (* x x) (* y y))) #:impl (from-libm 'hypot) |
| 183 | + #:fpcore (! :precision binary64 (hypot x y)) #:cost 6400) |
| 184 | + |
| 185 | +(define-operation (fma.f64 [x <binary64>] [y <binary64>] [z <binary64>]) <binary64> |
| 186 | + #:spec (+ (* x y) z) #:impl (from-libm 'fma) |
| 187 | + #:fpcore (! :precision binary64 (fma x y z)) #:cost 256) |
188 | 188 |
|
189 | 189 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CASTS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
190 | 190 |
|
|
0 commit comments