
(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 11 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))
2e+298)
(fma
y
(/
(fma z (fma z 0.0692910599291889 0.4917317610505968) 0.279195317918525)
(fma z (+ z 6.012459259764103) 3.350343815022304))
x)
(+ x (* y 0.0692910599291889))))
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)) <= 2e+298) {
tmp = fma(y, (fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, (z + 6.012459259764103), 3.350343815022304)), x);
} else {
tmp = x + (y * 0.0692910599291889);
}
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)) <= 2e+298) tmp = fma(y, Float64(fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, Float64(z + 6.012459259764103), 3.350343815022304)), x); else tmp = Float64(x + Float64(y * 0.0692910599291889)); 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], 2e+298], N[(y * N[(N[(z * N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] + 0.279195317918525), $MachinePrecision] / N[(z * N[(z + 6.012459259764103), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $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 2 \cdot 10^{+298}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\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))) < 1.9999999999999999e298Initial program 96.6%
+-commutative96.6%
associate-/l*99.8%
fma-define99.8%
remove-double-neg99.8%
remove-double-neg99.8%
*-commutative99.8%
fma-define99.8%
fma-define99.8%
*-commutative99.8%
fma-define99.8%
Simplified99.8%
if 1.9999999999999999e298 < (/.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.6%
Taylor expanded in z around inf 99.5%
*-commutative99.5%
Simplified99.5%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
2e+298)
(+
x
(/
y
(/
(fma z (+ z 6.012459259764103) 3.350343815022304)
(fma
z
(fma z 0.0692910599291889 0.4917317610505968)
0.279195317918525))))
(+ x (* y 0.0692910599291889))))
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)) <= 2e+298) {
tmp = x + (y / (fma(z, (z + 6.012459259764103), 3.350343815022304) / fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525)));
} else {
tmp = x + (y * 0.0692910599291889);
}
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)) <= 2e+298) tmp = Float64(x + Float64(y / Float64(fma(z, Float64(z + 6.012459259764103), 3.350343815022304) / fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525)))); else tmp = Float64(x + Float64(y * 0.0692910599291889)); 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], 2e+298], N[(x + N[(y / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision] + 3.350343815022304), $MachinePrecision] / N[(z * N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $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 2 \cdot 10^{+298}:\\
\;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\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))) < 1.9999999999999999e298Initial program 96.6%
associate-/l*99.8%
*-commutative99.8%
fma-undefine99.8%
fma-define99.8%
*-commutative99.8%
fma-undefine99.8%
clear-num99.4%
un-div-inv99.6%
Applied egg-rr99.6%
if 1.9999999999999999e298 < (/.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.6%
Taylor expanded in z around inf 99.5%
*-commutative99.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 (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+298)))
(+ x (* y 0.0692910599291889))
(+
x
(/
(+
(* y 0.279195317918525)
(* z (+ (* 0.0692910599291889 (* y z)) (* y 0.4917317610505968))))
t_0)))))
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)) || !(t_1 <= 2e+298)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / t_0);
}
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) || !(t_1 <= 2e+298)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / t_0);
}
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) or not (t_1 <= 2e+298): tmp = x + (y * 0.0692910599291889) else: tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / t_0) 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)) || !(t_1 <= 2e+298)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(x + Float64(Float64(Float64(y * 0.279195317918525) + Float64(z * Float64(Float64(0.0692910599291889 * Float64(y * z)) + Float64(y * 0.4917317610505968)))) / t_0)); 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) || ~((t_1 <= 2e+298))) tmp = x + (y * 0.0692910599291889); else tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / t_0); 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[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+298]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], 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]]]]
\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 \lor \neg \left(t\_1 \leq 2 \cdot 10^{+298}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot 0.279195317918525 + z \cdot \left(0.0692910599291889 \cdot \left(y \cdot z\right) + y \cdot 0.4917317610505968\right)}{t\_0}\\
\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.0 or 1.9999999999999999e298 < (/.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 1.1%
Taylor expanded in z around inf 99.6%
*-commutative99.6%
Simplified99.6%
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))) < 1.9999999999999999e298Initial program 99.7%
Taylor expanded in z around 0 99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= z -27500000.0)
(+ x (- (* y 0.0692910599291889) (/ (* y -0.07512208616047561) z)))
(if (<= z 650000000000.0)
(+
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
x)
(+ x (* y 0.0692910599291889)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -27500000.0) {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
} else if (z <= 650000000000.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + (y * 0.0692910599291889);
}
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 <= (-27500000.0d0)) then
tmp = x + ((y * 0.0692910599291889d0) - ((y * (-0.07512208616047561d0)) / z))
else if (z <= 650000000000.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)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -27500000.0) {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
} else if (z <= 650000000000.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -27500000.0: tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)) elif z <= 650000000000.0: tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -27500000.0) tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(Float64(y * -0.07512208616047561) / z))); elseif (z <= 650000000000.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 * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -27500000.0) tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)); elseif (z <= 650000000000.0) tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x; else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -27500000.0], N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(N[(y * -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 650000000000.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 * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -27500000:\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - \frac{y \cdot -0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 650000000000:\\
\;\;\;\;\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 0.0692910599291889\\
\end{array}
\end{array}
if z < -2.75e7Initial program 37.9%
Taylor expanded in z around 0 44.8%
Taylor expanded in z around -inf 99.5%
+-commutative99.5%
*-commutative99.5%
mul-1-neg99.5%
unsub-neg99.5%
*-commutative99.5%
distribute-rgt-out--99.5%
metadata-eval99.5%
Simplified99.5%
if -2.75e7 < z < 6.5e11Initial program 99.7%
if 6.5e11 < z Initial program 35.9%
Taylor expanded in z around inf 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+ x (- (* y 0.0692910599291889) (/ (* y -0.07512208616047561) z)))
(if (<= z 1.85e-7)
(+ x (+ (* z (* y -0.00277777777751721)) (* y 0.08333333333333323)))
(-
(+ x (+ (* y 0.0692910599291889) (* 0.4917317610505968 (/ y z))))
(* (/ y z) 0.4166096748901212)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
} else if (z <= 1.85e-7) {
tmp = x + ((z * (y * -0.00277777777751721)) + (y * 0.08333333333333323));
} else {
tmp = (x + ((y * 0.0692910599291889) + (0.4917317610505968 * (y / z)))) - ((y / z) * 0.4166096748901212);
}
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.5d0)) then
tmp = x + ((y * 0.0692910599291889d0) - ((y * (-0.07512208616047561d0)) / z))
else if (z <= 1.85d-7) then
tmp = x + ((z * (y * (-0.00277777777751721d0))) + (y * 0.08333333333333323d0))
else
tmp = (x + ((y * 0.0692910599291889d0) + (0.4917317610505968d0 * (y / z)))) - ((y / z) * 0.4166096748901212d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
} else if (z <= 1.85e-7) {
tmp = x + ((z * (y * -0.00277777777751721)) + (y * 0.08333333333333323));
} else {
tmp = (x + ((y * 0.0692910599291889) + (0.4917317610505968 * (y / z)))) - ((y / z) * 0.4166096748901212);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)) elif z <= 1.85e-7: tmp = x + ((z * (y * -0.00277777777751721)) + (y * 0.08333333333333323)) else: tmp = (x + ((y * 0.0692910599291889) + (0.4917317610505968 * (y / z)))) - ((y / z) * 0.4166096748901212) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(Float64(y * -0.07512208616047561) / z))); elseif (z <= 1.85e-7) tmp = Float64(x + Float64(Float64(z * Float64(y * -0.00277777777751721)) + Float64(y * 0.08333333333333323))); else tmp = Float64(Float64(x + Float64(Float64(y * 0.0692910599291889) + Float64(0.4917317610505968 * Float64(y / z)))) - Float64(Float64(y / z) * 0.4166096748901212)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)); elseif (z <= 1.85e-7) tmp = x + ((z * (y * -0.00277777777751721)) + (y * 0.08333333333333323)); else tmp = (x + ((y * 0.0692910599291889) + (0.4917317610505968 * (y / z)))) - ((y / z) * 0.4166096748901212); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(N[(y * -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e-7], N[(x + N[(N[(z * N[(y * -0.00277777777751721), $MachinePrecision]), $MachinePrecision] + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] + N[(0.4917317610505968 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y / z), $MachinePrecision] * 0.4166096748901212), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - \frac{y \cdot -0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-7}:\\
\;\;\;\;x + \left(z \cdot \left(y \cdot -0.00277777777751721\right) + y \cdot 0.08333333333333323\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(y \cdot 0.0692910599291889 + 0.4917317610505968 \cdot \frac{y}{z}\right)\right) - \frac{y}{z} \cdot 0.4166096748901212\\
\end{array}
\end{array}
if z < -5.5Initial program 38.8%
Taylor expanded in z around 0 45.6%
Taylor expanded in z around -inf 99.5%
+-commutative99.5%
*-commutative99.5%
mul-1-neg99.5%
unsub-neg99.5%
*-commutative99.5%
distribute-rgt-out--99.5%
metadata-eval99.5%
Simplified99.5%
if -5.5 < z < 1.85000000000000002e-7Initial program 99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in y around 0 99.7%
*-commutative99.7%
Simplified99.7%
if 1.85000000000000002e-7 < z Initial program 42.0%
+-commutative42.0%
associate-/l*55.4%
fma-define55.4%
remove-double-neg55.4%
remove-double-neg55.4%
*-commutative55.4%
fma-define55.4%
fma-define55.4%
*-commutative55.4%
fma-define55.4%
Simplified55.4%
Taylor expanded in z around inf 99.2%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.85e-7))) (+ x (- (* y 0.0692910599291889) (/ (* y -0.07512208616047561) z))) (+ x (+ (* z (* y -0.00277777777751721)) (* y 0.08333333333333323)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.85e-7)) {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
} else {
tmp = x + ((z * (y * -0.00277777777751721)) + (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 <= (-5.5d0)) .or. (.not. (z <= 1.85d-7))) then
tmp = x + ((y * 0.0692910599291889d0) - ((y * (-0.07512208616047561d0)) / z))
else
tmp = x + ((z * (y * (-0.00277777777751721d0))) + (y * 0.08333333333333323d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.85e-7)) {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
} else {
tmp = x + ((z * (y * -0.00277777777751721)) + (y * 0.08333333333333323));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 1.85e-7): tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)) else: tmp = x + ((z * (y * -0.00277777777751721)) + (y * 0.08333333333333323)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 1.85e-7)) tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(Float64(y * -0.07512208616047561) / z))); else tmp = Float64(x + Float64(Float64(z * Float64(y * -0.00277777777751721)) + Float64(y * 0.08333333333333323))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 1.85e-7))) tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)); else tmp = x + ((z * (y * -0.00277777777751721)) + (y * 0.08333333333333323)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 1.85e-7]], $MachinePrecision]], N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(N[(y * -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(y * -0.00277777777751721), $MachinePrecision]), $MachinePrecision] + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 1.85 \cdot 10^{-7}\right):\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - \frac{y \cdot -0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \left(y \cdot -0.00277777777751721\right) + y \cdot 0.08333333333333323\right)\\
\end{array}
\end{array}
if z < -5.5 or 1.85000000000000002e-7 < z Initial program 40.2%
Taylor expanded in z around 0 49.2%
Taylor expanded in z around -inf 99.4%
+-commutative99.4%
*-commutative99.4%
mul-1-neg99.4%
unsub-neg99.4%
*-commutative99.4%
distribute-rgt-out--99.4%
metadata-eval99.4%
Simplified99.4%
if -5.5 < z < 1.85000000000000002e-7Initial program 99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in y around 0 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.85e-7))) (+ x (* y 0.0692910599291889)) (+ x (+ (* z (* y -0.00277777777751721)) (* y 0.08333333333333323)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.85e-7)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + ((z * (y * -0.00277777777751721)) + (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 <= (-5.5d0)) .or. (.not. (z <= 1.85d-7))) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = x + ((z * (y * (-0.00277777777751721d0))) + (y * 0.08333333333333323d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.85e-7)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + ((z * (y * -0.00277777777751721)) + (y * 0.08333333333333323));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 1.85e-7): tmp = x + (y * 0.0692910599291889) else: tmp = x + ((z * (y * -0.00277777777751721)) + (y * 0.08333333333333323)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 1.85e-7)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(x + Float64(Float64(z * Float64(y * -0.00277777777751721)) + Float64(y * 0.08333333333333323))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 1.85e-7))) tmp = x + (y * 0.0692910599291889); else tmp = x + ((z * (y * -0.00277777777751721)) + (y * 0.08333333333333323)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 1.85e-7]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(y * -0.00277777777751721), $MachinePrecision]), $MachinePrecision] + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 1.85 \cdot 10^{-7}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \left(y \cdot -0.00277777777751721\right) + y \cdot 0.08333333333333323\right)\\
\end{array}
\end{array}
if z < -5.5 or 1.85000000000000002e-7 < z Initial program 40.2%
Taylor expanded in z around inf 98.8%
*-commutative98.8%
Simplified98.8%
if -5.5 < z < 1.85000000000000002e-7Initial program 99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in y around 0 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -5000.0) (not (<= z 1.85e-7))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5000.0) || !(z <= 1.85e-7)) {
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 <= (-5000.0d0)) .or. (.not. (z <= 1.85d-7))) 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 <= -5000.0) || !(z <= 1.85e-7)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5000.0) or not (z <= 1.85e-7): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5000.0) || !(z <= 1.85e-7)) 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 <= -5000.0) || ~((z <= 1.85e-7))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5000.0], N[Not[LessEqual[z, 1.85e-7]], $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 -5000 \lor \neg \left(z \leq 1.85 \cdot 10^{-7}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5e3 or 1.85000000000000002e-7 < z Initial program 39.8%
Taylor expanded in z around inf 98.7%
*-commutative98.7%
Simplified98.7%
if -5e3 < z < 1.85000000000000002e-7Initial program 99.7%
Taylor expanded in z around 0 99.2%
*-commutative99.2%
Simplified99.2%
Final simplification99.0%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.1e+73) (not (<= y 6.5e+79))) (* y 0.08333333333333323) x))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.1e+73) || !(y <= 6.5e+79)) {
tmp = y * 0.08333333333333323;
} 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 ((y <= (-1.1d+73)) .or. (.not. (y <= 6.5d+79))) then
tmp = y * 0.08333333333333323d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.1e+73) || !(y <= 6.5e+79)) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.1e+73) or not (y <= 6.5e+79): tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.1e+73) || !(y <= 6.5e+79)) tmp = Float64(y * 0.08333333333333323); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.1e+73) || ~((y <= 6.5e+79))) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.1e+73], N[Not[LessEqual[y, 6.5e+79]], $MachinePrecision]], N[(y * 0.08333333333333323), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+73} \lor \neg \left(y \leq 6.5 \cdot 10^{+79}\right):\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.1e73 or 6.49999999999999954e79 < y Initial program 52.7%
Taylor expanded in z around 0 60.2%
*-commutative60.2%
Simplified60.2%
Taylor expanded in y around inf 60.2%
+-commutative60.2%
Simplified60.2%
Taylor expanded in y around inf 45.0%
*-commutative45.0%
Simplified45.0%
if -1.1e73 < y < 6.49999999999999954e79Initial program 74.8%
+-commutative74.8%
associate-/l*76.4%
fma-define76.4%
remove-double-neg76.4%
remove-double-neg76.4%
*-commutative76.4%
fma-define76.4%
fma-define76.4%
*-commutative76.4%
fma-define76.4%
Simplified76.4%
Taylor expanded in y around 0 75.8%
Final simplification66.5%
(FPCore (x y z) :precision binary64 (+ x (* y 0.0692910599291889)))
double code(double x, double y, double z) {
return x + (y * 0.0692910599291889);
}
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 * 0.0692910599291889d0)
end function
public static double code(double x, double y, double z) {
return x + (y * 0.0692910599291889);
}
def code(x, y, z): return x + (y * 0.0692910599291889)
function code(x, y, z) return Float64(x + Float64(y * 0.0692910599291889)) end
function tmp = code(x, y, z) tmp = x + (y * 0.0692910599291889); end
code[x_, y_, z_] := N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot 0.0692910599291889
\end{array}
Initial program 68.1%
Taylor expanded in z around inf 84.8%
*-commutative84.8%
Simplified84.8%
(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 68.1%
+-commutative68.1%
associate-/l*73.7%
fma-define73.7%
remove-double-neg73.7%
remove-double-neg73.7%
*-commutative73.7%
fma-define73.7%
fma-define73.7%
*-commutative73.7%
fma-define73.7%
Simplified73.7%
Taylor expanded in y around 0 58.0%
(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 2024096
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
:precision binary64
:alt
(if (< z -8120153.652456675) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x)) (if (< z 6.576118972787377e+20) (+ x (* (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304)))) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x))))
(+ x (/ (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))