
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))
(t_1
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))
z))
t_0)))
(if (<= t_1 (- INFINITY))
(*
(+ x -2.0)
(+
(/ z t_0)
(-
4.16438922228
(/
(-
101.7851458539211
(/ (+ 3451.550173699799 (+ (/ y x) (/ -124074.40615218398 x))) x))
x))))
(if (<= t_1 1e+291)
t_1
(*
(+ x -2.0)
(-
4.16438922228
(/
(+
101.7851458539211
(/ (- (/ (- 124074.40615218398 y) x) 3451.550173699799) x))
x)))))))
double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / t_0;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x + -2.0) * ((z / t_0) + (4.16438922228 - ((101.7851458539211 - ((3451.550173699799 + ((y / x) + (-124074.40615218398 / x))) / x)) / x)));
} else if (t_1 <= 1e+291) {
tmp = t_1;
} else {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / t_0;
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x + -2.0) * ((z / t_0) + (4.16438922228 - ((101.7851458539211 - ((3451.550173699799 + ((y / x) + (-124074.40615218398 / x))) / x)) / x)));
} else if (t_1 <= 1e+291) {
tmp = t_1;
} else {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
}
return tmp;
}
def code(x, y, z): t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))) t_1 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / t_0 tmp = 0 if t_1 <= -math.inf: tmp = (x + -2.0) * ((z / t_0) + (4.16438922228 - ((101.7851458539211 - ((3451.550173699799 + ((y / x) + (-124074.40615218398 / x))) / x)) / x))) elif t_1 <= 1e+291: tmp = t_1 else: tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x)) return tmp
function code(x, y, z) t_0 = Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))) t_1 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) + z)) / t_0) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z / t_0) + Float64(4.16438922228 - Float64(Float64(101.7851458539211 - Float64(Float64(3451.550173699799 + Float64(Float64(y / x) + Float64(-124074.40615218398 / x))) / x)) / x)))); elseif (t_1 <= 1e+291) tmp = t_1; else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(Float64(101.7851458539211 + Float64(Float64(Float64(Float64(124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))); t_1 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / t_0; tmp = 0.0; if (t_1 <= -Inf) tmp = (x + -2.0) * ((z / t_0) + (4.16438922228 - ((101.7851458539211 - ((3451.550173699799 + ((y / x) + (-124074.40615218398 / x))) / x)) / x))); elseif (t_1 <= 1e+291) tmp = t_1; else tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z / t$95$0), $MachinePrecision] + N[(4.16438922228 - N[(N[(101.7851458539211 - N[(N[(3451.550173699799 + N[(N[(y / x), $MachinePrecision] + N[(-124074.40615218398 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+291], t$95$1, N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(N[(101.7851458539211 + N[(N[(N[(N[(124074.40615218398 - y), $MachinePrecision] / x), $MachinePrecision] - 3451.550173699799), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
t_1 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right) + z\right)}{t\_0}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{t\_0} + \left(4.16438922228 - \frac{101.7851458539211 - \frac{3451.550173699799 + \left(\frac{y}{x} + \frac{-124074.40615218398}{x}\right)}{x}}{x}\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+291}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < -inf.0Initial program 5.0%
associate-/l*88.7%
sub-neg88.7%
metadata-eval88.7%
fma-define88.7%
fma-define88.7%
fma-define88.7%
fma-define88.7%
fma-define88.7%
fma-define88.7%
fma-define88.7%
Simplified88.7%
Taylor expanded in z around 0 88.7%
Taylor expanded in x around -inf 99.4%
mul-1-neg99.4%
unsub-neg99.4%
mul-1-neg99.4%
unsub-neg99.4%
associate--l+99.4%
sub-neg99.4%
associate-*r/99.4%
metadata-eval99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
Simplified99.4%
if -inf.0 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 9.9999999999999996e290Initial program 99.5%
if 9.9999999999999996e290 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.2%
associate-/l*2.8%
sub-neg2.8%
metadata-eval2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
Simplified2.8%
Taylor expanded in x around -inf 98.7%
mul-1-neg98.7%
unsub-neg98.7%
mul-1-neg98.7%
unsub-neg98.7%
mul-1-neg98.7%
unsub-neg98.7%
mul-1-neg98.7%
unsub-neg98.7%
Simplified98.7%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))
z))
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))))
(if (or (<= t_0 (- INFINITY)) (not (<= t_0 1e+291)))
(*
(+ x -2.0)
(-
4.16438922228
(/
(+
101.7851458539211
(/ (- (/ (- 124074.40615218398 y) x) 3451.550173699799) x))
x)))
t_0)))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))));
double tmp;
if ((t_0 <= -((double) INFINITY)) || !(t_0 <= 1e+291)) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))));
double tmp;
if ((t_0 <= -Double.POSITIVE_INFINITY) || !(t_0 <= 1e+291)) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))) tmp = 0 if (t_0 <= -math.inf) or not (t_0 <= 1e+291): tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) + z)) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514)))))))) tmp = 0.0 if ((t_0 <= Float64(-Inf)) || !(t_0 <= 1e+291)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(Float64(101.7851458539211 + Float64(Float64(Float64(Float64(124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))); tmp = 0.0; if ((t_0 <= -Inf) || ~((t_0 <= 1e+291))) tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, (-Infinity)], N[Not[LessEqual[t$95$0, 1e+291]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(N[(101.7851458539211 + N[(N[(N[(N[(124074.40615218398 - y), $MachinePrecision] / x), $MachinePrecision] - 3451.550173699799), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\
\mathbf{if}\;t\_0 \leq -\infty \lor \neg \left(t\_0 \leq 10^{+291}\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < -inf.0 or 9.9999999999999996e290 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.6%
associate-/l*9.5%
sub-neg9.5%
metadata-eval9.5%
fma-define9.5%
fma-define9.5%
fma-define9.5%
fma-define9.5%
fma-define9.5%
fma-define9.5%
fma-define9.5%
Simplified9.5%
Taylor expanded in x around -inf 96.7%
mul-1-neg96.7%
unsub-neg96.7%
mul-1-neg96.7%
unsub-neg96.7%
mul-1-neg96.7%
unsub-neg96.7%
mul-1-neg96.7%
unsub-neg96.7%
Simplified96.7%
if -inf.0 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 9.9999999999999996e290Initial program 99.5%
Final simplification98.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))
(t_1
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))))
(if (<= (/ (* (- x 2.0) (+ t_1 z)) t_0) INFINITY)
(* (+ x -2.0) (+ (/ z t_0) (/ t_1 t_0)))
(* x 4.16438922228))))
double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))));
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= ((double) INFINITY)) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))));
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= Double.POSITIVE_INFINITY) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))) t_1 = x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))))) tmp = 0 if (((x - 2.0) * (t_1 + z)) / t_0) <= math.inf: tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)) else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) t_0 = Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))) t_1 = Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(t_1 + z)) / t_0) <= Inf) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z / t_0) + Float64(t_1 / t_0))); else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))); t_1 = x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))))); tmp = 0.0; if ((((x - 2.0) * (t_1 + z)) / t_0) <= Inf) tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)); else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(t$95$1 + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], Infinity], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z / t$95$0), $MachinePrecision] + N[(t$95$1 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
t_1 := x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(t\_1 + z\right)}{t\_0} \leq \infty:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{t\_0} + \frac{t\_1}{t\_0}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < +inf.0Initial program 92.1%
associate-/l*98.9%
sub-neg98.9%
metadata-eval98.9%
fma-define98.9%
fma-define98.9%
fma-define98.9%
fma-define98.9%
fma-define98.9%
fma-define98.9%
fma-define98.9%
Simplified98.9%
Taylor expanded in z around 0 98.9%
if +inf.0 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.0%
associate-/l*0.0%
sub-neg0.0%
metadata-eval0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
Simplified0.0%
Taylor expanded in z around 0 0.0%
Taylor expanded in x around inf 99.1%
Taylor expanded in x around inf 99.1%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(if (or (<= x -105000000.0) (not (<= x 7.2e+15)))
(*
(+ x -2.0)
(-
4.16438922228
(/
(+
101.7851458539211
(/ (- (/ (- 124074.40615218398 y) x) 3451.550173699799) x))
x)))
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+
47.066876606
(*
x
(+ 313.399215894 (* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -105000000.0) || !(x <= 7.2e+15)) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-105000000.0d0)) .or. (.not. (x <= 7.2d+15))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 - ((101.7851458539211d0 + ((((124074.40615218398d0 - y) / x) - 3451.550173699799d0) / x)) / x))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * (263.505074721d0 + (x * (x + 43.3400022514d0)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -105000000.0) || !(x <= 7.2e+15)) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -105000000.0) or not (x <= 7.2e+15): tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x)) else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -105000000.0) || !(x <= 7.2e+15)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(Float64(101.7851458539211 + Float64(Float64(Float64(Float64(124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514)))))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -105000000.0) || ~((x <= 7.2e+15))) tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x)); else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -105000000.0], N[Not[LessEqual[x, 7.2e+15]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(N[(101.7851458539211 + N[(N[(N[(N[(124074.40615218398 - y), $MachinePrecision] / x), $MachinePrecision] - 3451.550173699799), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -105000000 \lor \neg \left(x \leq 7.2 \cdot 10^{+15}\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\
\end{array}
\end{array}
if x < -1.05e8 or 7.2e15 < x Initial program 12.6%
associate-/l*20.4%
sub-neg20.4%
metadata-eval20.4%
fma-define20.4%
fma-define20.4%
fma-define20.4%
fma-define20.4%
fma-define20.4%
fma-define20.4%
fma-define20.4%
Simplified20.4%
Taylor expanded in x around -inf 94.8%
mul-1-neg94.8%
unsub-neg94.8%
mul-1-neg94.8%
unsub-neg94.8%
mul-1-neg94.8%
unsub-neg94.8%
mul-1-neg94.8%
unsub-neg94.8%
Simplified94.8%
if -1.05e8 < x < 7.2e15Initial program 99.5%
Taylor expanded in x around 0 98.8%
*-commutative98.8%
Simplified98.8%
Final simplification96.7%
(FPCore (x y z)
:precision binary64
(if (or (<= x -410.0) (not (<= x 13500000.0)))
(*
(+ x -2.0)
(-
4.16438922228
(/
(+
101.7851458539211
(/ (- (/ (- 124074.40615218398 y) x) 3451.550173699799) x))
x)))
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -410.0) || !(x <= 13500000.0)) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-410.0d0)) .or. (.not. (x <= 13500000.0d0))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 - ((101.7851458539211d0 + ((((124074.40615218398d0 - y) / x) - 3451.550173699799d0) / x)) / x))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -410.0) || !(x <= 13500000.0)) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -410.0) or not (x <= 13500000.0): tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x)) else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -410.0) || !(x <= 13500000.0)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(Float64(101.7851458539211 + Float64(Float64(Float64(Float64(124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -410.0) || ~((x <= 13500000.0))) tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x)); else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -410.0], N[Not[LessEqual[x, 13500000.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(N[(101.7851458539211 + N[(N[(N[(N[(124074.40615218398 - y), $MachinePrecision] / x), $MachinePrecision] - 3451.550173699799), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -410 \lor \neg \left(x \leq 13500000\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\end{array}
\end{array}
if x < -410 or 1.35e7 < x Initial program 13.9%
associate-/l*21.6%
sub-neg21.6%
metadata-eval21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
Simplified21.6%
Taylor expanded in x around -inf 93.7%
mul-1-neg93.7%
unsub-neg93.7%
mul-1-neg93.7%
unsub-neg93.7%
mul-1-neg93.7%
unsub-neg93.7%
mul-1-neg93.7%
unsub-neg93.7%
Simplified93.7%
if -410 < x < 1.35e7Initial program 99.6%
Taylor expanded in x around 0 98.8%
*-commutative98.8%
Simplified98.8%
Taylor expanded in x around 0 98.1%
*-commutative98.1%
Simplified98.1%
Final simplification95.8%
(FPCore (x y z)
:precision binary64
(if (or (<= x -8.0) (not (<= x 2.0)))
(*
(+ x -2.0)
(-
4.16438922228
(/
(+
101.7851458539211
(/ (- (/ (- 124074.40615218398 y) x) 3451.550173699799) x))
x)))
(+
(* x (+ (* x -5.843575199059173) (* y -0.0424927283095952)))
(* z -0.0424927283095952))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -8.0) || !(x <= 2.0)) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
} else {
tmp = (x * ((x * -5.843575199059173) + (y * -0.0424927283095952))) + (z * -0.0424927283095952);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-8.0d0)) .or. (.not. (x <= 2.0d0))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 - ((101.7851458539211d0 + ((((124074.40615218398d0 - y) / x) - 3451.550173699799d0) / x)) / x))
else
tmp = (x * ((x * (-5.843575199059173d0)) + (y * (-0.0424927283095952d0)))) + (z * (-0.0424927283095952d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -8.0) || !(x <= 2.0)) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x));
} else {
tmp = (x * ((x * -5.843575199059173) + (y * -0.0424927283095952))) + (z * -0.0424927283095952);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -8.0) or not (x <= 2.0): tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x)) else: tmp = (x * ((x * -5.843575199059173) + (y * -0.0424927283095952))) + (z * -0.0424927283095952) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -8.0) || !(x <= 2.0)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(Float64(101.7851458539211 + Float64(Float64(Float64(Float64(124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x))); else tmp = Float64(Float64(x * Float64(Float64(x * -5.843575199059173) + Float64(y * -0.0424927283095952))) + Float64(z * -0.0424927283095952)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -8.0) || ~((x <= 2.0))) tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + ((((124074.40615218398 - y) / x) - 3451.550173699799) / x)) / x)); else tmp = (x * ((x * -5.843575199059173) + (y * -0.0424927283095952))) + (z * -0.0424927283095952); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -8.0], N[Not[LessEqual[x, 2.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(N[(101.7851458539211 + N[(N[(N[(N[(124074.40615218398 - y), $MachinePrecision] / x), $MachinePrecision] - 3451.550173699799), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(x * -5.843575199059173), $MachinePrecision] + N[(y * -0.0424927283095952), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \lor \neg \left(x \leq 2\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{\frac{124074.40615218398 - y}{x} - 3451.550173699799}{x}}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot -5.843575199059173 + y \cdot -0.0424927283095952\right) + z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -8 or 2 < x Initial program 14.5%
associate-/l*22.2%
sub-neg22.2%
metadata-eval22.2%
fma-define22.2%
fma-define22.2%
fma-define22.2%
fma-define22.2%
fma-define22.2%
fma-define22.2%
fma-define22.2%
Simplified22.2%
Taylor expanded in x around -inf 93.0%
mul-1-neg93.0%
unsub-neg93.0%
mul-1-neg93.0%
unsub-neg93.0%
mul-1-neg93.0%
unsub-neg93.0%
mul-1-neg93.0%
unsub-neg93.0%
Simplified93.0%
if -8 < x < 2Initial program 99.6%
Simplified99.3%
Taylor expanded in x around 0 96.6%
Taylor expanded in x around 0 96.6%
Final simplification94.7%
(FPCore (x y z)
:precision binary64
(if (<= x -110000000.0)
(* (+ x -2.0) (- 4.16438922228 (/ 101.7851458539211 x)))
(if (<= x 2.0)
(+
(* x (+ (* x -5.843575199059173) (* y -0.0424927283095952)))
(* z -0.0424927283095952))
(* x (- 4.16438922228 (/ 110.1139242984811 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
} else if (x <= 2.0) {
tmp = (x * ((x * -5.843575199059173) + (y * -0.0424927283095952))) + (z * -0.0424927283095952);
} else {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-110000000.0d0)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 - (101.7851458539211d0 / x))
else if (x <= 2.0d0) then
tmp = (x * ((x * (-5.843575199059173d0)) + (y * (-0.0424927283095952d0)))) + (z * (-0.0424927283095952d0))
else
tmp = x * (4.16438922228d0 - (110.1139242984811d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
} else if (x <= 2.0) {
tmp = (x * ((x * -5.843575199059173) + (y * -0.0424927283095952))) + (z * -0.0424927283095952);
} else {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -110000000.0: tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x)) elif x <= 2.0: tmp = (x * ((x * -5.843575199059173) + (y * -0.0424927283095952))) + (z * -0.0424927283095952) else: tmp = x * (4.16438922228 - (110.1139242984811 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -110000000.0) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(101.7851458539211 / x))); elseif (x <= 2.0) tmp = Float64(Float64(x * Float64(Float64(x * -5.843575199059173) + Float64(y * -0.0424927283095952))) + Float64(z * -0.0424927283095952)); else tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -110000000.0) tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x)); elseif (x <= 2.0) tmp = (x * ((x * -5.843575199059173) + (y * -0.0424927283095952))) + (z * -0.0424927283095952); else tmp = x * (4.16438922228 - (110.1139242984811 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -110000000.0], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(101.7851458539211 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.0], N[(N[(x * N[(N[(x * -5.843575199059173), $MachinePrecision] + N[(y * -0.0424927283095952), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 - N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -110000000:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;x \cdot \left(x \cdot -5.843575199059173 + y \cdot -0.0424927283095952\right) + z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\
\end{array}
\end{array}
if x < -1.1e8Initial program 13.5%
associate-/l*24.1%
sub-neg24.1%
metadata-eval24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
Simplified24.1%
Taylor expanded in x around inf 83.7%
associate-*r/83.7%
metadata-eval83.7%
Simplified83.7%
if -1.1e8 < x < 2Initial program 98.8%
Simplified99.3%
Taylor expanded in x around 0 94.5%
Taylor expanded in x around 0 94.5%
if 2 < x Initial program 13.1%
associate-/l*17.2%
sub-neg17.2%
metadata-eval17.2%
fma-define17.2%
fma-define17.2%
fma-define17.2%
fma-define17.2%
fma-define17.2%
fma-define17.2%
fma-define17.2%
Simplified17.2%
Taylor expanded in x around inf 90.6%
associate-*r/90.6%
metadata-eval90.6%
Simplified90.6%
Final simplification90.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -110000000.0) (not (<= x 6e-7))) (* x (- 4.16438922228 (/ 110.1139242984811 x))) (* -0.0424927283095952 (+ z (* x y)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -110000000.0) || !(x <= 6e-7)) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else {
tmp = -0.0424927283095952 * (z + (x * y));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-110000000.0d0)) .or. (.not. (x <= 6d-7))) then
tmp = x * (4.16438922228d0 - (110.1139242984811d0 / x))
else
tmp = (-0.0424927283095952d0) * (z + (x * y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -110000000.0) || !(x <= 6e-7)) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else {
tmp = -0.0424927283095952 * (z + (x * y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -110000000.0) or not (x <= 6e-7): tmp = x * (4.16438922228 - (110.1139242984811 / x)) else: tmp = -0.0424927283095952 * (z + (x * y)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -110000000.0) || !(x <= 6e-7)) tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 / x))); else tmp = Float64(-0.0424927283095952 * Float64(z + Float64(x * y))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -110000000.0) || ~((x <= 6e-7))) tmp = x * (4.16438922228 - (110.1139242984811 / x)); else tmp = -0.0424927283095952 * (z + (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -110000000.0], N[Not[LessEqual[x, 6e-7]], $MachinePrecision]], N[(x * N[(4.16438922228 - N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.0424927283095952 * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -110000000 \lor \neg \left(x \leq 6 \cdot 10^{-7}\right):\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(z + x \cdot y\right)\\
\end{array}
\end{array}
if x < -1.1e8 or 5.9999999999999997e-7 < x Initial program 14.0%
associate-/l*21.0%
sub-neg21.0%
metadata-eval21.0%
fma-define21.0%
fma-define21.0%
fma-define21.0%
fma-define21.0%
fma-define21.0%
fma-define21.0%
fma-define21.0%
Simplified21.0%
Taylor expanded in x around inf 86.8%
associate-*r/86.8%
metadata-eval86.8%
Simplified86.8%
if -1.1e8 < x < 5.9999999999999997e-7Initial program 98.8%
Simplified99.3%
Taylor expanded in x around 0 94.9%
Taylor expanded in x around 0 89.2%
+-commutative89.2%
distribute-lft-out89.2%
Simplified89.2%
Final simplification87.9%
(FPCore (x y z)
:precision binary64
(if (<= x -110000000.0)
(- (* x 4.16438922228) 8.32877844456)
(if (<= x 6e-7)
(* -0.0424927283095952 (+ z (* x y)))
(* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x * 4.16438922228) - 8.32877844456;
} else if (x <= 6e-7) {
tmp = -0.0424927283095952 * (z + (x * y));
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-110000000.0d0)) then
tmp = (x * 4.16438922228d0) - 8.32877844456d0
else if (x <= 6d-7) then
tmp = (-0.0424927283095952d0) * (z + (x * y))
else
tmp = 4.16438922228d0 * (x + (-2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x * 4.16438922228) - 8.32877844456;
} else if (x <= 6e-7) {
tmp = -0.0424927283095952 * (z + (x * y));
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -110000000.0: tmp = (x * 4.16438922228) - 8.32877844456 elif x <= 6e-7: tmp = -0.0424927283095952 * (z + (x * y)) else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -110000000.0) tmp = Float64(Float64(x * 4.16438922228) - 8.32877844456); elseif (x <= 6e-7) tmp = Float64(-0.0424927283095952 * Float64(z + Float64(x * y))); else tmp = Float64(4.16438922228 * Float64(x + -2.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -110000000.0) tmp = (x * 4.16438922228) - 8.32877844456; elseif (x <= 6e-7) tmp = -0.0424927283095952 * (z + (x * y)); else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -110000000.0], N[(N[(x * 4.16438922228), $MachinePrecision] - 8.32877844456), $MachinePrecision], If[LessEqual[x, 6e-7], N[(-0.0424927283095952 * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -110000000:\\
\;\;\;\;x \cdot 4.16438922228 - 8.32877844456\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-7}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(z + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -1.1e8Initial program 13.5%
associate-/l*24.1%
sub-neg24.1%
metadata-eval24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
Simplified24.1%
Taylor expanded in x around inf 83.5%
Taylor expanded in x around 0 83.5%
if -1.1e8 < x < 5.9999999999999997e-7Initial program 98.8%
Simplified99.3%
Taylor expanded in x around 0 94.9%
Taylor expanded in x around 0 89.2%
+-commutative89.2%
distribute-lft-out89.2%
Simplified89.2%
if 5.9999999999999997e-7 < x Initial program 14.3%
associate-/l*18.3%
sub-neg18.3%
metadata-eval18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
Simplified18.3%
Taylor expanded in x around inf 89.4%
Final simplification87.9%
(FPCore (x y z)
:precision binary64
(if (<= x -110000000.0)
(* (+ x -2.0) (- 4.16438922228 (/ 101.7851458539211 x)))
(if (<= x 6e-7)
(* -0.0424927283095952 (+ z (* x y)))
(* x (- 4.16438922228 (/ 110.1139242984811 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
} else if (x <= 6e-7) {
tmp = -0.0424927283095952 * (z + (x * y));
} else {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-110000000.0d0)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 - (101.7851458539211d0 / x))
else if (x <= 6d-7) then
tmp = (-0.0424927283095952d0) * (z + (x * y))
else
tmp = x * (4.16438922228d0 - (110.1139242984811d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
} else if (x <= 6e-7) {
tmp = -0.0424927283095952 * (z + (x * y));
} else {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -110000000.0: tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x)) elif x <= 6e-7: tmp = -0.0424927283095952 * (z + (x * y)) else: tmp = x * (4.16438922228 - (110.1139242984811 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -110000000.0) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(101.7851458539211 / x))); elseif (x <= 6e-7) tmp = Float64(-0.0424927283095952 * Float64(z + Float64(x * y))); else tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -110000000.0) tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x)); elseif (x <= 6e-7) tmp = -0.0424927283095952 * (z + (x * y)); else tmp = x * (4.16438922228 - (110.1139242984811 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -110000000.0], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(101.7851458539211 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6e-7], N[(-0.0424927283095952 * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 - N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -110000000:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-7}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(z + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\
\end{array}
\end{array}
if x < -1.1e8Initial program 13.5%
associate-/l*24.1%
sub-neg24.1%
metadata-eval24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
Simplified24.1%
Taylor expanded in x around inf 83.7%
associate-*r/83.7%
metadata-eval83.7%
Simplified83.7%
if -1.1e8 < x < 5.9999999999999997e-7Initial program 98.8%
Simplified99.3%
Taylor expanded in x around 0 94.9%
Taylor expanded in x around 0 89.2%
+-commutative89.2%
distribute-lft-out89.2%
Simplified89.2%
if 5.9999999999999997e-7 < x Initial program 14.3%
associate-/l*18.3%
sub-neg18.3%
metadata-eval18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
Simplified18.3%
Taylor expanded in x around inf 89.5%
associate-*r/89.5%
metadata-eval89.5%
Simplified89.5%
Final simplification87.9%
(FPCore (x y z) :precision binary64 (if (or (<= x -110000000.0) (not (<= x 6e-7))) (* 4.16438922228 (+ x -2.0)) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -110000000.0) || !(x <= 6e-7)) {
tmp = 4.16438922228 * (x + -2.0);
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-110000000.0d0)) .or. (.not. (x <= 6d-7))) then
tmp = 4.16438922228d0 * (x + (-2.0d0))
else
tmp = z * (-0.0424927283095952d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -110000000.0) || !(x <= 6e-7)) {
tmp = 4.16438922228 * (x + -2.0);
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -110000000.0) or not (x <= 6e-7): tmp = 4.16438922228 * (x + -2.0) else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -110000000.0) || !(x <= 6e-7)) tmp = Float64(4.16438922228 * Float64(x + -2.0)); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -110000000.0) || ~((x <= 6e-7))) tmp = 4.16438922228 * (x + -2.0); else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -110000000.0], N[Not[LessEqual[x, 6e-7]], $MachinePrecision]], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -110000000 \lor \neg \left(x \leq 6 \cdot 10^{-7}\right):\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -1.1e8 or 5.9999999999999997e-7 < x Initial program 14.0%
associate-/l*21.0%
sub-neg21.0%
metadata-eval21.0%
fma-define21.0%
fma-define21.0%
fma-define21.0%
fma-define21.0%
fma-define21.0%
fma-define21.0%
fma-define21.0%
Simplified21.0%
Taylor expanded in x around inf 86.7%
if -1.1e8 < x < 5.9999999999999997e-7Initial program 98.8%
associate-/l*99.6%
sub-neg99.6%
metadata-eval99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in x around 0 60.6%
*-commutative60.6%
Simplified60.6%
Final simplification74.0%
(FPCore (x y z) :precision binary64 (if (<= x -110000000.0) (- (* x 4.16438922228) 8.32877844456) (if (<= x 6e-7) (* z -0.0424927283095952) (* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x * 4.16438922228) - 8.32877844456;
} else if (x <= 6e-7) {
tmp = z * -0.0424927283095952;
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-110000000.0d0)) then
tmp = (x * 4.16438922228d0) - 8.32877844456d0
else if (x <= 6d-7) then
tmp = z * (-0.0424927283095952d0)
else
tmp = 4.16438922228d0 * (x + (-2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x * 4.16438922228) - 8.32877844456;
} else if (x <= 6e-7) {
tmp = z * -0.0424927283095952;
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -110000000.0: tmp = (x * 4.16438922228) - 8.32877844456 elif x <= 6e-7: tmp = z * -0.0424927283095952 else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -110000000.0) tmp = Float64(Float64(x * 4.16438922228) - 8.32877844456); elseif (x <= 6e-7) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(4.16438922228 * Float64(x + -2.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -110000000.0) tmp = (x * 4.16438922228) - 8.32877844456; elseif (x <= 6e-7) tmp = z * -0.0424927283095952; else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -110000000.0], N[(N[(x * 4.16438922228), $MachinePrecision] - 8.32877844456), $MachinePrecision], If[LessEqual[x, 6e-7], N[(z * -0.0424927283095952), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -110000000:\\
\;\;\;\;x \cdot 4.16438922228 - 8.32877844456\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-7}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -1.1e8Initial program 13.5%
associate-/l*24.1%
sub-neg24.1%
metadata-eval24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
fma-define24.1%
Simplified24.1%
Taylor expanded in x around inf 83.5%
Taylor expanded in x around 0 83.5%
if -1.1e8 < x < 5.9999999999999997e-7Initial program 98.8%
associate-/l*99.6%
sub-neg99.6%
metadata-eval99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in x around 0 60.6%
*-commutative60.6%
Simplified60.6%
if 5.9999999999999997e-7 < x Initial program 14.3%
associate-/l*18.3%
sub-neg18.3%
metadata-eval18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
fma-define18.3%
Simplified18.3%
Taylor expanded in x around inf 89.4%
Final simplification74.0%
(FPCore (x y z) :precision binary64 (if (or (<= x -110000000.0) (not (<= x 2.0))) (* x 4.16438922228) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -110000000.0) || !(x <= 2.0)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-110000000.0d0)) .or. (.not. (x <= 2.0d0))) then
tmp = x * 4.16438922228d0
else
tmp = z * (-0.0424927283095952d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -110000000.0) || !(x <= 2.0)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -110000000.0) or not (x <= 2.0): tmp = x * 4.16438922228 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -110000000.0) || !(x <= 2.0)) tmp = Float64(x * 4.16438922228); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -110000000.0) || ~((x <= 2.0))) tmp = x * 4.16438922228; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -110000000.0], N[Not[LessEqual[x, 2.0]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -110000000 \lor \neg \left(x \leq 2\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -1.1e8 or 2 < x Initial program 13.3%
associate-/l*20.4%
sub-neg20.4%
metadata-eval20.4%
fma-define20.4%
fma-define20.4%
fma-define20.4%
fma-define20.4%
fma-define20.4%
fma-define20.4%
fma-define20.4%
Simplified20.4%
Taylor expanded in z around 0 20.4%
Taylor expanded in x around inf 91.7%
Taylor expanded in x around inf 87.2%
if -1.1e8 < x < 2Initial program 98.8%
associate-/l*99.6%
sub-neg99.6%
metadata-eval99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in x around 0 60.1%
*-commutative60.1%
Simplified60.1%
Final simplification74.0%
(FPCore (x y z) :precision binary64 (* x 4.16438922228))
double code(double x, double y, double z) {
return x * 4.16438922228;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * 4.16438922228d0
end function
public static double code(double x, double y, double z) {
return x * 4.16438922228;
}
def code(x, y, z): return x * 4.16438922228
function code(x, y, z) return Float64(x * 4.16438922228) end
function tmp = code(x, y, z) tmp = x * 4.16438922228; end
code[x_, y_, z_] := N[(x * 4.16438922228), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 4.16438922228
\end{array}
Initial program 55.1%
associate-/l*59.1%
sub-neg59.1%
metadata-eval59.1%
fma-define59.1%
fma-define59.1%
fma-define59.1%
fma-define59.1%
fma-define59.1%
fma-define59.1%
fma-define59.1%
Simplified59.1%
Taylor expanded in z around 0 59.1%
Taylor expanded in x around inf 70.8%
Taylor expanded in x around inf 46.3%
Final simplification46.3%
(FPCore (x y z) :precision binary64 -8.32877844456)
double code(double x, double y, double z) {
return -8.32877844456;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = -8.32877844456d0
end function
public static double code(double x, double y, double z) {
return -8.32877844456;
}
def code(x, y, z): return -8.32877844456
function code(x, y, z) return -8.32877844456 end
function tmp = code(x, y, z) tmp = -8.32877844456; end
code[x_, y_, z_] := -8.32877844456
\begin{array}{l}
\\
-8.32877844456
\end{array}
Initial program 55.1%
associate-/l*59.1%
sub-neg59.1%
metadata-eval59.1%
fma-define59.1%
fma-define59.1%
fma-define59.1%
fma-define59.1%
fma-define59.1%
fma-define59.1%
fma-define59.1%
Simplified59.1%
Taylor expanded in x around inf 46.8%
Taylor expanded in x around 0 3.6%
Final simplification3.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(if (< x -3.326128725870005e+62)
t_0
(if (< x 9.429991714554673e+55)
(*
(/ (- x 2.0) 1.0)
(/
(+
(*
(+
(* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x)
y)
x)
z)
(+
(*
(+
(+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x))))
313.399215894)
x)
47.066876606)))
t_0))))
double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((y / (x * x)) + (4.16438922228d0 * x)) - 110.1139242984811d0
if (x < (-3.326128725870005d+62)) then
tmp = t_0
else if (x < 9.429991714554673d+55) then
tmp = ((x - 2.0d0) / 1.0d0) * (((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z) / (((((263.505074721d0 * x) + ((43.3400022514d0 * (x * x)) + (x * (x * x)))) + 313.399215894d0) * x) + 47.066876606d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811 tmp = 0 if x < -3.326128725870005e+62: tmp = t_0 elif x < 9.429991714554673e+55: tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y / Float64(x * x)) + Float64(4.16438922228 * x)) - 110.1139242984811) tmp = 0.0 if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = Float64(Float64(Float64(x - 2.0) / 1.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / Float64(Float64(Float64(Float64(Float64(263.505074721 * x) + Float64(Float64(43.3400022514 * Float64(x * x)) + Float64(x * Float64(x * x)))) + 313.399215894) * x) + 47.066876606))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811; tmp = 0.0; if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(4.16438922228 * x), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]}, If[Less[x, -3.326128725870005e+62], t$95$0, If[Less[x, 9.429991714554673e+55], N[(N[(N[(x - 2.0), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision] / N[(N[(N[(N[(N[(263.505074721 * x), $MachinePrecision] + N[(N[(43.3400022514 * N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\
\mathbf{if}\;x < -3.326128725870005 \cdot 10^{+62}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x < 9.429991714554673 \cdot 10^{+55}:\\
\;\;\;\;\frac{x - 2}{1} \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(263.505074721 \cdot x + \left(43.3400022514 \cdot \left(x \cdot x\right) + x \cdot \left(x \cdot x\right)\right)\right) + 313.399215894\right) \cdot x + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
herbie shell --seed 2024054
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
:precision binary64
:alt
(if (< x -3.326128725870005e+62) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811) (if (< x 9.429991714554673e+55) (* (/ (- x 2.0) 1.0) (/ (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z) (+ (* (+ (+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x)))) 313.399215894) x) 47.066876606))) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(/ (* (- x 2.0) (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z)) (+ (* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x) 47.066876606)))