
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
INFINITY)
(+
x
(*
y
(/
(fma (fma z 0.0692910599291889 0.4917317610505968) z 0.279195317918525)
(fma (+ z 6.012459259764103) z 3.350343815022304))))
(+
x
(*
y
(/
(- 0.004801250986110448 (pow (/ 0.07512208616047561 z) 2.0))
(- 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= ((double) INFINITY)) {
tmp = x + (y * (fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma((z + 6.012459259764103), z, 3.350343815022304)));
} else {
tmp = x + (y * ((0.004801250986110448 - pow((0.07512208616047561 / z), 2.0)) / (0.0692910599291889 - (0.07512208616047561 / z))));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= Inf) tmp = Float64(x + Float64(y * Float64(fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma(Float64(z + 6.012459259764103), z, 3.350343815022304)))); else tmp = Float64(x + Float64(y * Float64(Float64(0.004801250986110448 - (Float64(0.07512208616047561 / z) ^ 2.0)) / Float64(0.0692910599291889 - Float64(0.07512208616047561 / z))))); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], Infinity], N[(x + N[(y * N[(N[(N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] * z + 0.279195317918525), $MachinePrecision] / N[(N[(z + 6.012459259764103), $MachinePrecision] * z + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(0.004801250986110448 - N[Power[N[(0.07512208616047561 / z), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(0.0692910599291889 - N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq \infty:\\
\;\;\;\;x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{0.004801250986110448 - {\left(\frac{0.07512208616047561}{z}\right)}^{2}}{0.0692910599291889 - \frac{0.07512208616047561}{z}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < +inf.0Initial program 90.6%
remove-double-neg90.6%
distribute-lft-neg-out90.6%
distribute-neg-frac90.6%
associate-/l*99.7%
distribute-lft-neg-in99.7%
remove-double-neg99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
Simplified99.7%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.0%
remove-double-neg0.0%
distribute-lft-neg-out0.0%
distribute-neg-frac0.0%
associate-/l*0.0%
distribute-lft-neg-in0.0%
remove-double-neg0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
Simplified0.0%
Taylor expanded in z around inf 99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
flip-+99.5%
metadata-eval99.5%
pow299.5%
Applied egg-rr99.5%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= z -1.95e+33)
(+
x
(*
y
(/
(- 0.004801250986110448 (pow (/ 0.07512208616047561 z) 2.0))
(- 0.0692910599291889 (/ 0.07512208616047561 z)))))
(if (<= z 7000.0)
(+
x
(/
(+
(* y 0.279195317918525)
(* z (+ (* 0.0692910599291889 (* y z)) (* y 0.4917317610505968))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304)))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.95e+33) {
tmp = x + (y * ((0.004801250986110448 - pow((0.07512208616047561 / z), 2.0)) / (0.0692910599291889 - (0.07512208616047561 / z))));
} else if (z <= 7000.0) {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
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 (z <= (-1.95d+33)) then
tmp = x + (y * ((0.004801250986110448d0 - ((0.07512208616047561d0 / z) ** 2.0d0)) / (0.0692910599291889d0 - (0.07512208616047561d0 / z))))
else if (z <= 7000.0d0) then
tmp = x + (((y * 0.279195317918525d0) + (z * ((0.0692910599291889d0 * (y * z)) + (y * 0.4917317610505968d0)))) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0))
else
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.95e+33) {
tmp = x + (y * ((0.004801250986110448 - Math.pow((0.07512208616047561 / z), 2.0)) / (0.0692910599291889 - (0.07512208616047561 / z))));
} else if (z <= 7000.0) {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.95e+33: tmp = x + (y * ((0.004801250986110448 - math.pow((0.07512208616047561 / z), 2.0)) / (0.0692910599291889 - (0.07512208616047561 / z)))) elif z <= 7000.0: tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.95e+33) tmp = Float64(x + Float64(y * Float64(Float64(0.004801250986110448 - (Float64(0.07512208616047561 / z) ^ 2.0)) / Float64(0.0692910599291889 - Float64(0.07512208616047561 / z))))); elseif (z <= 7000.0) tmp = Float64(x + Float64(Float64(Float64(y * 0.279195317918525) + Float64(z * Float64(Float64(0.0692910599291889 * Float64(y * z)) + Float64(y * 0.4917317610505968)))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304))); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.95e+33) tmp = x + (y * ((0.004801250986110448 - ((0.07512208616047561 / z) ^ 2.0)) / (0.0692910599291889 - (0.07512208616047561 / z)))); elseif (z <= 7000.0) tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.95e+33], N[(x + N[(y * N[(N[(0.004801250986110448 - N[Power[N[(0.07512208616047561 / z), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(0.0692910599291889 - N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7000.0], N[(x + N[(N[(N[(y * 0.279195317918525), $MachinePrecision] + N[(z * N[(N[(0.0692910599291889 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * 0.4917317610505968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+33}:\\
\;\;\;\;x + y \cdot \frac{0.004801250986110448 - {\left(\frac{0.07512208616047561}{z}\right)}^{2}}{0.0692910599291889 - \frac{0.07512208616047561}{z}}\\
\mathbf{elif}\;z \leq 7000:\\
\;\;\;\;x + \frac{y \cdot 0.279195317918525 + z \cdot \left(0.0692910599291889 \cdot \left(y \cdot z\right) + y \cdot 0.4917317610505968\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -1.9500000000000001e33Initial program 30.4%
remove-double-neg30.4%
distribute-lft-neg-out30.4%
distribute-neg-frac30.4%
associate-/l*43.7%
distribute-lft-neg-in43.7%
remove-double-neg43.7%
fma-define43.7%
fma-define43.7%
fma-define43.7%
Simplified43.7%
Taylor expanded in z around inf 99.4%
associate-*r/99.4%
metadata-eval99.4%
Simplified99.4%
flip-+99.4%
metadata-eval99.6%
pow299.6%
Applied egg-rr99.6%
if -1.9500000000000001e33 < z < 7e3Initial program 99.7%
Taylor expanded in z around 0 99.7%
if 7e3 < z Initial program 42.1%
remove-double-neg42.1%
distribute-lft-neg-out42.1%
distribute-neg-frac42.1%
associate-/l*58.3%
distribute-lft-neg-in58.3%
remove-double-neg58.3%
fma-define58.3%
fma-define58.3%
fma-define58.3%
Simplified58.3%
Taylor expanded in z around inf 99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
(t_1
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
t_0)))
(if (<= t_1 (- INFINITY))
(* y 0.0692910599291889)
(if (<= t_1 1e+305)
(+
x
(/
(+
(* y 0.279195317918525)
(* z (+ (* 0.0692910599291889 (* y z)) (* y 0.4917317610505968))))
t_0))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z))))))))
double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double t_1 = (y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / t_0;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * 0.0692910599291889;
} else if (t_1 <= 1e+305) {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / t_0);
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double t_1 = (y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / t_0;
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * 0.0692910599291889;
} else if (t_1 <= 1e+305) {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / t_0);
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304 t_1 = (y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / t_0 tmp = 0 if t_1 <= -math.inf: tmp = y * 0.0692910599291889 elif t_1 <= 1e+305: tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / t_0) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) t_0 = Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304) t_1 = Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / t_0) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * 0.0692910599291889); elseif (t_1 <= 1e+305) tmp = Float64(x + Float64(Float64(Float64(y * 0.279195317918525) + Float64(z * Float64(Float64(0.0692910599291889 * Float64(y * z)) + Float64(y * 0.4917317610505968)))) / t_0)); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304; t_1 = (y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / t_0; tmp = 0.0; if (t_1 <= -Inf) tmp = y * 0.0692910599291889; elseif (t_1 <= 1e+305) tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / t_0); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * 0.0692910599291889), $MachinePrecision], If[LessEqual[t$95$1, 1e+305], N[(x + N[(N[(N[(y * 0.279195317918525), $MachinePrecision] + N[(z * N[(N[(0.0692910599291889 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * 0.4917317610505968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\\
t_1 := \frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{t\_0}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;t\_1 \leq 10^{+305}:\\
\;\;\;\;x + \frac{y \cdot 0.279195317918525 + z \cdot \left(0.0692910599291889 \cdot \left(y \cdot z\right) + y \cdot 0.4917317610505968\right)}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < -inf.0Initial program 6.2%
+-commutative6.2%
*-commutative6.2%
associate-/l*98.9%
fma-define98.9%
*-commutative98.9%
fma-define98.9%
fma-define98.9%
*-commutative98.9%
fma-define98.9%
Simplified98.9%
Taylor expanded in z around inf 98.8%
+-commutative98.8%
*-commutative98.8%
Simplified98.8%
Taylor expanded in y around inf 98.8%
Taylor expanded in x around 0 98.8%
if -inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 9.9999999999999994e304Initial program 99.7%
Taylor expanded in z around 0 99.7%
if 9.9999999999999994e304 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.8%
remove-double-neg0.8%
distribute-lft-neg-out0.8%
distribute-neg-frac0.8%
associate-/l*19.7%
distribute-lft-neg-in19.7%
remove-double-neg19.7%
fma-define19.7%
fma-define19.7%
fma-define19.7%
Simplified19.7%
Taylor expanded in z around inf 99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= z -2.8e+39)
(+ x (* y 0.0692910599291889))
(if (<= z 7000.0)
(+
x
(/
(*
y
(+
0.279195317918525
(+ (* z (* z 0.0692910599291889)) (* z 0.4917317610505968))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304)))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -2.8e+39) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 7000.0) {
tmp = x + ((y * (0.279195317918525 + ((z * (z * 0.0692910599291889)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
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 (z <= (-2.8d+39)) then
tmp = x + (y * 0.0692910599291889d0)
else if (z <= 7000.0d0) then
tmp = x + ((y * (0.279195317918525d0 + ((z * (z * 0.0692910599291889d0)) + (z * 0.4917317610505968d0)))) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0))
else
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -2.8e+39) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 7000.0) {
tmp = x + ((y * (0.279195317918525 + ((z * (z * 0.0692910599291889)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -2.8e+39: tmp = x + (y * 0.0692910599291889) elif z <= 7000.0: tmp = x + ((y * (0.279195317918525 + ((z * (z * 0.0692910599291889)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -2.8e+39) tmp = Float64(x + Float64(y * 0.0692910599291889)); elseif (z <= 7000.0) tmp = Float64(x + Float64(Float64(y * Float64(0.279195317918525 + Float64(Float64(z * Float64(z * 0.0692910599291889)) + Float64(z * 0.4917317610505968)))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304))); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -2.8e+39) tmp = x + (y * 0.0692910599291889); elseif (z <= 7000.0) tmp = x + ((y * (0.279195317918525 + ((z * (z * 0.0692910599291889)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -2.8e+39], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7000.0], N[(x + N[(N[(y * N[(0.279195317918525 + N[(N[(z * N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision] + N[(z * 0.4917317610505968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+39}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{elif}\;z \leq 7000:\\
\;\;\;\;x + \frac{y \cdot \left(0.279195317918525 + \left(z \cdot \left(z \cdot 0.0692910599291889\right) + z \cdot 0.4917317610505968\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -2.80000000000000001e39Initial program 29.0%
+-commutative29.0%
*-commutative29.0%
associate-/l*42.7%
fma-define42.7%
*-commutative42.7%
fma-define42.7%
fma-define42.7%
*-commutative42.7%
fma-define42.7%
Simplified42.7%
Taylor expanded in z around inf 99.5%
+-commutative99.5%
*-commutative99.5%
Simplified99.5%
if -2.80000000000000001e39 < z < 7e3Initial program 99.7%
*-commutative99.7%
distribute-rgt-in99.7%
Applied egg-rr99.7%
if 7e3 < z Initial program 42.1%
remove-double-neg42.1%
distribute-lft-neg-out42.1%
distribute-neg-frac42.1%
associate-/l*58.3%
distribute-lft-neg-in58.3%
remove-double-neg58.3%
fma-define58.3%
fma-define58.3%
fma-define58.3%
Simplified58.3%
Taylor expanded in z around inf 99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= z -5.6e+44)
(+ x (* y 0.0692910599291889))
(if (<= z 7000.0)
(+
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
x)
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.6e+44) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 7000.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
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 (z <= (-5.6d+44)) then
tmp = x + (y * 0.0692910599291889d0)
else if (z <= 7000.0d0) then
tmp = ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)) + x
else
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.6e+44) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 7000.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.6e+44: tmp = x + (y * 0.0692910599291889) elif z <= 7000.0: tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.6e+44) tmp = Float64(x + Float64(y * 0.0692910599291889)); elseif (z <= 7000.0) tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) + x); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.6e+44) tmp = x + (y * 0.0692910599291889); elseif (z <= 7000.0) tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x; else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.6e+44], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7000.0], N[(N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+44}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{elif}\;z \leq 7000:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -5.6000000000000002e44Initial program 29.0%
+-commutative29.0%
*-commutative29.0%
associate-/l*42.7%
fma-define42.7%
*-commutative42.7%
fma-define42.7%
fma-define42.7%
*-commutative42.7%
fma-define42.7%
Simplified42.7%
Taylor expanded in z around inf 99.5%
+-commutative99.5%
*-commutative99.5%
Simplified99.5%
if -5.6000000000000002e44 < z < 7e3Initial program 99.7%
if 7e3 < z Initial program 42.1%
remove-double-neg42.1%
distribute-lft-neg-out42.1%
distribute-neg-frac42.1%
associate-/l*58.3%
distribute-lft-neg-in58.3%
remove-double-neg58.3%
fma-define58.3%
fma-define58.3%
fma-define58.3%
Simplified58.3%
Taylor expanded in z around inf 99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -6800000.0) (not (<= z 3.1)))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z))))
(+
x
(*
y
(+
0.08333333333333323
(*
z
(-
(* z (+ 0.0007936505811533442 (* z -0.0005951669793454025)))
0.00277777777751721)))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -6800000.0) || !(z <= 3.1)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))));
}
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 ((z <= (-6800000.0d0)) .or. (.not. (z <= 3.1d0))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * (0.0007936505811533442d0 + (z * (-0.0005951669793454025d0)))) - 0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -6800000.0) || !(z <= 3.1)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -6800000.0) or not (z <= 3.1): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -6800000.0) || !(z <= 3.1)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * Float64(0.0007936505811533442 + Float64(z * -0.0005951669793454025))) - 0.00277777777751721))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -6800000.0) || ~((z <= 3.1))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -6800000.0], N[Not[LessEqual[z, 3.1]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * N[(0.0007936505811533442 + N[(z * -0.0005951669793454025), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6800000 \lor \neg \left(z \leq 3.1\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot \left(0.0007936505811533442 + z \cdot -0.0005951669793454025\right) - 0.00277777777751721\right)\right)\\
\end{array}
\end{array}
if z < -6.8e6 or 3.10000000000000009 < z Initial program 40.2%
remove-double-neg40.2%
distribute-lft-neg-out40.2%
distribute-neg-frac40.2%
associate-/l*54.5%
distribute-lft-neg-in54.5%
remove-double-neg54.5%
fma-define54.5%
fma-define54.5%
fma-define54.5%
Simplified54.5%
Taylor expanded in z around inf 99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
if -6.8e6 < z < 3.10000000000000009Initial program 99.7%
remove-double-neg99.7%
distribute-lft-neg-out99.7%
distribute-neg-frac99.7%
associate-/l*99.8%
distribute-lft-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around 0 99.2%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (or (<= z -6800000.0) (not (<= z 4.4)))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z))))
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -6800000.0) || !(z <= 4.4)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
}
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 ((z <= (-6800000.0d0)) .or. (.not. (z <= 4.4d0))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -6800000.0) || !(z <= 4.4)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -6800000.0) or not (z <= 4.4): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -6800000.0) || !(z <= 4.4)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -6800000.0) || ~((z <= 4.4))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -6800000.0], N[Not[LessEqual[z, 4.4]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * 0.0007936505811533442), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6800000 \lor \neg \left(z \leq 4.4\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\
\end{array}
\end{array}
if z < -6.8e6 or 4.4000000000000004 < z Initial program 40.2%
remove-double-neg40.2%
distribute-lft-neg-out40.2%
distribute-neg-frac40.2%
associate-/l*54.5%
distribute-lft-neg-in54.5%
remove-double-neg54.5%
fma-define54.5%
fma-define54.5%
fma-define54.5%
Simplified54.5%
Taylor expanded in z around inf 99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
if -6.8e6 < z < 4.4000000000000004Initial program 99.7%
remove-double-neg99.7%
distribute-lft-neg-out99.7%
distribute-neg-frac99.7%
associate-/l*99.8%
distribute-lft-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around 0 99.1%
Final simplification99.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -6800000.0) (not (<= z 5.0))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -6800000.0) || !(z <= 5.0)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
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 ((z <= (-6800000.0d0)) .or. (.not. (z <= 5.0d0))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -6800000.0) || !(z <= 5.0)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -6800000.0) or not (z <= 5.0): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -6800000.0) || !(z <= 5.0)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -6800000.0) || ~((z <= 5.0))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -6800000.0], N[Not[LessEqual[z, 5.0]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6800000 \lor \neg \left(z \leq 5\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\end{array}
\end{array}
if z < -6.8e6 or 5 < z Initial program 40.2%
remove-double-neg40.2%
distribute-lft-neg-out40.2%
distribute-neg-frac40.2%
associate-/l*54.5%
distribute-lft-neg-in54.5%
remove-double-neg54.5%
fma-define54.5%
fma-define54.5%
fma-define54.5%
Simplified54.5%
Taylor expanded in z around inf 99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
if -6.8e6 < z < 5Initial program 99.7%
remove-double-neg99.7%
distribute-lft-neg-out99.7%
distribute-neg-frac99.7%
associate-/l*99.8%
distribute-lft-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around 0 99.0%
*-commutative99.0%
Simplified99.0%
Final simplification99.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -6800000.0) (not (<= z 5.2))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -6800000.0) || !(z <= 5.2)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * 0.08333333333333323);
}
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 ((z <= (-6800000.0d0)) .or. (.not. (z <= 5.2d0))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y * 0.08333333333333323d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -6800000.0) || !(z <= 5.2)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -6800000.0) or not (z <= 5.2): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -6800000.0) || !(z <= 5.2)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y * 0.08333333333333323)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -6800000.0) || ~((z <= 5.2))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -6800000.0], N[Not[LessEqual[z, 5.2]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6800000 \lor \neg \left(z \leq 5.2\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -6.8e6 or 5.20000000000000018 < z Initial program 40.2%
remove-double-neg40.2%
distribute-lft-neg-out40.2%
distribute-neg-frac40.2%
associate-/l*54.5%
distribute-lft-neg-in54.5%
remove-double-neg54.5%
fma-define54.5%
fma-define54.5%
fma-define54.5%
Simplified54.5%
Taylor expanded in z around inf 99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
if -6.8e6 < z < 5.20000000000000018Initial program 99.7%
+-commutative99.7%
*-commutative99.7%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around 0 98.5%
+-commutative98.5%
*-commutative98.5%
Simplified98.5%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(if (<= x -1.85e-152)
x
(if (<= x 3.4e-213)
(* y 0.08333333333333323)
(if (<= x 250.0) (* y 0.0692910599291889) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.85e-152) {
tmp = x;
} else if (x <= 3.4e-213) {
tmp = y * 0.08333333333333323;
} else if (x <= 250.0) {
tmp = y * 0.0692910599291889;
} else {
tmp = 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 <= (-1.85d-152)) then
tmp = x
else if (x <= 3.4d-213) then
tmp = y * 0.08333333333333323d0
else if (x <= 250.0d0) then
tmp = y * 0.0692910599291889d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.85e-152) {
tmp = x;
} else if (x <= 3.4e-213) {
tmp = y * 0.08333333333333323;
} else if (x <= 250.0) {
tmp = y * 0.0692910599291889;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.85e-152: tmp = x elif x <= 3.4e-213: tmp = y * 0.08333333333333323 elif x <= 250.0: tmp = y * 0.0692910599291889 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.85e-152) tmp = x; elseif (x <= 3.4e-213) tmp = Float64(y * 0.08333333333333323); elseif (x <= 250.0) tmp = Float64(y * 0.0692910599291889); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.85e-152) tmp = x; elseif (x <= 3.4e-213) tmp = y * 0.08333333333333323; elseif (x <= 250.0) tmp = y * 0.0692910599291889; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.85e-152], x, If[LessEqual[x, 3.4e-213], N[(y * 0.08333333333333323), $MachinePrecision], If[LessEqual[x, 250.0], N[(y * 0.0692910599291889), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{-152}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-213}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{elif}\;x \leq 250:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.8499999999999999e-152 or 250 < x Initial program 69.6%
+-commutative69.6%
*-commutative69.6%
associate-/l*76.3%
fma-define76.3%
*-commutative76.3%
fma-define76.3%
fma-define76.3%
*-commutative76.3%
fma-define76.3%
Simplified76.3%
Taylor expanded in y around 0 71.6%
if -1.8499999999999999e-152 < x < 3.4000000000000002e-213Initial program 74.0%
+-commutative74.0%
*-commutative74.0%
associate-/l*81.0%
fma-define81.0%
*-commutative81.0%
fma-define81.0%
fma-define81.1%
*-commutative81.1%
fma-define81.1%
Simplified81.1%
Taylor expanded in x around inf 47.6%
times-frac49.5%
+-commutative49.5%
+-commutative49.5%
*-commutative49.5%
fma-define49.5%
fma-define49.5%
+-commutative49.5%
+-commutative49.5%
fma-undefine49.5%
Simplified49.5%
Taylor expanded in z around 0 43.0%
Taylor expanded in x around 0 66.2%
*-commutative66.2%
Simplified66.2%
if 3.4000000000000002e-213 < x < 250Initial program 69.1%
+-commutative69.1%
*-commutative69.1%
associate-/l*73.2%
fma-define73.2%
*-commutative73.2%
fma-define73.2%
fma-define73.2%
*-commutative73.2%
fma-define73.2%
Simplified73.2%
Taylor expanded in z around inf 82.2%
+-commutative82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in y around inf 82.2%
Taylor expanded in x around 0 57.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -6800000.0) (not (<= z 5.6))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -6800000.0) || !(z <= 5.6)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
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 ((z <= (-6800000.0d0)) .or. (.not. (z <= 5.6d0))) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = x + (y * 0.08333333333333323d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -6800000.0) || !(z <= 5.6)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -6800000.0) or not (z <= 5.6): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -6800000.0) || !(z <= 5.6)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(x + Float64(y * 0.08333333333333323)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -6800000.0) || ~((z <= 5.6))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -6800000.0], N[Not[LessEqual[z, 5.6]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6800000 \lor \neg \left(z \leq 5.6\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -6.8e6 or 5.5999999999999996 < z Initial program 40.2%
+-commutative40.2%
*-commutative40.2%
associate-/l*53.0%
fma-define53.0%
*-commutative53.0%
fma-define53.0%
fma-define53.1%
*-commutative53.1%
fma-define53.1%
Simplified53.1%
Taylor expanded in z around inf 99.2%
+-commutative99.2%
*-commutative99.2%
Simplified99.2%
if -6.8e6 < z < 5.5999999999999996Initial program 99.7%
+-commutative99.7%
*-commutative99.7%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around 0 98.5%
+-commutative98.5%
*-commutative98.5%
Simplified98.5%
Final simplification98.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.22e-80) (not (<= z -5e-224))) (+ x (* y 0.0692910599291889)) (* y 0.08333333333333323)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.22e-80) || !(z <= -5e-224)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
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 ((z <= (-1.22d-80)) .or. (.not. (z <= (-5d-224)))) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = y * 0.08333333333333323d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.22e-80) || !(z <= -5e-224)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.22e-80) or not (z <= -5e-224): tmp = x + (y * 0.0692910599291889) else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.22e-80) || !(z <= -5e-224)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(y * 0.08333333333333323); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.22e-80) || ~((z <= -5e-224))) tmp = x + (y * 0.0692910599291889); else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.22e-80], N[Not[LessEqual[z, -5e-224]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(y * 0.08333333333333323), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{-80} \lor \neg \left(z \leq -5 \cdot 10^{-224}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -1.22e-80 or -4.9999999999999999e-224 < z Initial program 66.9%
+-commutative66.9%
*-commutative66.9%
associate-/l*73.9%
fma-define73.9%
*-commutative73.9%
fma-define73.9%
fma-define74.0%
*-commutative74.0%
fma-define74.0%
Simplified74.0%
Taylor expanded in z around inf 84.1%
+-commutative84.1%
*-commutative84.1%
Simplified84.1%
if -1.22e-80 < z < -4.9999999999999999e-224Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in x around inf 82.8%
times-frac82.7%
+-commutative82.7%
+-commutative82.7%
*-commutative82.7%
fma-define82.7%
fma-define82.7%
+-commutative82.7%
+-commutative82.7%
fma-undefine82.7%
Simplified82.7%
Taylor expanded in z around 0 82.7%
Taylor expanded in x around 0 75.4%
*-commutative75.4%
Simplified75.4%
Final simplification83.1%
(FPCore (x y z) :precision binary64 (if (<= x -3e-72) x (if (<= x 0.00075) (* y 0.0692910599291889) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -3e-72) {
tmp = x;
} else if (x <= 0.00075) {
tmp = y * 0.0692910599291889;
} else {
tmp = 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 <= (-3d-72)) then
tmp = x
else if (x <= 0.00075d0) then
tmp = y * 0.0692910599291889d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -3e-72) {
tmp = x;
} else if (x <= 0.00075) {
tmp = y * 0.0692910599291889;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -3e-72: tmp = x elif x <= 0.00075: tmp = y * 0.0692910599291889 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -3e-72) tmp = x; elseif (x <= 0.00075) tmp = Float64(y * 0.0692910599291889); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -3e-72) tmp = x; elseif (x <= 0.00075) tmp = y * 0.0692910599291889; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -3e-72], x, If[LessEqual[x, 0.00075], N[(y * 0.0692910599291889), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{-72}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 0.00075:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3e-72 or 7.5000000000000002e-4 < x Initial program 71.5%
+-commutative71.5%
*-commutative71.5%
associate-/l*77.5%
fma-define77.5%
*-commutative77.5%
fma-define77.5%
fma-define77.5%
*-commutative77.5%
fma-define77.5%
Simplified77.5%
Taylor expanded in y around 0 74.7%
if -3e-72 < x < 7.5000000000000002e-4Initial program 69.1%
+-commutative69.1%
*-commutative69.1%
associate-/l*75.8%
fma-define75.8%
*-commutative75.8%
fma-define75.8%
fma-define75.8%
*-commutative75.8%
fma-define75.8%
Simplified75.8%
Taylor expanded in z around inf 67.5%
+-commutative67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in y around inf 67.5%
Taylor expanded in x around 0 53.0%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 70.4%
+-commutative70.4%
*-commutative70.4%
associate-/l*76.7%
fma-define76.7%
*-commutative76.7%
fma-define76.7%
fma-define76.8%
*-commutative76.8%
fma-define76.8%
Simplified76.8%
Taylor expanded in y around 0 49.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(-
(* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y)
(- (/ (* 0.40462203869992125 y) (* z z)) x))))
(if (< z -8120153.652456675)
t_0
(if (< z 6.576118972787377e+20)
(+
x
(*
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
t_0))))
double code(double x, double y, double z) {
double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
double tmp;
if (z < -8120153.652456675) {
tmp = t_0;
} else if (z < 6.576118972787377e+20) {
tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
} 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 = (((0.07512208616047561d0 / z) + 0.0692910599291889d0) * y) - (((0.40462203869992125d0 * y) / (z * z)) - x)
if (z < (-8120153.652456675d0)) then
tmp = t_0
else if (z < 6.576118972787377d+20) then
tmp = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) * (1.0d0 / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
double tmp;
if (z < -8120153.652456675) {
tmp = t_0;
} else if (z < 6.576118972787377e+20) {
tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x) tmp = 0 if z < -8120153.652456675: tmp = t_0 elif z < 6.576118972787377e+20: tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(0.07512208616047561 / z) + 0.0692910599291889) * y) - Float64(Float64(Float64(0.40462203869992125 * y) / Float64(z * z)) - x)) tmp = 0.0 if (z < -8120153.652456675) tmp = t_0; elseif (z < 6.576118972787377e+20) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * Float64(1.0 / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x); tmp = 0.0; if (z < -8120153.652456675) tmp = t_0; elseif (z < 6.576118972787377e+20) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(0.07512208616047561 / z), $MachinePrecision] + 0.0692910599291889), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(0.40462203869992125 * y), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -8120153.652456675], t$95$0, If[Less[z, 6.576118972787377e+20], N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{0.07512208616047561}{z} + 0.0692910599291889\right) \cdot y - \left(\frac{0.40462203869992125 \cdot y}{z \cdot z} - x\right)\\
\mathbf{if}\;z < -8120153.652456675:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z < 6.576118972787377 \cdot 10^{+20}:\\
\;\;\;\;x + \left(y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)\right) \cdot \frac{1}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
herbie shell --seed 2024186
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
:precision binary64
:alt
(! :herbie-platform default (if (< z -324806146098267/40000000) (- (* (+ (/ 7512208616047561/100000000000000000 z) 692910599291889/10000000000000000) y) (- (/ (* 323697630959937/800000000000000 y) (* z z)) x)) (if (< z 657611897278737700000) (+ x (* (* y (+ (* (+ (* z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (/ 1 (+ (* (+ z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)))) (- (* (+ (/ 7512208616047561/100000000000000000 z) 692910599291889/10000000000000000) y) (- (/ (* 323697630959937/800000000000000 y) (* z z)) x)))))
(+ x (/ (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))