
(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 17 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)))
(if (<= x -1.55e+35)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 1.6e+60)
(+
(* z (+ (/ x t_0) (* 2.0 (/ -1.0 t_0))))
(/
(*
x
(*
(- x 2.0)
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228))))))))
t_0))
(-
(-
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
(* (/ (+ y 130977.50649958357) x) (/ -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 tmp;
if (x <= -1.55e+35) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 1.6e+60) {
tmp = (z * ((x / t_0) + (2.0 * (-1.0 / t_0)))) + ((x * ((x - 2.0) * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))))))) / t_0);
} else {
tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811;
}
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 * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
if (x <= (-1.55d+35)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 1.6d+60) then
tmp = (z * ((x / t_0) + (2.0d0 * ((-1.0d0) / t_0)))) + ((x * ((x - 2.0d0) * (y + (x * (137.519416416d0 + (x * (78.6994924154d0 + (x * 4.16438922228d0)))))))) / t_0)
else
tmp = (((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - (((y + 130977.50649958357d0) / x) * ((-1.0d0) / x))) - 110.1139242984811d0
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 tmp;
if (x <= -1.55e+35) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 1.6e+60) {
tmp = (z * ((x / t_0) + (2.0 * (-1.0 / t_0)))) + ((x * ((x - 2.0) * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))))))) / t_0);
} else {
tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 tmp = 0 if x <= -1.55e+35: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 1.6e+60: tmp = (z * ((x / t_0) + (2.0 * (-1.0 / t_0)))) + ((x * ((x - 2.0) * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))))))) / t_0) else: tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-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) tmp = 0.0 if (x <= -1.55e+35) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 1.6e+60) 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) * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228)))))))) / t_0)); else tmp = Float64(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - Float64(Float64(Float64(y + 130977.50649958357) / x) * Float64(-1.0 / x))) - 110.1139242984811); 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; tmp = 0.0; if (x <= -1.55e+35) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 1.6e+60) tmp = (z * ((x / t_0) + (2.0 * (-1.0 / t_0)))) + ((x * ((x - 2.0) * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))))))) / t_0); else tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811; 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]}, If[LessEqual[x, -1.55e+35], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 1.6e+60], 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] * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y + 130977.50649958357), $MachinePrecision] / x), $MachinePrecision] * N[(-1.0 / x), $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\\
\mathbf{if}\;x \leq -1.55 \cdot 10^{+35}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+60}:\\
\;\;\;\;z \cdot \left(\frac{x}{t\_0} + 2 \cdot \frac{-1}{t\_0}\right) + \frac{x \cdot \left(\left(x - 2\right) \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right)\right)}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{y + 130977.50649958357}{x} \cdot \frac{-1}{x}\right) - 110.1139242984811\\
\end{array}
\end{array}
if x < -1.54999999999999993e35Initial program 10.6%
associate-/l*15.6%
sub-neg15.6%
metadata-eval15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
Simplified15.6%
Taylor expanded in x around inf 99.7%
if -1.54999999999999993e35 < x < 1.59999999999999995e60Initial program 97.7%
Simplified99.3%
Taylor expanded in z around 0 99.4%
if 1.59999999999999995e60 < x Initial program 0.2%
Simplified2.2%
Taylor expanded in x around -inf 99.2%
add-sqr-sqrt94.9%
sqrt-unprod99.2%
sqr-neg99.2%
mul-1-neg99.2%
mul-1-neg99.2%
sqrt-unprod82.2%
add-sqr-sqrt95.0%
associate-*r/95.0%
unpow295.0%
times-frac95.0%
+-commutative95.0%
add-sqr-sqrt50.7%
sqrt-unprod77.3%
mul-1-neg77.3%
mul-1-neg77.3%
sqr-neg77.3%
sqrt-unprod44.3%
add-sqr-sqrt99.2%
Applied egg-rr99.2%
*-commutative99.2%
Simplified99.2%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
INFINITY)
(*
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(/
(+ x -2.0)
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606)))
(-
(-
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
(* (/ (+ y 130977.50649958357) x) (/ -1.0 x)))
110.1139242984811)))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= ((double) INFINITY)) {
tmp = fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) * ((x + -2.0) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606));
} else {
tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-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(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= Inf) tmp = Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) * Float64(Float64(x + -2.0) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606))); else tmp = Float64(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - Float64(Float64(Float64(y + 130977.50649958357) / x) * 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[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(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], Infinity], N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] * N[(N[(x + -2.0), $MachinePrecision] / N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y + 130977.50649958357), $MachinePrecision] / x), $MachinePrecision] * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \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{x + -2}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{y + 130977.50649958357}{x} \cdot \frac{-1}{x}\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 94.8%
Simplified98.7%
if +inf.0 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.0%
Simplified0.0%
Taylor expanded in x around -inf 99.1%
add-sqr-sqrt96.0%
sqrt-unprod99.1%
sqr-neg99.1%
mul-1-neg99.1%
mul-1-neg99.1%
sqrt-unprod75.7%
add-sqr-sqrt98.1%
associate-*r/98.1%
unpow298.1%
times-frac98.1%
+-commutative98.1%
add-sqr-sqrt50.1%
sqrt-unprod81.7%
mul-1-neg81.7%
mul-1-neg81.7%
sqr-neg81.7%
sqrt-unprod48.0%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
*-commutative99.1%
Simplified99.1%
Final simplification98.9%
(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
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))
z))
t_0)))
(if (<= t_1 1e+269)
t_1
(+ (* x 4.16438922228) (* z (+ (/ x t_0) (* 2.0 (/ -1.0 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 * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / t_0;
double tmp;
if (t_1 <= 1e+269) {
tmp = t_1;
} else {
tmp = (x * 4.16438922228) + (z * ((x / t_0) + (2.0 * (-1.0 / 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) :: t_1
real(8) :: tmp
t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
t_1 = ((x - 2.0d0) * ((x * (y + (x * (137.519416416d0 + (x * (78.6994924154d0 + (x * 4.16438922228d0))))))) + z)) / t_0
if (t_1 <= 1d+269) then
tmp = t_1
else
tmp = (x * 4.16438922228d0) + (z * ((x / t_0) + (2.0d0 * ((-1.0d0) / t_0))))
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 - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / t_0;
double tmp;
if (t_1 <= 1e+269) {
tmp = t_1;
} else {
tmp = (x * 4.16438922228) + (z * ((x / t_0) + (2.0 * (-1.0 / t_0))));
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 t_1 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / t_0 tmp = 0 if t_1 <= 1e+269: tmp = t_1 else: tmp = (x * 4.16438922228) + (z * ((x / t_0) + (2.0 * (-1.0 / 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(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) + z)) / t_0) tmp = 0.0 if (t_1 <= 1e+269) tmp = t_1; else tmp = Float64(Float64(x * 4.16438922228) + Float64(z * Float64(Float64(x / t_0) + Float64(2.0 * Float64(-1.0 / t_0))))); 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 - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / t_0; tmp = 0.0; if (t_1 <= 1e+269) tmp = t_1; else tmp = (x * 4.16438922228) + (z * ((x / t_0) + (2.0 * (-1.0 / t_0)))); 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[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+269], t$95$1, N[(N[(x * 4.16438922228), $MachinePrecision] + N[(z * N[(N[(x / t$95$0), $MachinePrecision] + N[(2.0 * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right) + z\right)}{t\_0}\\
\mathbf{if}\;t\_1 \leq 10^{+269}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 + z \cdot \left(\frac{x}{t\_0} + 2 \cdot \frac{-1}{t\_0}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 1e269Initial program 96.5%
if 1e269 < (/.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 4.1%
Simplified7.0%
Taylor expanded in z around 0 6.0%
Taylor expanded in x around inf 98.2%
*-commutative98.2%
Simplified98.2%
Final simplification97.1%
(FPCore (x y z)
:precision binary64
(if (<= x -1.55e+35)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 3.9e+14)
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(* x (+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(-
(-
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
(* (/ (+ y 130977.50649958357) x) (/ -1.0 x)))
110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.55e+35) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3.9e+14) {
tmp = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811;
}
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 <= (-1.55d+35)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 3.9d+14) then
tmp = ((x - 2.0d0) * ((x * (y + (x * (137.519416416d0 + (x * (78.6994924154d0 + (x * 4.16438922228d0))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
else
tmp = (((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - (((y + 130977.50649958357d0) / x) * ((-1.0d0) / x))) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.55e+35) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3.9e+14) {
tmp = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.55e+35: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 3.9e+14: tmp = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) else: tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.55e+35) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 3.9e+14) tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); else tmp = Float64(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - Float64(Float64(Float64(y + 130977.50649958357) / x) * Float64(-1.0 / x))) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.55e+35) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 3.9e+14) tmp = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); else tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.55e+35], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 3.9e+14], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(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[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y + 130977.50649958357), $MachinePrecision] / x), $MachinePrecision] * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+35}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+14}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{y + 130977.50649958357}{x} \cdot \frac{-1}{x}\right) - 110.1139242984811\\
\end{array}
\end{array}
if x < -1.54999999999999993e35Initial program 10.6%
associate-/l*15.6%
sub-neg15.6%
metadata-eval15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
Simplified15.6%
Taylor expanded in x around inf 99.7%
if -1.54999999999999993e35 < x < 3.9e14Initial program 98.9%
if 3.9e14 < x Initial program 19.6%
Simplified24.4%
Taylor expanded in x around -inf 96.2%
add-sqr-sqrt86.4%
sqrt-unprod94.5%
sqr-neg94.5%
mul-1-neg94.5%
mul-1-neg94.5%
sqrt-unprod68.2%
add-sqr-sqrt88.8%
associate-*r/88.8%
unpow288.8%
times-frac88.8%
+-commutative88.8%
add-sqr-sqrt46.6%
sqrt-unprod75.2%
mul-1-neg75.2%
mul-1-neg75.2%
sqr-neg75.2%
sqrt-unprod43.9%
add-sqr-sqrt96.2%
Applied egg-rr96.2%
*-commutative96.2%
Simplified96.2%
Final simplification98.4%
(FPCore (x y z)
:precision binary64
(if (<= x -1.7e+31)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 1.85e+14)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(-
(-
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
(* (/ (+ y 130977.50649958357) x) (/ -1.0 x)))
110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.7e+31) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 1.85e+14) {
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) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811;
}
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 <= (-1.7d+31)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 1.85d+14) 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) + (3655.1204654076414d0 * (1.0d0 / x))) - (((y + 130977.50649958357d0) / x) * ((-1.0d0) / x))) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.7e+31) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 1.85e+14) {
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) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.7e+31: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 1.85e+14: 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) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.7e+31) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 1.85e+14) 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(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - Float64(Float64(Float64(y + 130977.50649958357) / x) * Float64(-1.0 / x))) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.7e+31) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 1.85e+14) 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) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.7e+31], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 1.85e+14], 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[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y + 130977.50649958357), $MachinePrecision] / x), $MachinePrecision] * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+31}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+14}:\\
\;\;\;\;\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}:\\
\;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{y + 130977.50649958357}{x} \cdot \frac{-1}{x}\right) - 110.1139242984811\\
\end{array}
\end{array}
if x < -1.6999999999999999e31Initial program 10.6%
associate-/l*15.6%
sub-neg15.6%
metadata-eval15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
Simplified15.6%
Taylor expanded in x around inf 99.7%
if -1.6999999999999999e31 < x < 1.85e14Initial program 98.9%
Taylor expanded in x around 0 97.7%
*-commutative92.3%
Simplified97.7%
if 1.85e14 < x Initial program 19.6%
Simplified24.4%
Taylor expanded in x around -inf 96.2%
add-sqr-sqrt86.4%
sqrt-unprod94.5%
sqr-neg94.5%
mul-1-neg94.5%
mul-1-neg94.5%
sqrt-unprod68.2%
add-sqr-sqrt88.8%
associate-*r/88.8%
unpow288.8%
times-frac88.8%
+-commutative88.8%
add-sqr-sqrt46.6%
sqrt-unprod75.2%
mul-1-neg75.2%
mul-1-neg75.2%
sqr-neg75.2%
sqrt-unprod43.9%
add-sqr-sqrt96.2%
Applied egg-rr96.2%
*-commutative96.2%
Simplified96.2%
Final simplification97.8%
(FPCore (x y z)
:precision binary64
(if (or (<= x -280000.0) (not (<= x 220.0)))
(-
(-
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
(* (/ (+ y 130977.50649958357) x) (/ -1.0 x)))
110.1139242984811)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -280000.0) || !(x <= 220.0)) {
tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811;
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-280000.0d0)) .or. (.not. (x <= 220.0d0))) then
tmp = (((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - (((y + 130977.50649958357d0) / x) * ((-1.0d0) / x))) - 110.1139242984811d0
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -280000.0) || !(x <= 220.0)) {
tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811;
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -280000.0) or not (x <= 220.0): tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811 else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -280000.0) || !(x <= 220.0)) tmp = Float64(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - Float64(Float64(Float64(y + 130977.50649958357) / x) * Float64(-1.0 / x))) - 110.1139242984811); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -280000.0) || ~((x <= 220.0))) tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811; else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -280000.0], N[Not[LessEqual[x, 220.0]], $MachinePrecision]], N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y + 130977.50649958357), $MachinePrecision] / x), $MachinePrecision] * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -280000 \lor \neg \left(x \leq 220\right):\\
\;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{y + 130977.50649958357}{x} \cdot \frac{-1}{x}\right) - 110.1139242984811\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\end{array}
\end{array}
if x < -2.8e5 or 220 < x Initial program 19.2%
Simplified24.5%
Taylor expanded in x around -inf 95.7%
add-sqr-sqrt86.5%
sqrt-unprod93.0%
sqr-neg93.0%
mul-1-neg93.0%
mul-1-neg93.0%
sqrt-unprod60.3%
add-sqr-sqrt89.4%
associate-*r/89.4%
unpow289.4%
times-frac89.4%
+-commutative89.4%
add-sqr-sqrt44.9%
sqrt-unprod77.7%
mul-1-neg77.7%
mul-1-neg77.7%
sqr-neg77.7%
sqrt-unprod47.2%
add-sqr-sqrt95.7%
Applied egg-rr95.7%
*-commutative95.7%
Simplified95.7%
if -2.8e5 < x < 220Initial program 99.7%
Taylor expanded in x around 0 96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in x around 0 96.7%
*-commutative96.7%
Simplified96.7%
Final simplification96.2%
(FPCore (x y z)
:precision binary64
(if (or (<= x -280000.0) (not (<= x 112.0)))
(-
(-
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
(* (/ (+ y 130977.50649958357) x) (/ -1.0 x)))
110.1139242984811)
(+
(* z -0.0424927283095952)
(*
x
(- (* 0.0212463641547976 (+ z (* y -2.0))) (* z -0.28294182010212804))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -280000.0) || !(x <= 112.0)) {
tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811;
} else {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
}
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 <= (-280000.0d0)) .or. (.not. (x <= 112.0d0))) then
tmp = (((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - (((y + 130977.50649958357d0) / x) * ((-1.0d0) / x))) - 110.1139242984811d0
else
tmp = (z * (-0.0424927283095952d0)) + (x * ((0.0212463641547976d0 * (z + (y * (-2.0d0)))) - (z * (-0.28294182010212804d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -280000.0) || !(x <= 112.0)) {
tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811;
} else {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -280000.0) or not (x <= 112.0): tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811 else: tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -280000.0) || !(x <= 112.0)) tmp = Float64(Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - Float64(Float64(Float64(y + 130977.50649958357) / x) * Float64(-1.0 / x))) - 110.1139242984811); else tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0))) - Float64(z * -0.28294182010212804)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -280000.0) || ~((x <= 112.0))) tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - (((y + 130977.50649958357) / x) * (-1.0 / x))) - 110.1139242984811; else tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -280000.0], N[Not[LessEqual[x, 112.0]], $MachinePrecision]], N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y + 130977.50649958357), $MachinePrecision] / x), $MachinePrecision] * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(0.0212463641547976 * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -280000 \lor \neg \left(x \leq 112\right):\\
\;\;\;\;\left(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{y + 130977.50649958357}{x} \cdot \frac{-1}{x}\right) - 110.1139242984811\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\
\end{array}
\end{array}
if x < -2.8e5 or 112 < x Initial program 19.2%
Simplified24.5%
Taylor expanded in x around -inf 95.7%
add-sqr-sqrt86.5%
sqrt-unprod93.0%
sqr-neg93.0%
mul-1-neg93.0%
mul-1-neg93.0%
sqrt-unprod60.3%
add-sqr-sqrt89.4%
associate-*r/89.4%
unpow289.4%
times-frac89.4%
+-commutative89.4%
add-sqr-sqrt44.9%
sqrt-unprod77.7%
mul-1-neg77.7%
mul-1-neg77.7%
sqr-neg77.7%
sqrt-unprod47.2%
add-sqr-sqrt95.7%
Applied egg-rr95.7%
*-commutative95.7%
Simplified95.7%
if -2.8e5 < x < 112Initial program 99.7%
Simplified99.4%
Taylor expanded in x around 0 91.3%
Final simplification93.4%
(FPCore (x y z)
:precision binary64
(if (<= x -7.8e+30)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 226.0)
(+
(* z -0.0424927283095952)
(*
x
(- (* 0.0212463641547976 (+ z (* y -2.0))) (* z -0.28294182010212804))))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 226.0) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-7.8d+30)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 226.0d0) then
tmp = (z * (-0.0424927283095952d0)) + (x * ((0.0212463641547976d0 * (z + (y * (-2.0d0)))) - (z * (-0.28294182010212804d0))))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 226.0) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -7.8e+30: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 226.0: tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -7.8e+30) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 226.0) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0))) - Float64(z * -0.28294182010212804)))); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -7.8e+30) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 226.0) tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -7.8e+30], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 226.0], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(0.0212463641547976 * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 226:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -7.80000000000000021e30Initial program 10.6%
associate-/l*15.6%
sub-neg15.6%
metadata-eval15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
Simplified15.6%
Taylor expanded in x around inf 99.7%
if -7.80000000000000021e30 < x < 226Initial program 99.6%
Simplified99.4%
Taylor expanded in x around 0 90.0%
if 226 < x Initial program 24.3%
associate-/l*30.1%
sub-neg30.1%
metadata-eval30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.0%
Simplified30.0%
Taylor expanded in x around inf 84.1%
associate-*r/84.1%
metadata-eval84.1%
Simplified84.1%
Final simplification90.6%
(FPCore (x y z)
:precision binary64
(if (<= x -7.8e+30)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 3200.0)
(/
(* (- x 2.0) z)
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3200.0) {
tmp = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-7.8d+30)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 3200.0d0) then
tmp = ((x - 2.0d0) * z) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3200.0) {
tmp = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -7.8e+30: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 3200.0: tmp = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -7.8e+30) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 3200.0) tmp = Float64(Float64(Float64(x - 2.0) * z) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -7.8e+30) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 3200.0) tmp = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -7.8e+30], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 3200.0], N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 3200:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -7.80000000000000021e30Initial program 10.6%
associate-/l*15.6%
sub-neg15.6%
metadata-eval15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
Simplified15.6%
Taylor expanded in x around inf 99.7%
if -7.80000000000000021e30 < x < 3200Initial program 99.6%
Taylor expanded in x around 0 95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in z around inf 69.2%
if 3200 < x Initial program 24.3%
associate-/l*30.1%
sub-neg30.1%
metadata-eval30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.0%
Simplified30.0%
Taylor expanded in x around inf 84.1%
associate-*r/84.1%
metadata-eval84.1%
Simplified84.1%
Final simplification79.8%
(FPCore (x y z)
:precision binary64
(if (<= x -0.03)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 4000.0)
(/ (* (- x 2.0) z) (+ 47.066876606 (* x 313.399215894)))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.03) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 4000.0) {
tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-0.03d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 4000.0d0) then
tmp = ((x - 2.0d0) * z) / (47.066876606d0 + (x * 313.399215894d0))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.03) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 4000.0) {
tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.03: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 4000.0: tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894)) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.03) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 4000.0) tmp = Float64(Float64(Float64(x - 2.0) * z) / Float64(47.066876606 + Float64(x * 313.399215894))); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.03) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 4000.0) tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894)); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.03], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 4000.0], N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.03:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 4000:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot 313.399215894}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -0.029999999999999999Initial program 17.7%
associate-/l*22.3%
sub-neg22.3%
metadata-eval22.3%
fma-def22.3%
fma-def22.3%
fma-def22.3%
fma-def22.3%
fma-def22.3%
fma-def22.3%
fma-def22.3%
Simplified22.3%
Taylor expanded in x around inf 92.0%
if -0.029999999999999999 < x < 4e3Initial program 99.7%
Simplified99.4%
Taylor expanded in z around inf 72.6%
Taylor expanded in x around 0 71.2%
*-commutative71.2%
Simplified71.2%
if 4e3 < x Initial program 24.3%
associate-/l*30.1%
sub-neg30.1%
metadata-eval30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.0%
Simplified30.0%
Taylor expanded in x around inf 84.1%
associate-*r/84.1%
metadata-eval84.1%
Simplified84.1%
Final simplification79.6%
(FPCore (x y z)
:precision binary64
(if (<= x -7.8e+30)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 114.0)
(/ (+ x -2.0) (/ 47.066876606 z))
(- (+ (* x 4.16438922228) (/ 3655.1204654076414 x)) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 114.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = ((x * 4.16438922228) + (3655.1204654076414 / x)) - 110.1139242984811;
}
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 <= (-7.8d+30)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 114.0d0) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
else
tmp = ((x * 4.16438922228d0) + (3655.1204654076414d0 / x)) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 114.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = ((x * 4.16438922228) + (3655.1204654076414 / x)) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -7.8e+30: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 114.0: tmp = (x + -2.0) / (47.066876606 / z) else: tmp = ((x * 4.16438922228) + (3655.1204654076414 / x)) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -7.8e+30) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 114.0) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); else tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 / x)) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -7.8e+30) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 114.0) tmp = (x + -2.0) / (47.066876606 / z); else tmp = ((x * 4.16438922228) + (3655.1204654076414 / x)) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -7.8e+30], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 114.0], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 114:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 4.16438922228 + \frac{3655.1204654076414}{x}\right) - 110.1139242984811\\
\end{array}
\end{array}
if x < -7.80000000000000021e30Initial program 10.6%
associate-/l*15.6%
sub-neg15.6%
metadata-eval15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
Simplified15.6%
Taylor expanded in x around inf 99.7%
if -7.80000000000000021e30 < x < 114Initial program 99.6%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 67.2%
if 114 < x Initial program 24.3%
Simplified30.0%
Taylor expanded in x around inf 84.0%
Taylor expanded in x around 0 84.0%
Final simplification78.8%
(FPCore (x y z)
:precision binary64
(if (<= x -7.8e+30)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 470.0)
(/ (+ x -2.0) (/ 47.066876606 z))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 470.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-7.8d+30)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 470.0d0) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 470.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -7.8e+30: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 470.0: tmp = (x + -2.0) / (47.066876606 / z) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -7.8e+30) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 470.0) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -7.8e+30) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 470.0) tmp = (x + -2.0) / (47.066876606 / z); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -7.8e+30], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 470.0], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 470:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -7.80000000000000021e30Initial program 10.6%
associate-/l*15.6%
sub-neg15.6%
metadata-eval15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
Simplified15.6%
Taylor expanded in x around inf 99.7%
if -7.80000000000000021e30 < x < 470Initial program 99.6%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 67.2%
if 470 < x Initial program 24.3%
associate-/l*30.1%
sub-neg30.1%
metadata-eval30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.1%
fma-def30.0%
Simplified30.0%
Taylor expanded in x around inf 84.1%
associate-*r/84.1%
metadata-eval84.1%
Simplified84.1%
Final simplification78.8%
(FPCore (x y z)
:precision binary64
(if (<= x -7.8e+30)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 120.0)
(/ (+ x -2.0) (/ 47.066876606 z))
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 120.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
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 <= (-7.8d+30)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 120.0d0) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
else
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 120.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -7.8e+30: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 120.0: tmp = (x + -2.0) / (47.066876606 / z) else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -7.8e+30) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 120.0) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); else tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -7.8e+30) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 120.0) tmp = (x + -2.0) / (47.066876606 / z); else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -7.8e+30], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 120.0], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 120:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -7.80000000000000021e30Initial program 10.6%
associate-/l*15.6%
sub-neg15.6%
metadata-eval15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
Simplified15.6%
Taylor expanded in x around inf 99.7%
if -7.80000000000000021e30 < x < 120Initial program 99.6%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 67.2%
if 120 < x Initial program 24.3%
Simplified30.0%
Taylor expanded in x around inf 83.6%
Final simplification78.7%
(FPCore (x y z)
:precision binary64
(if (<= x -7.8e+30)
(* x 4.16438922228)
(if (<= x 1.9)
(* z -0.0424927283095952)
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = x * 4.16438922228;
} else if (x <= 1.9) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
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 <= (-7.8d+30)) then
tmp = x * 4.16438922228d0
else if (x <= 1.9d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = x * 4.16438922228;
} else if (x <= 1.9) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -7.8e+30: tmp = x * 4.16438922228 elif x <= 1.9: tmp = z * -0.0424927283095952 else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -7.8e+30) tmp = Float64(x * 4.16438922228); elseif (x <= 1.9) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -7.8e+30) tmp = x * 4.16438922228; elseif (x <= 1.9) tmp = z * -0.0424927283095952; else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -7.8e+30], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 1.9], N[(z * -0.0424927283095952), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+30}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 1.9:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -7.80000000000000021e30Initial program 10.6%
Simplified15.6%
Taylor expanded in x around inf 99.1%
*-commutative99.1%
Simplified99.1%
if -7.80000000000000021e30 < x < 1.8999999999999999Initial program 99.6%
Simplified99.4%
Taylor expanded in x around 0 67.7%
if 1.8999999999999999 < x Initial program 25.4%
Simplified31.0%
Taylor expanded in x around inf 82.4%
Final simplification78.5%
(FPCore (x y z)
:precision binary64
(if (<= x -7.8e+30)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 1.05)
(* z -0.0424927283095952)
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 1.05) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
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 <= (-7.8d+30)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 1.05d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -7.8e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 1.05) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -7.8e+30: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 1.05: tmp = z * -0.0424927283095952 else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -7.8e+30) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 1.05) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -7.8e+30) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 1.05) tmp = z * -0.0424927283095952; else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -7.8e+30], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 1.05], N[(z * -0.0424927283095952), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 1.05:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -7.80000000000000021e30Initial program 10.6%
associate-/l*15.6%
sub-neg15.6%
metadata-eval15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
Simplified15.6%
Taylor expanded in x around inf 99.7%
if -7.80000000000000021e30 < x < 1.05000000000000004Initial program 99.6%
Simplified99.4%
Taylor expanded in x around 0 67.7%
if 1.05000000000000004 < x Initial program 25.4%
Simplified31.0%
Taylor expanded in x around inf 82.4%
Final simplification78.6%
(FPCore (x y z) :precision binary64 (if (or (<= x -7.8e+30) (not (<= x 2.0))) (* x 4.16438922228) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -7.8e+30) || !(x <= 2.0)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-7.8d+30)) .or. (.not. (x <= 2.0d0))) then
tmp = x * 4.16438922228d0
else
tmp = z * (-0.0424927283095952d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -7.8e+30) || !(x <= 2.0)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -7.8e+30) or not (x <= 2.0): tmp = x * 4.16438922228 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -7.8e+30) || !(x <= 2.0)) tmp = Float64(x * 4.16438922228); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -7.8e+30) || ~((x <= 2.0))) tmp = x * 4.16438922228; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -7.8e+30], N[Not[LessEqual[x, 2.0]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+30} \lor \neg \left(x \leq 2\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -7.80000000000000021e30 or 2 < x Initial program 18.6%
Simplified23.9%
Taylor expanded in x around inf 89.7%
*-commutative89.7%
Simplified89.7%
if -7.80000000000000021e30 < x < 2Initial program 99.6%
Simplified99.4%
Taylor expanded in x around 0 67.7%
Final simplification78.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 60.4%
Simplified62.9%
Taylor expanded in x around 0 36.2%
Final simplification36.2%
(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 2024027
(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)))