
(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 22 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
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
t_0)))
(if (<= t_1 (- INFINITY))
(/
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(* (pow x 2.0) (+ x 45.3400022514)))
(if (<= t_1 2e+302)
(/
(*
(- x 2.0)
(+
z
(*
x
(+
y
(*
x
(+
137.519416416
(*
x
(+ 78.6994924154 (cbrt (* (pow x 3.0) 72.2194108904232))))))))))
t_0)
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811)))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / (pow(x, 2.0) * (x + 45.3400022514));
} else if (t_1 <= 2e+302) {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * (78.6994924154 + cbrt((pow(x, 3.0) * 72.2194108904232)))))))))) / t_0;
} else {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / Float64((x ^ 2.0) * Float64(x + 45.3400022514))); elseif (t_1 <= 2e+302) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + cbrt(Float64((x ^ 3.0) * 72.2194108904232)))))))))) / t_0); else tmp = Float64(Float64(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] / N[(N[Power[x, 2.0], $MachinePrecision] * N[(x + 45.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+302], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[Power[N[(N[Power[x, 3.0], $MachinePrecision] * 72.2194108904232), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{t_0}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{{x}^{2} \cdot \left(x + 45.3400022514\right)}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+302}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + \sqrt[3]{{x}^{3} \cdot 72.2194108904232}\right)\right)\right)\right)}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811\\
\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 4.6%
Simplified78.3%
Taylor expanded in x around inf 78.1%
+-commutative78.1%
cube-mult78.3%
unpow278.3%
distribute-rgt-out78.3%
Simplified78.3%
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)) < 2.0000000000000002e302Initial program 99.6%
add-cbrt-cube99.6%
pow1/376.1%
pow376.1%
unpow-prod-down76.1%
metadata-eval76.1%
Applied egg-rr76.1%
unpow1/399.6%
Simplified99.6%
if 2.0000000000000002e302 < (/.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.1%
sub-neg0.1%
metadata-eval0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
Simplified0.1%
Taylor expanded in x around -inf 99.1%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
2e+302)
(*
(/
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606))
(+ x -2.0))
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811)))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 2e+302) {
tmp = (fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606)) * (x + -2.0);
} else {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 2e+302) tmp = Float64(Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606)) * Float64(x + -2.0)); else tmp = Float64(Float64(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], 2e+302], N[(N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] / N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision] * N[(x + -2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq 2 \cdot 10^{+302}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)} \cdot \left(x + -2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811\\
\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)) < 2.0000000000000002e302Initial program 94.0%
Simplified98.3%
associate-/r/98.3%
Applied egg-rr98.3%
if 2.0000000000000002e302 < (/.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.1%
sub-neg0.1%
metadata-eval0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
Simplified0.1%
Taylor expanded in x around -inf 99.1%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
t_0)))
(if (<= t_1 (- INFINITY))
(*
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(/ 1.0 (pow x 3.0)))
(if (<= t_1 2e+302)
(/
(*
(- x 2.0)
(+
z
(*
x
(+
y
(*
x
(+
137.519416416
(*
x
(+ 78.6994924154 (cbrt (* (pow x 3.0) 72.2194108904232))))))))))
t_0)
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811)))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) * (1.0 / pow(x, 3.0));
} else if (t_1 <= 2e+302) {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * (78.6994924154 + cbrt((pow(x, 3.0) * 72.2194108904232)))))))))) / t_0;
} else {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) * Float64(1.0 / (x ^ 3.0))); elseif (t_1 <= 2e+302) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + cbrt(Float64((x ^ 3.0) * 72.2194108904232)))))))))) / t_0); else tmp = Float64(Float64(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] * N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+302], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[Power[N[(N[Power[x, 3.0], $MachinePrecision] * 72.2194108904232), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{t_0}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \frac{1}{{x}^{3}}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+302}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + \sqrt[3]{{x}^{3} \cdot 72.2194108904232}\right)\right)\right)\right)}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811\\
\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 4.6%
Simplified78.3%
div-inv78.4%
Applied egg-rr78.4%
Taylor expanded in x around inf 78.2%
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)) < 2.0000000000000002e302Initial program 99.6%
add-cbrt-cube99.6%
pow1/376.1%
pow376.1%
unpow-prod-down76.1%
metadata-eval76.1%
Applied egg-rr76.1%
unpow1/399.6%
Simplified99.6%
if 2.0000000000000002e302 < (/.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.1%
sub-neg0.1%
metadata-eval0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
Simplified0.1%
Taylor expanded in x around -inf 99.1%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
t_0)))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+302)))
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811)
(/
(*
(- x 2.0)
(+
z
(*
x
(+
y
(*
x
(+
137.519416416
(*
x
(+ 78.6994924154 (cbrt (* (pow x 3.0) 72.2194108904232))))))))))
t_0))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+302)) {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * (78.6994924154 + cbrt((pow(x, 3.0) * 72.2194108904232)))))))))) / t_0;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+302)) {
tmp = (((y - 130977.50649958357) / Math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * (78.6994924154 + Math.cbrt((Math.pow(x, 3.0) * 72.2194108904232)))))))))) / t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+302)) tmp = Float64(Float64(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + cbrt(Float64((x ^ 3.0) * 72.2194108904232)))))))))) / t_0); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+302]], $MachinePrecision]], N[(N[(N[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[Power[N[(N[Power[x, 3.0], $MachinePrecision] * 72.2194108904232), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{t_0}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+302}\right):\\
\;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + \sqrt[3]{{x}^{3} \cdot 72.2194108904232}\right)\right)\right)\right)}{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 2.0000000000000002e302 < (/.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.4%
sub-neg0.4%
metadata-eval0.4%
fma-def0.4%
fma-def0.4%
fma-def0.4%
fma-def0.4%
fma-def0.4%
fma-def0.4%
fma-def0.4%
Simplified0.4%
Taylor expanded in x around -inf 96.6%
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)) < 2.0000000000000002e302Initial program 99.6%
add-cbrt-cube99.6%
pow1/376.1%
pow376.1%
unpow-prod-down76.1%
metadata-eval76.1%
Applied egg-rr76.1%
unpow1/399.6%
Simplified99.6%
Final simplification98.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+
(* x (+ (* x (+ x 43.3400022514)) 263.505074721))
313.399215894))
47.066876606))))
(if (or (<= t_0 (- INFINITY)) (not (<= t_0 2e+302)))
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811)
t_0)))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if ((t_0 <= -((double) INFINITY)) || !(t_0 <= 2e+302)) {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if ((t_0 <= -Double.POSITIVE_INFINITY) || !(t_0 <= 2e+302)) {
tmp = (((y - 130977.50649958357) / Math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0 if (t_0 <= -math.inf) or not (t_0 <= 2e+302): tmp = (((y - 130977.50649958357) / math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) tmp = 0.0 if ((t_0 <= Float64(-Inf)) || !(t_0 <= 2e+302)) tmp = Float64(Float64(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); tmp = 0.0; if ((t_0 <= -Inf) || ~((t_0 <= 2e+302))) tmp = (((y - 130977.50649958357) / (x ^ 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811; 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[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, (-Infinity)], N[Not[LessEqual[t$95$0, 2e+302]], $MachinePrecision]], N[(N[(N[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{if}\;t_0 \leq -\infty \lor \neg \left(t_0 \leq 2 \cdot 10^{+302}\right):\\
\;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811\\
\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 2.0000000000000002e302 < (/.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.4%
sub-neg0.4%
metadata-eval0.4%
fma-def0.4%
fma-def0.4%
fma-def0.4%
fma-def0.4%
fma-def0.4%
fma-def0.4%
fma-def0.4%
Simplified0.4%
Taylor expanded in x around -inf 96.6%
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)) < 2.0000000000000002e302Initial program 99.6%
Final simplification98.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y)))
(if (<= (/ (* (- x 2.0) (+ (* x t_1) z)) t_0) 2e+302)
(+
(* z (+ (/ x t_0) (* 2.0 (/ -1.0 t_0))))
(/ (* x (* (- x 2.0) t_1)) t_0))
(* x 4.16438922228))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
double tmp;
if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 2e+302) {
tmp = (z * ((x / t_0) + (2.0 * (-1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
} else {
tmp = x * 4.16438922228;
}
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) :: t_1
real(8) :: tmp
t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
t_1 = (x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y
if ((((x - 2.0d0) * ((x * t_1) + z)) / t_0) <= 2d+302) then
tmp = (z * ((x / t_0) + (2.0d0 * ((-1.0d0) / t_0)))) + ((x * ((x - 2.0d0) * t_1)) / t_0)
else
tmp = x * 4.16438922228d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
double tmp;
if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 2e+302) {
tmp = (z * ((x / t_0) + (2.0 * (-1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y tmp = 0 if (((x - 2.0) * ((x * t_1) + z)) / t_0) <= 2e+302: tmp = (z * ((x / t_0) + (2.0 * (-1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0) else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * t_1) + z)) / t_0) <= 2e+302) tmp = Float64(Float64(z * Float64(Float64(x / t_0) + Float64(2.0 * Float64(-1.0 / t_0)))) + Float64(Float64(x * Float64(Float64(x - 2.0) * t_1)) / t_0)); else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y; tmp = 0.0; if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 2e+302) tmp = (z * ((x / t_0) + (2.0 * (-1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0); else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * t$95$1), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 2e+302], N[(N[(z * N[(N[(x / t$95$0), $MachinePrecision] + N[(2.0 * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[(N[(x - 2.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot t_1 + z\right)}{t_0} \leq 2 \cdot 10^{+302}:\\
\;\;\;\;z \cdot \left(\frac{x}{t_0} + 2 \cdot \frac{-1}{t_0}\right) + \frac{x \cdot \left(\left(x - 2\right) \cdot t_1\right)}{t_0}\\
\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)) < 2.0000000000000002e302Initial program 94.0%
sub-neg94.0%
metadata-eval94.0%
fma-def94.0%
fma-def94.0%
fma-def94.0%
fma-def94.0%
fma-def94.0%
fma-def93.9%
fma-def94.0%
Simplified94.0%
Taylor expanded in z around 0 94.4%
if 2.0000000000000002e302 < (/.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.1%
sub-neg0.1%
metadata-eval0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
Simplified0.1%
Taylor expanded in x around inf 97.2%
*-commutative97.2%
Simplified97.2%
Final simplification95.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+
(* x (+ (* x (+ x 43.3400022514)) 263.505074721))
313.399215894))
47.066876606))))
(if (<= t_0 2e+302) t_0 (* x 4.16438922228))))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 2e+302) {
tmp = t_0;
} else {
tmp = x * 4.16438922228;
}
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 = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
if (t_0 <= 2d+302) then
tmp = t_0
else
tmp = x * 4.16438922228d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 2e+302) {
tmp = t_0;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0 if t_0 <= 2e+302: tmp = t_0 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) tmp = 0.0 if (t_0 <= 2e+302) tmp = t_0; else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); tmp = 0.0; if (t_0 <= 2e+302) tmp = t_0; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e+302], t$95$0, N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{if}\;t_0 \leq 2 \cdot 10^{+302}:\\
\;\;\;\;t_0\\
\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)) < 2.0000000000000002e302Initial program 94.0%
if 2.0000000000000002e302 < (/.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.1%
sub-neg0.1%
metadata-eval0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
Simplified0.1%
Taylor expanded in x around inf 97.2%
*-commutative97.2%
Simplified97.2%
Final simplification95.3%
(FPCore (x y z)
:precision binary64
(if (<= x -880000000000.0)
(* (+ x -2.0) (- 4.16438922228 (/ 101.7851458539211 x)))
(if (<= x 2.4e+48)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(* x 4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if (x <= -880000000000.0) {
tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
} else if (x <= 2.4e+48) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = x * 4.16438922228;
}
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 <= (-880000000000.0d0)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 - (101.7851458539211d0 / x))
else if (x <= 2.4d+48) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
else
tmp = x * 4.16438922228d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -880000000000.0) {
tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
} else if (x <= 2.4e+48) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -880000000000.0: tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x)) elif x <= 2.4e+48: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -880000000000.0) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(101.7851458539211 / x))); elseif (x <= 2.4e+48) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -880000000000.0) tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x)); elseif (x <= 2.4e+48) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -880000000000.0], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(101.7851458539211 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4e+48], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -880000000000:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{+48}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -8.8e11Initial program 16.9%
Simplified24.9%
associate-/r/24.8%
Applied egg-rr24.8%
Taylor expanded in x around inf 91.0%
associate-*r/91.0%
metadata-eval91.0%
Simplified91.0%
if -8.8e11 < x < 2.4000000000000001e48Initial program 98.3%
Taylor expanded in x around 0 95.8%
*-commutative95.8%
Simplified95.8%
if 2.4000000000000001e48 < x Initial program 1.7%
sub-neg1.7%
metadata-eval1.7%
fma-def1.7%
fma-def1.7%
fma-def1.7%
fma-def1.7%
fma-def1.7%
fma-def1.7%
fma-def1.7%
Simplified1.7%
Taylor expanded in x around inf 95.9%
*-commutative95.9%
Simplified95.9%
Final simplification94.7%
(FPCore (x y z)
:precision binary64
(if (<= x -4200.0)
(-
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
110.1139242984811)
(if (<= x 1.06e+18)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))
(* x 4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if (x <= -4200.0) {
tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811;
} else if (x <= 1.06e+18) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else {
tmp = x * 4.16438922228;
}
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 <= (-4200.0d0)) then
tmp = ((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - 110.1139242984811d0
else if (x <= 1.06d+18) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
else
tmp = x * 4.16438922228d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -4200.0) {
tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811;
} else if (x <= 1.06e+18) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4200.0: tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811 elif x <= 1.06e+18: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4200.0) tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - 110.1139242984811); elseif (x <= 1.06e+18) 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))))); else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -4200.0) tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811; elseif (x <= 1.06e+18) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4200.0], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 1.06e+18], 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], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4200:\\
\;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\
\mathbf{elif}\;x \leq 1.06 \cdot 10^{+18}:\\
\;\;\;\;\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)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -4200Initial program 22.1%
sub-neg22.1%
metadata-eval22.1%
fma-def22.1%
fma-def22.1%
fma-def22.1%
fma-def22.1%
fma-def22.1%
fma-def22.1%
fma-def22.1%
Simplified22.1%
Taylor expanded in x around inf 86.2%
if -4200 < x < 1.06e18Initial program 99.7%
Taylor expanded in x around 0 98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in x around 0 96.0%
*-commutative96.0%
Simplified96.0%
if 1.06e18 < x Initial program 6.2%
sub-neg6.2%
metadata-eval6.2%
fma-def6.2%
fma-def6.2%
fma-def6.2%
fma-def6.2%
fma-def6.2%
fma-def6.2%
fma-def6.2%
Simplified6.2%
Taylor expanded in x around inf 90.3%
*-commutative90.3%
Simplified90.3%
Final simplification92.1%
(FPCore (x y z)
:precision binary64
(if (<= x -36.0)
(-
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
110.1139242984811)
(if (<= x 1.06e+18)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x 313.399215894)))
(* x 4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if (x <= -36.0) {
tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811;
} else if (x <= 1.06e+18) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
} else {
tmp = x * 4.16438922228;
}
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 <= (-36.0d0)) then
tmp = ((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - 110.1139242984811d0
else if (x <= 1.06d+18) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * 313.399215894d0))
else
tmp = x * 4.16438922228d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -36.0) {
tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811;
} else if (x <= 1.06e+18) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -36.0: tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811 elif x <= 1.06e+18: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)) else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -36.0) tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - 110.1139242984811); elseif (x <= 1.06e+18) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * 313.399215894))); else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -36.0) tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811; elseif (x <= 1.06e+18) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)); else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -36.0], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 1.06e+18], 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 * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -36:\\
\;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\
\mathbf{elif}\;x \leq 1.06 \cdot 10^{+18}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot 313.399215894}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -36Initial program 22.1%
sub-neg22.1%
metadata-eval22.1%
fma-def22.1%
fma-def22.1%
fma-def22.1%
fma-def22.1%
fma-def22.1%
fma-def22.1%
fma-def22.1%
Simplified22.1%
Taylor expanded in x around inf 86.2%
if -36 < x < 1.06e18Initial program 99.7%
Taylor expanded in x around 0 98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in x around 0 95.3%
*-commutative95.3%
Simplified95.3%
if 1.06e18 < x Initial program 6.2%
sub-neg6.2%
metadata-eval6.2%
fma-def6.2%
fma-def6.2%
fma-def6.2%
fma-def6.2%
fma-def6.2%
fma-def6.2%
fma-def6.2%
Simplified6.2%
Taylor expanded in x around inf 90.3%
*-commutative90.3%
Simplified90.3%
Final simplification91.7%
(FPCore (x y z)
:precision binary64
(if (<= x -0.175)
(-
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
110.1139242984811)
(if (<= x 4.4)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))
(* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.175) {
tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811;
} else if (x <= 4.4) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} 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 <= (-0.175d0)) then
tmp = ((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - 110.1139242984811d0
else if (x <= 4.4d0) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
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 <= -0.175) {
tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811;
} else if (x <= 4.4) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.175: tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811 elif x <= 4.4: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.175) tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - 110.1139242984811); elseif (x <= 4.4) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(x * Float64(Float64(y * 0.0212463641547976) - Float64(z * 0.14147091005106402))))); 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 <= -0.175) tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811; elseif (x <= 4.4) tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.175], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 4.4], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(x * N[(N[(y * 0.0212463641547976), $MachinePrecision] - N[(z * 0.14147091005106402), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.175:\\
\;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\
\mathbf{elif}\;x \leq 4.4:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + x \cdot \left(y \cdot 0.0212463641547976 - z \cdot 0.14147091005106402\right)\right)\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -0.17499999999999999Initial program 23.3%
sub-neg23.3%
metadata-eval23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
Simplified23.3%
Taylor expanded in x around inf 85.0%
if -0.17499999999999999 < x < 4.4000000000000004Initial program 99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 93.3%
if 4.4000000000000004 < x Initial program 10.3%
Simplified14.4%
associate-/r/14.4%
Applied egg-rr14.4%
Taylor expanded in x around inf 86.8%
Final simplification89.4%
(FPCore (x y z)
:precision binary64
(if (<= x -0.19)
(* (+ x -2.0) (- 4.16438922228 (/ 101.7851458539211 x)))
(if (<= x 18.0)
(* (+ x -2.0) (* 0.0212463641547976 (+ z (* x y))))
(* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.19) {
tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
} else if (x <= 18.0) {
tmp = (x + -2.0) * (0.0212463641547976 * (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 <= (-0.19d0)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 - (101.7851458539211d0 / x))
else if (x <= 18.0d0) then
tmp = (x + (-2.0d0)) * (0.0212463641547976d0 * (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 <= -0.19) {
tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
} else if (x <= 18.0) {
tmp = (x + -2.0) * (0.0212463641547976 * (z + (x * y)));
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.19: tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x)) elif x <= 18.0: tmp = (x + -2.0) * (0.0212463641547976 * (z + (x * y))) else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.19) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(101.7851458539211 / x))); elseif (x <= 18.0) tmp = Float64(Float64(x + -2.0) * Float64(0.0212463641547976 * 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 <= -0.19) tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x)); elseif (x <= 18.0) tmp = (x + -2.0) * (0.0212463641547976 * (z + (x * y))); else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.19], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(101.7851458539211 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 18.0], N[(N[(x + -2.0), $MachinePrecision] * N[(0.0212463641547976 * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.19:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 18:\\
\;\;\;\;\left(x + -2\right) \cdot \left(0.0212463641547976 \cdot \left(z + x \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -0.19Initial program 23.3%
Simplified30.6%
associate-/r/30.6%
Applied egg-rr30.6%
Taylor expanded in x around inf 84.9%
associate-*r/84.9%
metadata-eval84.9%
Simplified84.9%
if -0.19 < x < 18Initial program 99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 93.3%
Taylor expanded in y around inf 92.5%
expm1-log1p-u57.6%
expm1-udef32.7%
distribute-lft-out32.7%
Applied egg-rr32.7%
expm1-def57.6%
expm1-log1p92.5%
Simplified92.5%
if 18 < x Initial program 10.3%
Simplified14.4%
associate-/r/14.4%
Applied egg-rr14.4%
Taylor expanded in x around inf 86.8%
Final simplification89.0%
(FPCore (x y z)
:precision binary64
(if (<= x -0.175)
(-
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
110.1139242984811)
(if (<= x 18.0)
(* (+ x -2.0) (* 0.0212463641547976 (+ z (* x y))))
(* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.175) {
tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811;
} else if (x <= 18.0) {
tmp = (x + -2.0) * (0.0212463641547976 * (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 <= (-0.175d0)) then
tmp = ((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - 110.1139242984811d0
else if (x <= 18.0d0) then
tmp = (x + (-2.0d0)) * (0.0212463641547976d0 * (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 <= -0.175) {
tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811;
} else if (x <= 18.0) {
tmp = (x + -2.0) * (0.0212463641547976 * (z + (x * y)));
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.175: tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811 elif x <= 18.0: tmp = (x + -2.0) * (0.0212463641547976 * (z + (x * y))) else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.175) tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - 110.1139242984811); elseif (x <= 18.0) tmp = Float64(Float64(x + -2.0) * Float64(0.0212463641547976 * 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 <= -0.175) tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811; elseif (x <= 18.0) tmp = (x + -2.0) * (0.0212463641547976 * (z + (x * y))); else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.175], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 18.0], N[(N[(x + -2.0), $MachinePrecision] * N[(0.0212463641547976 * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.175:\\
\;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\
\mathbf{elif}\;x \leq 18:\\
\;\;\;\;\left(x + -2\right) \cdot \left(0.0212463641547976 \cdot \left(z + x \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -0.17499999999999999Initial program 23.3%
sub-neg23.3%
metadata-eval23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
Simplified23.3%
Taylor expanded in x around inf 85.0%
if -0.17499999999999999 < x < 18Initial program 99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 93.3%
Taylor expanded in y around inf 92.5%
expm1-log1p-u57.6%
expm1-udef32.7%
distribute-lft-out32.7%
Applied egg-rr32.7%
expm1-def57.6%
expm1-log1p92.5%
Simplified92.5%
if 18 < x Initial program 10.3%
Simplified14.4%
associate-/r/14.4%
Applied egg-rr14.4%
Taylor expanded in x around inf 86.8%
Final simplification89.1%
(FPCore (x y z)
:precision binary64
(if (<= x -4.4e-6)
(* x 4.16438922228)
(if (<= x 1.2e-60)
(* z -0.0424927283095952)
(if (<= x 2.0) (* (* x y) -0.0424927283095952) (* x 4.16438922228)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -4.4e-6) {
tmp = x * 4.16438922228;
} else if (x <= 1.2e-60) {
tmp = z * -0.0424927283095952;
} else if (x <= 2.0) {
tmp = (x * y) * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
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 <= (-4.4d-6)) then
tmp = x * 4.16438922228d0
else if (x <= 1.2d-60) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 2.0d0) then
tmp = (x * y) * (-0.0424927283095952d0)
else
tmp = x * 4.16438922228d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -4.4e-6) {
tmp = x * 4.16438922228;
} else if (x <= 1.2e-60) {
tmp = z * -0.0424927283095952;
} else if (x <= 2.0) {
tmp = (x * y) * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4.4e-6: tmp = x * 4.16438922228 elif x <= 1.2e-60: tmp = z * -0.0424927283095952 elif x <= 2.0: tmp = (x * y) * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4.4e-6) tmp = Float64(x * 4.16438922228); elseif (x <= 1.2e-60) tmp = Float64(z * -0.0424927283095952); elseif (x <= 2.0) tmp = Float64(Float64(x * y) * -0.0424927283095952); else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -4.4e-6) tmp = x * 4.16438922228; elseif (x <= 1.2e-60) tmp = z * -0.0424927283095952; elseif (x <= 2.0) tmp = (x * y) * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4.4e-6], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 1.2e-60], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 2.0], N[(N[(x * y), $MachinePrecision] * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{-6}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-60}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;\left(x \cdot y\right) \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -4.4000000000000002e-6 or 2 < x Initial program 17.2%
sub-neg17.2%
metadata-eval17.2%
fma-def17.2%
fma-def17.2%
fma-def17.2%
fma-def17.2%
fma-def17.2%
fma-def17.2%
fma-def17.2%
Simplified17.2%
Taylor expanded in x around inf 84.8%
*-commutative84.8%
Simplified84.8%
if -4.4000000000000002e-6 < x < 1.20000000000000005e-60Initial program 99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in x around 0 70.4%
if 1.20000000000000005e-60 < x < 2Initial program 99.9%
Taylor expanded in x around 0 95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in z around 0 64.5%
Taylor expanded in x around 0 62.4%
Final simplification77.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 4.16438922228 (+ x -2.0))))
(if (<= x -4.4e-6)
t_0
(if (<= x 1.15e-61)
(* z -0.0424927283095952)
(if (<= x 1.55) (* (* x y) -0.0424927283095952) t_0)))))
double code(double x, double y, double z) {
double t_0 = 4.16438922228 * (x + -2.0);
double tmp;
if (x <= -4.4e-6) {
tmp = t_0;
} else if (x <= 1.15e-61) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.55) {
tmp = (x * y) * -0.0424927283095952;
} 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 = 4.16438922228d0 * (x + (-2.0d0))
if (x <= (-4.4d-6)) then
tmp = t_0
else if (x <= 1.15d-61) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 1.55d0) then
tmp = (x * y) * (-0.0424927283095952d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 4.16438922228 * (x + -2.0);
double tmp;
if (x <= -4.4e-6) {
tmp = t_0;
} else if (x <= 1.15e-61) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.55) {
tmp = (x * y) * -0.0424927283095952;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 4.16438922228 * (x + -2.0) tmp = 0 if x <= -4.4e-6: tmp = t_0 elif x <= 1.15e-61: tmp = z * -0.0424927283095952 elif x <= 1.55: tmp = (x * y) * -0.0424927283095952 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(4.16438922228 * Float64(x + -2.0)) tmp = 0.0 if (x <= -4.4e-6) tmp = t_0; elseif (x <= 1.15e-61) tmp = Float64(z * -0.0424927283095952); elseif (x <= 1.55) tmp = Float64(Float64(x * y) * -0.0424927283095952); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 4.16438922228 * (x + -2.0); tmp = 0.0; if (x <= -4.4e-6) tmp = t_0; elseif (x <= 1.15e-61) tmp = z * -0.0424927283095952; elseif (x <= 1.55) tmp = (x * y) * -0.0424927283095952; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.4e-6], t$95$0, If[LessEqual[x, 1.15e-61], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 1.55], N[(N[(x * y), $MachinePrecision] * -0.0424927283095952), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 4.16438922228 \cdot \left(x + -2\right)\\
\mathbf{if}\;x \leq -4.4 \cdot 10^{-6}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-61}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 1.55:\\
\;\;\;\;\left(x \cdot y\right) \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -4.4000000000000002e-6 or 1.55000000000000004 < x Initial program 17.2%
Simplified22.8%
associate-/r/22.8%
Applied egg-rr22.8%
Taylor expanded in x around inf 84.8%
if -4.4000000000000002e-6 < x < 1.14999999999999996e-61Initial program 99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in x around 0 70.4%
if 1.14999999999999996e-61 < x < 1.55000000000000004Initial program 99.9%
Taylor expanded in x around 0 95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in z around 0 64.5%
Taylor expanded in x around 0 62.4%
Final simplification77.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 4.16438922228 (+ x -2.0))))
(if (<= x -4.4e-6)
t_0
(if (<= x 1.2e-60)
(* z -0.0424927283095952)
(if (<= x 1.45) (* y (* x -0.0424927283095952)) t_0)))))
double code(double x, double y, double z) {
double t_0 = 4.16438922228 * (x + -2.0);
double tmp;
if (x <= -4.4e-6) {
tmp = t_0;
} else if (x <= 1.2e-60) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.45) {
tmp = y * (x * -0.0424927283095952);
} 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 = 4.16438922228d0 * (x + (-2.0d0))
if (x <= (-4.4d-6)) then
tmp = t_0
else if (x <= 1.2d-60) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 1.45d0) then
tmp = y * (x * (-0.0424927283095952d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 4.16438922228 * (x + -2.0);
double tmp;
if (x <= -4.4e-6) {
tmp = t_0;
} else if (x <= 1.2e-60) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.45) {
tmp = y * (x * -0.0424927283095952);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 4.16438922228 * (x + -2.0) tmp = 0 if x <= -4.4e-6: tmp = t_0 elif x <= 1.2e-60: tmp = z * -0.0424927283095952 elif x <= 1.45: tmp = y * (x * -0.0424927283095952) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(4.16438922228 * Float64(x + -2.0)) tmp = 0.0 if (x <= -4.4e-6) tmp = t_0; elseif (x <= 1.2e-60) tmp = Float64(z * -0.0424927283095952); elseif (x <= 1.45) tmp = Float64(y * Float64(x * -0.0424927283095952)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 4.16438922228 * (x + -2.0); tmp = 0.0; if (x <= -4.4e-6) tmp = t_0; elseif (x <= 1.2e-60) tmp = z * -0.0424927283095952; elseif (x <= 1.45) tmp = y * (x * -0.0424927283095952); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.4e-6], t$95$0, If[LessEqual[x, 1.2e-60], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 1.45], N[(y * N[(x * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 4.16438922228 \cdot \left(x + -2\right)\\
\mathbf{if}\;x \leq -4.4 \cdot 10^{-6}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-60}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 1.45:\\
\;\;\;\;y \cdot \left(x \cdot -0.0424927283095952\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -4.4000000000000002e-6 or 1.44999999999999996 < x Initial program 17.2%
Simplified22.8%
associate-/r/22.8%
Applied egg-rr22.8%
Taylor expanded in x around inf 84.8%
if -4.4000000000000002e-6 < x < 1.20000000000000005e-60Initial program 99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in x around 0 70.4%
if 1.20000000000000005e-60 < x < 1.44999999999999996Initial program 99.9%
Taylor expanded in x around 0 95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in z around 0 64.5%
Taylor expanded in x around 0 62.4%
associate-*r*62.6%
Simplified62.6%
Final simplification77.6%
(FPCore (x y z)
:precision binary64
(if (<= x -4.4e-6)
(- (* x 4.16438922228) 110.1139242984811)
(if (<= x 1.5e-60)
(* z -0.0424927283095952)
(if (<= x 1.75)
(* y (* x -0.0424927283095952))
(* 4.16438922228 (+ x -2.0))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -4.4e-6) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 1.5e-60) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.75) {
tmp = y * (x * -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 <= (-4.4d-6)) then
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
else if (x <= 1.5d-60) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 1.75d0) then
tmp = y * (x * (-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 <= -4.4e-6) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 1.5e-60) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.75) {
tmp = y * (x * -0.0424927283095952);
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4.4e-6: tmp = (x * 4.16438922228) - 110.1139242984811 elif x <= 1.5e-60: tmp = z * -0.0424927283095952 elif x <= 1.75: tmp = y * (x * -0.0424927283095952) else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4.4e-6) tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); elseif (x <= 1.5e-60) tmp = Float64(z * -0.0424927283095952); elseif (x <= 1.75) tmp = Float64(y * Float64(x * -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 <= -4.4e-6) tmp = (x * 4.16438922228) - 110.1139242984811; elseif (x <= 1.5e-60) tmp = z * -0.0424927283095952; elseif (x <= 1.75) tmp = y * (x * -0.0424927283095952); else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4.4e-6], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 1.5e-60], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 1.75], N[(y * N[(x * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{-6}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{-60}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 1.75:\\
\;\;\;\;y \cdot \left(x \cdot -0.0424927283095952\right)\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -4.4000000000000002e-6Initial program 24.4%
sub-neg24.4%
metadata-eval24.4%
fma-def24.4%
fma-def24.4%
fma-def24.4%
fma-def24.4%
fma-def24.4%
fma-def24.4%
fma-def24.4%
Simplified24.4%
Taylor expanded in x around inf 83.6%
if -4.4000000000000002e-6 < x < 1.50000000000000009e-60Initial program 99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in x around 0 70.4%
if 1.50000000000000009e-60 < x < 1.75Initial program 99.9%
Taylor expanded in x around 0 95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in z around 0 64.5%
Taylor expanded in x around 0 62.4%
associate-*r*62.6%
Simplified62.6%
if 1.75 < x Initial program 10.3%
Simplified14.4%
associate-/r/14.4%
Applied egg-rr14.4%
Taylor expanded in x around inf 86.8%
Final simplification77.8%
(FPCore (x y z)
:precision binary64
(if (<= x -4.4e-6)
(- (* x 4.16438922228) 110.1139242984811)
(if (<= x 9e-61)
(* 0.0212463641547976 (* (- x 2.0) z))
(if (<= x 2.0)
(* y (* x -0.0424927283095952))
(* 4.16438922228 (+ x -2.0))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -4.4e-6) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 9e-61) {
tmp = 0.0212463641547976 * ((x - 2.0) * z);
} else if (x <= 2.0) {
tmp = y * (x * -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 <= (-4.4d-6)) then
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
else if (x <= 9d-61) then
tmp = 0.0212463641547976d0 * ((x - 2.0d0) * z)
else if (x <= 2.0d0) then
tmp = y * (x * (-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 <= -4.4e-6) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 9e-61) {
tmp = 0.0212463641547976 * ((x - 2.0) * z);
} else if (x <= 2.0) {
tmp = y * (x * -0.0424927283095952);
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4.4e-6: tmp = (x * 4.16438922228) - 110.1139242984811 elif x <= 9e-61: tmp = 0.0212463641547976 * ((x - 2.0) * z) elif x <= 2.0: tmp = y * (x * -0.0424927283095952) else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4.4e-6) tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); elseif (x <= 9e-61) tmp = Float64(0.0212463641547976 * Float64(Float64(x - 2.0) * z)); elseif (x <= 2.0) tmp = Float64(y * Float64(x * -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 <= -4.4e-6) tmp = (x * 4.16438922228) - 110.1139242984811; elseif (x <= 9e-61) tmp = 0.0212463641547976 * ((x - 2.0) * z); elseif (x <= 2.0) tmp = y * (x * -0.0424927283095952); else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4.4e-6], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 9e-61], N[(0.0212463641547976 * N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.0], N[(y * N[(x * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{-6}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-61}:\\
\;\;\;\;0.0212463641547976 \cdot \left(\left(x - 2\right) \cdot z\right)\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;y \cdot \left(x \cdot -0.0424927283095952\right)\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -4.4000000000000002e-6Initial program 24.4%
sub-neg24.4%
metadata-eval24.4%
fma-def24.4%
fma-def24.4%
fma-def24.4%
fma-def24.4%
fma-def24.4%
fma-def24.4%
fma-def24.4%
Simplified24.4%
Taylor expanded in x around inf 83.6%
if -4.4000000000000002e-6 < x < 9e-61Initial program 99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 95.1%
Taylor expanded in y around inf 94.5%
Taylor expanded in z around inf 70.4%
if 9e-61 < x < 2Initial program 99.9%
Taylor expanded in x around 0 95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in z around 0 64.5%
Taylor expanded in x around 0 62.4%
associate-*r*62.6%
Simplified62.6%
if 2 < x Initial program 10.3%
Simplified14.4%
associate-/r/14.4%
Applied egg-rr14.4%
Taylor expanded in x around inf 86.8%
Final simplification77.8%
(FPCore (x y z)
:precision binary64
(if (<= x -4.4e-6)
(* (+ x -2.0) (- 4.16438922228 (/ 101.7851458539211 x)))
(if (<= x 9.6e-61)
(* 0.0212463641547976 (* (- x 2.0) z))
(if (<= x 0.82)
(* y (* x -0.0424927283095952))
(* 4.16438922228 (+ x -2.0))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -4.4e-6) {
tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
} else if (x <= 9.6e-61) {
tmp = 0.0212463641547976 * ((x - 2.0) * z);
} else if (x <= 0.82) {
tmp = y * (x * -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 <= (-4.4d-6)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 - (101.7851458539211d0 / x))
else if (x <= 9.6d-61) then
tmp = 0.0212463641547976d0 * ((x - 2.0d0) * z)
else if (x <= 0.82d0) then
tmp = y * (x * (-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 <= -4.4e-6) {
tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
} else if (x <= 9.6e-61) {
tmp = 0.0212463641547976 * ((x - 2.0) * z);
} else if (x <= 0.82) {
tmp = y * (x * -0.0424927283095952);
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4.4e-6: tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x)) elif x <= 9.6e-61: tmp = 0.0212463641547976 * ((x - 2.0) * z) elif x <= 0.82: tmp = y * (x * -0.0424927283095952) else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4.4e-6) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(101.7851458539211 / x))); elseif (x <= 9.6e-61) tmp = Float64(0.0212463641547976 * Float64(Float64(x - 2.0) * z)); elseif (x <= 0.82) tmp = Float64(y * Float64(x * -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 <= -4.4e-6) tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x)); elseif (x <= 9.6e-61) tmp = 0.0212463641547976 * ((x - 2.0) * z); elseif (x <= 0.82) tmp = y * (x * -0.0424927283095952); else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4.4e-6], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(101.7851458539211 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.6e-61], N[(0.0212463641547976 * N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.82], N[(y * N[(x * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{-6}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 9.6 \cdot 10^{-61}:\\
\;\;\;\;0.0212463641547976 \cdot \left(\left(x - 2\right) \cdot z\right)\\
\mathbf{elif}\;x \leq 0.82:\\
\;\;\;\;y \cdot \left(x \cdot -0.0424927283095952\right)\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -4.4000000000000002e-6Initial program 24.4%
Simplified31.6%
associate-/r/31.6%
Applied egg-rr31.6%
Taylor expanded in x around inf 83.7%
associate-*r/83.7%
metadata-eval83.7%
Simplified83.7%
if -4.4000000000000002e-6 < x < 9.6000000000000004e-61Initial program 99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 95.1%
Taylor expanded in y around inf 94.5%
Taylor expanded in z around inf 70.4%
if 9.6000000000000004e-61 < x < 0.819999999999999951Initial program 99.9%
Taylor expanded in x around 0 95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in z around 0 64.5%
Taylor expanded in x around 0 62.4%
associate-*r*62.6%
Simplified62.6%
if 0.819999999999999951 < x Initial program 10.3%
Simplified14.4%
associate-/r/14.4%
Applied egg-rr14.4%
Taylor expanded in x around inf 86.8%
Final simplification77.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -4.4e-6) (not (<= x 9e-8))) (* x 0.5218852675289308) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -4.4e-6) || !(x <= 9e-8)) {
tmp = x * 0.5218852675289308;
} 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 <= (-4.4d-6)) .or. (.not. (x <= 9d-8))) then
tmp = x * 0.5218852675289308d0
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 <= -4.4e-6) || !(x <= 9e-8)) {
tmp = x * 0.5218852675289308;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -4.4e-6) or not (x <= 9e-8): tmp = x * 0.5218852675289308 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -4.4e-6) || !(x <= 9e-8)) tmp = Float64(x * 0.5218852675289308); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -4.4e-6) || ~((x <= 9e-8))) tmp = x * 0.5218852675289308; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -4.4e-6], N[Not[LessEqual[x, 9e-8]], $MachinePrecision]], N[(x * 0.5218852675289308), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{-6} \lor \neg \left(x \leq 9 \cdot 10^{-8}\right):\\
\;\;\;\;x \cdot 0.5218852675289308\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -4.4000000000000002e-6 or 8.99999999999999986e-8 < x Initial program 19.0%
Taylor expanded in x around 0 10.8%
*-commutative10.8%
Simplified10.8%
Taylor expanded in x around 0 6.2%
*-commutative6.2%
Simplified6.2%
Taylor expanded in x around inf 14.3%
*-commutative14.3%
Simplified14.3%
if -4.4000000000000002e-6 < x < 8.99999999999999986e-8Initial program 99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in x around 0 66.3%
Final simplification38.3%
(FPCore (x y z) :precision binary64 (if (or (<= x -4.4e-6) (not (<= x 9e-8))) (* x 4.16438922228) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -4.4e-6) || !(x <= 9e-8)) {
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 <= (-4.4d-6)) .or. (.not. (x <= 9d-8))) 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 <= -4.4e-6) || !(x <= 9e-8)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -4.4e-6) or not (x <= 9e-8): tmp = x * 4.16438922228 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -4.4e-6) || !(x <= 9e-8)) 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 <= -4.4e-6) || ~((x <= 9e-8))) tmp = x * 4.16438922228; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -4.4e-6], N[Not[LessEqual[x, 9e-8]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{-6} \lor \neg \left(x \leq 9 \cdot 10^{-8}\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -4.4000000000000002e-6 or 8.99999999999999986e-8 < x Initial program 19.0%
sub-neg19.0%
metadata-eval19.0%
fma-def19.0%
fma-def19.0%
fma-def19.0%
fma-def19.0%
fma-def19.0%
fma-def19.0%
fma-def19.0%
Simplified19.0%
Taylor expanded in x around inf 83.0%
*-commutative83.0%
Simplified83.0%
if -4.4000000000000002e-6 < x < 8.99999999999999986e-8Initial program 99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in x around 0 66.3%
Final simplification75.3%
(FPCore (x y z) :precision binary64 (* z -0.0424927283095952))
double code(double x, double y, double z) {
return z * -0.0424927283095952;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = z * (-0.0424927283095952d0)
end function
public static double code(double x, double y, double z) {
return z * -0.0424927283095952;
}
def code(x, y, z): return z * -0.0424927283095952
function code(x, y, z) return Float64(z * -0.0424927283095952) end
function tmp = code(x, y, z) tmp = z * -0.0424927283095952; end
code[x_, y_, z_] := N[(z * -0.0424927283095952), $MachinePrecision]
\begin{array}{l}
\\
z \cdot -0.0424927283095952
\end{array}
Initial program 56.2%
sub-neg56.2%
metadata-eval56.2%
fma-def56.2%
fma-def56.2%
fma-def56.2%
fma-def56.2%
fma-def56.2%
fma-def56.2%
fma-def56.2%
Simplified56.2%
Taylor expanded in x around 0 32.3%
Final simplification32.3%
(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 2023314
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
:precision binary64
:herbie-target
(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)))