
(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 10 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 (<= z -7.5e+48)
(+ x (/ y 14.431876219268936))
(if (<= z 1500.0)
(+
x
(/
(*
y
(+
0.279195317918525
(*
z
(+
0.4917317610505968
(cbrt
(* (* z 0.0692910599291889) (* z (* z 0.004801250986110448))))))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304)))
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -7.5e+48) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 1500.0) {
tmp = x + ((y * (0.279195317918525 + (z * (0.4917317610505968 + cbrt(((z * 0.0692910599291889) * (z * (z * 0.004801250986110448)))))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
}
return tmp;
}
public static double code(double x, double y, double z) {
double tmp;
if (z <= -7.5e+48) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 1500.0) {
tmp = x + ((y * (0.279195317918525 + (z * (0.4917317610505968 + Math.cbrt(((z * 0.0692910599291889) * (z * (z * 0.004801250986110448)))))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -7.5e+48) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 1500.0) tmp = Float64(x + Float64(Float64(y * Float64(0.279195317918525 + Float64(z * Float64(0.4917317610505968 + cbrt(Float64(Float64(z * 0.0692910599291889) * Float64(z * Float64(z * 0.004801250986110448)))))))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304))); else tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -7.5e+48], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1500.0], N[(x + N[(N[(y * N[(0.279195317918525 + N[(z * N[(0.4917317610505968 + N[Power[N[(N[(z * 0.0692910599291889), $MachinePrecision] * N[(z * N[(z * 0.004801250986110448), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+48}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 1500:\\
\;\;\;\;x + \frac{y \cdot \left(0.279195317918525 + z \cdot \left(0.4917317610505968 + \sqrt[3]{\left(z \cdot 0.0692910599291889\right) \cdot \left(z \cdot \left(z \cdot 0.004801250986110448\right)\right)}\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -7.5000000000000006e48Initial program 29.5%
associate-/l*40.2%
fma-def40.2%
fma-def40.2%
fma-def40.2%
Simplified40.2%
Taylor expanded in z around inf 99.9%
if -7.5000000000000006e48 < z < 1500Initial program 99.7%
add-cbrt-cube_binary6499.7%
Applied rewrite-once99.7%
*-commutative99.7%
swap-sqr99.7%
metadata-eval99.7%
associate-*r*99.7%
Simplified99.7%
if 1500 < z Initial program 47.1%
associate-/l*59.4%
fma-def59.4%
fma-def59.4%
fma-def59.5%
Simplified59.5%
Taylor expanded in z around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
1e+291)
(+
x
(/
y
(/
(fma (+ z 6.012459259764103) z 3.350343815022304)
(fma
(fma z 0.0692910599291889 0.4917317610505968)
z
0.279195317918525))))
(+ x (/ y 14.431876219268936))))
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)) <= 1e+291) {
tmp = x + (y / (fma((z + 6.012459259764103), z, 3.350343815022304) / fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525)));
} else {
tmp = x + (y / 14.431876219268936);
}
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)) <= 1e+291) tmp = Float64(x + Float64(y / Float64(fma(Float64(z + 6.012459259764103), z, 3.350343815022304) / fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525)))); else tmp = Float64(x + Float64(y / 14.431876219268936)); 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], 1e+291], N[(x + N[(y / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z + 3.350343815022304), $MachinePrecision] / N[(N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] * z + 0.279195317918525), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $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 10^{+291}:\\
\;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)) < 9.9999999999999996e290Initial program 95.8%
associate-/l*99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
if 9.9999999999999996e290 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)) Initial program 0.8%
associate-/l*10.7%
fma-def10.7%
fma-def10.7%
fma-def10.7%
Simplified10.7%
Taylor expanded in z around inf 99.9%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= z -4e+20)
(+ x (/ y 14.431876219268936))
(if (<= z 1500.0)
(+
x
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ 3.350343815022304 (+ (* z z) (* z 6.012459259764103)))))
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -4e+20) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 1500.0) {
tmp = x + ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / (3.350343815022304 + ((z * z) + (z * 6.012459259764103))));
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / 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 <= (-4d+20)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 1500.0d0) then
tmp = x + ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / (3.350343815022304d0 + ((z * z) + (z * 6.012459259764103d0))))
else
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -4e+20) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 1500.0) {
tmp = x + ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / (3.350343815022304 + ((z * z) + (z * 6.012459259764103))));
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4e+20: tmp = x + (y / 14.431876219268936) elif z <= 1500.0: tmp = x + ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / (3.350343815022304 + ((z * z) + (z * 6.012459259764103)))) else: tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4e+20) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 1500.0) tmp = Float64(x + Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(3.350343815022304 + Float64(Float64(z * z) + Float64(z * 6.012459259764103))))); else tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4e+20) tmp = x + (y / 14.431876219268936); elseif (z <= 1500.0) tmp = x + ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / (3.350343815022304 + ((z * z) + (z * 6.012459259764103)))); else tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4e+20], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1500.0], N[(x + N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(3.350343815022304 + N[(N[(z * z), $MachinePrecision] + N[(z * 6.012459259764103), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+20}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 1500:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{3.350343815022304 + \left(z \cdot z + z \cdot 6.012459259764103\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -4e20Initial program 33.3%
associate-/l*43.5%
fma-def43.5%
fma-def43.5%
fma-def43.5%
Simplified43.5%
Taylor expanded in z around inf 99.9%
if -4e20 < z < 1500Initial program 99.7%
*-commutative99.7%
distribute-lft-in99.7%
Applied egg-rr99.7%
if 1500 < z Initial program 47.1%
associate-/l*59.4%
fma-def59.4%
fma-def59.4%
fma-def59.5%
Simplified59.5%
Taylor expanded in z around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -4e+20)
(+ x (/ y 14.431876219268936))
(if (<= z 1500.0)
(+
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
x)
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -4e+20) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 1500.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / 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 <= (-4d+20)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 1500.0d0) then
tmp = ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)) + x
else
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -4e+20) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 1500.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4e+20: tmp = x + (y / 14.431876219268936) elif z <= 1500.0: tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x else: tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4e+20) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 1500.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(14.431876219268936 - Float64(15.646356830292042 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4e+20) tmp = x + (y / 14.431876219268936); elseif (z <= 1500.0) tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x; else tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4e+20], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1500.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[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+20}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 1500:\\
\;\;\;\;\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 + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -4e20Initial program 33.3%
associate-/l*43.5%
fma-def43.5%
fma-def43.5%
fma-def43.5%
Simplified43.5%
Taylor expanded in z around inf 99.9%
if -4e20 < z < 1500Initial program 99.7%
if 1500 < z Initial program 47.1%
associate-/l*59.4%
fma-def59.4%
fma-def59.4%
fma-def59.5%
Simplified59.5%
Taylor expanded in z around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z))))
(if (<= z 6.4e-21)
(+ x (/ y 12.000000000000014))
(+
x
(/
y
(+
14.431876219268936
(/ (- (/ 101.23733352003822 z) 15.646356830292042) z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else if (z <= 6.4e-21) {
tmp = x + (y / 12.000000000000014);
} else {
tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / 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.5d0)) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
else if (z <= 6.4d-21) then
tmp = x + (y / 12.000000000000014d0)
else
tmp = x + (y / (14.431876219268936d0 + (((101.23733352003822d0 / z) - 15.646356830292042d0) / z)))
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 / (14.431876219268936 - (15.646356830292042 / z)));
} else if (z <= 6.4e-21) {
tmp = x + (y / 12.000000000000014);
} else {
tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) elif z <= 6.4e-21: tmp = x + (y / 12.000000000000014) else: tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); elseif (z <= 6.4e-21) tmp = Float64(x + Float64(y / 12.000000000000014)); else tmp = Float64(x + Float64(y / Float64(14.431876219268936 + Float64(Float64(Float64(101.23733352003822 / z) - 15.646356830292042) / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); elseif (z <= 6.4e-21) tmp = x + (y / 12.000000000000014); else tmp = x + (y / (14.431876219268936 + (((101.23733352003822 / z) - 15.646356830292042) / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e-21], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(14.431876219268936 + N[(N[(N[(101.23733352003822 / z), $MachinePrecision] - 15.646356830292042), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{-21}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936 + \frac{\frac{101.23733352003822}{z} - 15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -5.5Initial program 36.7%
associate-/l*46.3%
fma-def46.3%
fma-def46.3%
fma-def46.3%
Simplified46.3%
Taylor expanded in z around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
if -5.5 < z < 6.4000000000000003e-21Initial program 99.7%
associate-/l*99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in z around 0 99.9%
if 6.4000000000000003e-21 < z Initial program 50.0%
associate-/l*61.7%
fma-def61.7%
fma-def61.7%
fma-def61.7%
Simplified61.7%
Taylor expanded in z around inf 97.2%
cancel-sign-sub-inv97.2%
+-commutative97.2%
associate-+l+97.2%
associate-*r/97.2%
metadata-eval97.2%
unpow297.2%
cancel-sign-sub-inv97.2%
associate-*r/97.2%
metadata-eval97.2%
Simplified97.2%
+-commutative97.2%
associate-+l-97.2%
associate-/r*97.2%
sub-div97.2%
Applied egg-rr97.2%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5e+235)
(* y 0.0692910599291889)
(if (or (<= z 1.4e+14) (and (not (<= z 5.1e+104)) (<= z 5.7e+181)))
(+ x (/ y 12.000000000000014))
(* y 0.0692910599291889))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5e+235) {
tmp = y * 0.0692910599291889;
} else if ((z <= 1.4e+14) || (!(z <= 5.1e+104) && (z <= 5.7e+181))) {
tmp = x + (y / 12.000000000000014);
} else {
tmp = 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 <= (-5.5d+235)) then
tmp = y * 0.0692910599291889d0
else if ((z <= 1.4d+14) .or. (.not. (z <= 5.1d+104)) .and. (z <= 5.7d+181)) then
tmp = x + (y / 12.000000000000014d0)
else
tmp = y * 0.0692910599291889d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.5e+235) {
tmp = y * 0.0692910599291889;
} else if ((z <= 1.4e+14) || (!(z <= 5.1e+104) && (z <= 5.7e+181))) {
tmp = x + (y / 12.000000000000014);
} else {
tmp = y * 0.0692910599291889;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5e+235: tmp = y * 0.0692910599291889 elif (z <= 1.4e+14) or (not (z <= 5.1e+104) and (z <= 5.7e+181)): tmp = x + (y / 12.000000000000014) else: tmp = y * 0.0692910599291889 return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5e+235) tmp = Float64(y * 0.0692910599291889); elseif ((z <= 1.4e+14) || (!(z <= 5.1e+104) && (z <= 5.7e+181))) tmp = Float64(x + Float64(y / 12.000000000000014)); else tmp = Float64(y * 0.0692910599291889); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5e+235) tmp = y * 0.0692910599291889; elseif ((z <= 1.4e+14) || (~((z <= 5.1e+104)) && (z <= 5.7e+181))) tmp = x + (y / 12.000000000000014); else tmp = y * 0.0692910599291889; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5e+235], N[(y * 0.0692910599291889), $MachinePrecision], If[Or[LessEqual[z, 1.4e+14], And[N[Not[LessEqual[z, 5.1e+104]], $MachinePrecision], LessEqual[z, 5.7e+181]]], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision], N[(y * 0.0692910599291889), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+235}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+14} \lor \neg \left(z \leq 5.1 \cdot 10^{+104}\right) \land z \leq 5.7 \cdot 10^{+181}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if z < -5.49999999999999945e235 or 1.4e14 < z < 5.1000000000000002e104 or 5.7000000000000002e181 < z Initial program 30.1%
+-commutative30.1%
*-commutative30.1%
associate-*r/41.1%
fma-def41.1%
*-commutative41.1%
fma-def41.1%
fma-def41.1%
*-commutative41.1%
fma-def41.1%
Simplified41.1%
Taylor expanded in z around inf 99.3%
+-commutative99.3%
Simplified99.3%
Taylor expanded in y around inf 71.2%
if -5.49999999999999945e235 < z < 1.4e14 or 5.1000000000000002e104 < z < 5.7000000000000002e181Initial program 83.8%
associate-/l*87.4%
fma-def87.4%
fma-def87.4%
fma-def87.4%
Simplified87.4%
Taylor expanded in z around 0 89.6%
Final simplification85.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 6.4e-21))) (+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 6.4e-21)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (y / 12.000000000000014);
}
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 <= 6.4d-21))) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
else
tmp = x + (y / 12.000000000000014d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 6.4e-21)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 6.4e-21): tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 6.4e-21)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); else tmp = Float64(x + Float64(y / 12.000000000000014)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 6.4e-21))) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); else tmp = x + (y / 12.000000000000014); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 6.4e-21]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 6.4 \cdot 10^{-21}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -5.5 or 6.4000000000000003e-21 < z Initial program 44.1%
associate-/l*54.8%
fma-def54.8%
fma-def54.8%
fma-def54.8%
Simplified54.8%
Taylor expanded in z around inf 98.3%
associate-*r/98.3%
metadata-eval98.3%
Simplified98.3%
if -5.5 < z < 6.4000000000000003e-21Initial program 99.7%
associate-/l*99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in z around 0 99.9%
Final simplification99.1%
(FPCore (x y z)
:precision binary64
(if (<= x -2.5e-26)
x
(if (<= x -4e-62)
(* y 0.0692910599291889)
(if (<= x -2.6e-142)
x
(if (<= x 1.56e-122) (* y 0.0692910599291889) x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.5e-26) {
tmp = x;
} else if (x <= -4e-62) {
tmp = y * 0.0692910599291889;
} else if (x <= -2.6e-142) {
tmp = x;
} else if (x <= 1.56e-122) {
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 <= (-2.5d-26)) then
tmp = x
else if (x <= (-4d-62)) then
tmp = y * 0.0692910599291889d0
else if (x <= (-2.6d-142)) then
tmp = x
else if (x <= 1.56d-122) 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 <= -2.5e-26) {
tmp = x;
} else if (x <= -4e-62) {
tmp = y * 0.0692910599291889;
} else if (x <= -2.6e-142) {
tmp = x;
} else if (x <= 1.56e-122) {
tmp = y * 0.0692910599291889;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.5e-26: tmp = x elif x <= -4e-62: tmp = y * 0.0692910599291889 elif x <= -2.6e-142: tmp = x elif x <= 1.56e-122: tmp = y * 0.0692910599291889 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.5e-26) tmp = x; elseif (x <= -4e-62) tmp = Float64(y * 0.0692910599291889); elseif (x <= -2.6e-142) tmp = x; elseif (x <= 1.56e-122) tmp = Float64(y * 0.0692910599291889); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.5e-26) tmp = x; elseif (x <= -4e-62) tmp = y * 0.0692910599291889; elseif (x <= -2.6e-142) tmp = x; elseif (x <= 1.56e-122) tmp = y * 0.0692910599291889; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.5e-26], x, If[LessEqual[x, -4e-62], N[(y * 0.0692910599291889), $MachinePrecision], If[LessEqual[x, -2.6e-142], x, If[LessEqual[x, 1.56e-122], N[(y * 0.0692910599291889), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{-26}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-62}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{-142}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.56 \cdot 10^{-122}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.5000000000000001e-26 or -4.0000000000000002e-62 < x < -2.6e-142 or 1.5599999999999999e-122 < x Initial program 78.3%
+-commutative78.3%
*-commutative78.3%
associate-*r/81.9%
fma-def81.9%
*-commutative81.9%
fma-def81.9%
fma-def81.9%
*-commutative81.9%
fma-def81.9%
Simplified81.9%
Taylor expanded in y around 0 75.4%
if -2.5000000000000001e-26 < x < -4.0000000000000002e-62 or -2.6e-142 < x < 1.5599999999999999e-122Initial program 57.6%
+-commutative57.6%
*-commutative57.6%
associate-*r/66.4%
fma-def66.4%
*-commutative66.4%
fma-def66.4%
fma-def66.4%
*-commutative66.4%
fma-def66.4%
Simplified66.4%
Taylor expanded in z around inf 75.2%
+-commutative75.2%
Simplified75.2%
Taylor expanded in y around inf 65.1%
Final simplification72.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 6.4e-21))) (+ x (/ y 14.431876219268936)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 6.4e-21)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y / 12.000000000000014);
}
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 <= 6.4d-21))) then
tmp = x + (y / 14.431876219268936d0)
else
tmp = x + (y / 12.000000000000014d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 6.4e-21)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 6.4e-21): tmp = x + (y / 14.431876219268936) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 6.4e-21)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = Float64(x + Float64(y / 12.000000000000014)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 6.4e-21))) tmp = x + (y / 14.431876219268936); else tmp = x + (y / 12.000000000000014); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 6.4e-21]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 6.4 \cdot 10^{-21}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -5.5 or 6.4000000000000003e-21 < z Initial program 44.1%
associate-/l*54.8%
fma-def54.8%
fma-def54.8%
fma-def54.8%
Simplified54.8%
Taylor expanded in z around inf 97.9%
if -5.5 < z < 6.4000000000000003e-21Initial program 99.7%
associate-/l*99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in z around 0 99.9%
Final simplification98.9%
(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 71.7%
+-commutative71.7%
*-commutative71.7%
associate-*r/76.9%
fma-def76.9%
*-commutative76.9%
fma-def76.9%
fma-def76.9%
*-commutative76.9%
fma-def76.9%
Simplified76.9%
Taylor expanded in y around 0 55.6%
Final simplification55.6%
(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 2023297
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
:precision binary64
:herbie-target
(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))))