
(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 13 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 (or (<= z -2e+25) (not (<= z 1600000.0)))
(+ x (/ y 14.431876219268936))
(+
x
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ 3.350343815022304 (+ (* z z) (* z 6.012459259764103)))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2e+25) || !(z <= 1600000.0)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / (3.350343815022304 + ((z * z) + (z * 6.012459259764103))));
}
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 <= (-2d+25)) .or. (.not. (z <= 1600000.0d0))) then
tmp = x + (y / 14.431876219268936d0)
else
tmp = x + ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / (3.350343815022304d0 + ((z * z) + (z * 6.012459259764103d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2e+25) || !(z <= 1600000.0)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / (3.350343815022304 + ((z * z) + (z * 6.012459259764103))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2e+25) or not (z <= 1600000.0): tmp = x + (y / 14.431876219268936) else: tmp = x + ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / (3.350343815022304 + ((z * z) + (z * 6.012459259764103)))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2e+25) || !(z <= 1600000.0)) tmp = Float64(x + Float64(y / 14.431876219268936)); else 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))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2e+25) || ~((z <= 1600000.0))) tmp = x + (y / 14.431876219268936); else tmp = x + ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / (3.350343815022304 + ((z * z) + (z * 6.012459259764103)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2e+25], N[Not[LessEqual[z, 1600000.0]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+25} \lor \neg \left(z \leq 1600000\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;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)}\\
\end{array}
\end{array}
if z < -2.00000000000000018e25 or 1.6e6 < z Initial program 36.9%
associate-/l*49.4%
fma-def49.4%
fma-def49.4%
fma-def49.4%
Simplified49.4%
Taylor expanded in z around inf 99.9%
if -2.00000000000000018e25 < z < 1.6e6Initial program 99.6%
*-commutative99.6%
distribute-lft-in99.6%
Applied egg-rr99.6%
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+282)
(+
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+282) {
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+282) 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+282], 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^{+282}:\\
\;\;\;\;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)) < 1.00000000000000003e282Initial program 96.6%
associate-/l*99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
if 1.00000000000000003e282 < (/.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.7%
associate-/l*14.5%
fma-def14.5%
fma-def14.5%
fma-def14.5%
Simplified14.5%
Taylor expanded in z around inf 99.9%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
1e+282)
(+
x
(*
(/ y (fma z (+ z 6.012459259764103) 3.350343815022304))
(fma z (fma z 0.0692910599291889 0.4917317610505968) 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+282) {
tmp = x + ((y / fma(z, (z + 6.012459259764103), 3.350343815022304)) * fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 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+282) tmp = Float64(x + Float64(Float64(y / fma(z, Float64(z + 6.012459259764103), 3.350343815022304)) * fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 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+282], N[(x + N[(N[(y / N[(z * N[(z + 6.012459259764103), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] * N[(z * N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] + 0.279195317918525), $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^{+282}:\\
\;\;\;\;x + \frac{y}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)} \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 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)) < 1.00000000000000003e282Initial program 96.6%
associate-*l/98.1%
*-commutative98.1%
fma-def98.1%
*-commutative98.1%
fma-def98.1%
fma-def98.1%
Simplified98.1%
if 1.00000000000000003e282 < (/.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.7%
associate-/l*14.5%
fma-def14.5%
fma-def14.5%
fma-def14.5%
Simplified14.5%
Taylor expanded in z around inf 99.9%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -5e+24) (not (<= z 1600000.0)))
(+ x (/ y 14.431876219268936))
(+
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5e+24) || !(z <= 1600000.0)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + 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 ((z <= (-5d+24)) .or. (.not. (z <= 1600000.0d0))) then
tmp = x + (y / 14.431876219268936d0)
else
tmp = ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)) + x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5e+24) || !(z <= 1600000.0)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5e+24) or not (z <= 1600000.0): tmp = x + (y / 14.431876219268936) else: tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5e+24) || !(z <= 1600000.0)) tmp = Float64(x + Float64(y / 14.431876219268936)); else 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); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5e+24) || ~((z <= 1600000.0))) tmp = x + (y / 14.431876219268936); else tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5e+24], N[Not[LessEqual[z, 1600000.0]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+24} \lor \neg \left(z \leq 1600000\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;\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\\
\end{array}
\end{array}
if z < -5.00000000000000045e24 or 1.6e6 < z Initial program 36.9%
associate-/l*49.4%
fma-def49.4%
fma-def49.4%
fma-def49.4%
Simplified49.4%
Taylor expanded in z around inf 99.9%
if -5.00000000000000045e24 < z < 1.6e6Initial program 99.6%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -1.65e+24)
(+ x (/ y 14.431876219268936))
(if (<= z 4e-6)
(+ x (/ y (+ (* z 0.39999999996247915) 12.000000000000014)))
(+
x
(/
y
(+
14.431876219268936
(/ (+ -15.646356830292042 (/ 101.23733352003822 z)) z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.65e+24) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 4e-6) {
tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014));
} else {
tmp = x + (y / (14.431876219268936 + ((-15.646356830292042 + (101.23733352003822 / z)) / 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.65d+24)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 4d-6) then
tmp = x + (y / ((z * 0.39999999996247915d0) + 12.000000000000014d0))
else
tmp = x + (y / (14.431876219268936d0 + (((-15.646356830292042d0) + (101.23733352003822d0 / z)) / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.65e+24) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 4e-6) {
tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014));
} else {
tmp = x + (y / (14.431876219268936 + ((-15.646356830292042 + (101.23733352003822 / z)) / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.65e+24: tmp = x + (y / 14.431876219268936) elif z <= 4e-6: tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)) else: tmp = x + (y / (14.431876219268936 + ((-15.646356830292042 + (101.23733352003822 / z)) / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.65e+24) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 4e-6) tmp = Float64(x + Float64(y / Float64(Float64(z * 0.39999999996247915) + 12.000000000000014))); else tmp = Float64(x + Float64(y / Float64(14.431876219268936 + Float64(Float64(-15.646356830292042 + Float64(101.23733352003822 / z)) / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.65e+24) tmp = x + (y / 14.431876219268936); elseif (z <= 4e-6) tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)); else tmp = x + (y / (14.431876219268936 + ((-15.646356830292042 + (101.23733352003822 / z)) / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.65e+24], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-6], N[(x + N[(y / N[(N[(z * 0.39999999996247915), $MachinePrecision] + 12.000000000000014), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(14.431876219268936 + N[(N[(-15.646356830292042 + N[(101.23733352003822 / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-6}:\\
\;\;\;\;x + \frac{y}{z \cdot 0.39999999996247915 + 12.000000000000014}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936 + \frac{-15.646356830292042 + \frac{101.23733352003822}{z}}{z}}\\
\end{array}
\end{array}
if z < -1.6499999999999999e24Initial program 32.8%
associate-/l*43.3%
fma-def43.3%
fma-def43.3%
fma-def43.3%
Simplified43.3%
Taylor expanded in z around inf 99.9%
if -1.6499999999999999e24 < z < 3.99999999999999982e-6Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.9%
if 3.99999999999999982e-6 < z Initial program 43.5%
associate-/l*57.1%
fma-def57.1%
fma-def57.1%
fma-def57.1%
Simplified57.1%
Taylor expanded in z around inf 99.2%
associate--l+99.2%
associate-*r/99.2%
metadata-eval99.2%
unpow299.2%
associate-*r/99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around 0 99.2%
associate-*r/99.2%
metadata-eval99.2%
unpow299.2%
associate-/r*99.2%
associate-*r/99.2%
metadata-eval99.2%
associate-+r-99.2%
div-sub99.2%
*-lft-identity99.2%
*-lft-identity99.2%
sub-neg99.2%
metadata-eval99.2%
+-commutative99.2%
Simplified99.2%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (or (<= z -1.62e-15)
(and (not (<= z -1.8e-207))
(or (<= z -3.5e-285) (not (<= z 1.45e-212)))))
(+ x (* y 0.0692910599291889))
(* y 0.08333333333333323)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.62e-15) || (!(z <= -1.8e-207) && ((z <= -3.5e-285) || !(z <= 1.45e-212)))) {
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.62d-15)) .or. (.not. (z <= (-1.8d-207))) .and. (z <= (-3.5d-285)) .or. (.not. (z <= 1.45d-212))) 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.62e-15) || (!(z <= -1.8e-207) && ((z <= -3.5e-285) || !(z <= 1.45e-212)))) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.62e-15) or (not (z <= -1.8e-207) and ((z <= -3.5e-285) or not (z <= 1.45e-212))): tmp = x + (y * 0.0692910599291889) else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.62e-15) || (!(z <= -1.8e-207) && ((z <= -3.5e-285) || !(z <= 1.45e-212)))) 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.62e-15) || (~((z <= -1.8e-207)) && ((z <= -3.5e-285) || ~((z <= 1.45e-212))))) tmp = x + (y * 0.0692910599291889); else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.62e-15], And[N[Not[LessEqual[z, -1.8e-207]], $MachinePrecision], Or[LessEqual[z, -3.5e-285], N[Not[LessEqual[z, 1.45e-212]], $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.62 \cdot 10^{-15} \lor \neg \left(z \leq -1.8 \cdot 10^{-207}\right) \land \left(z \leq -3.5 \cdot 10^{-285} \lor \neg \left(z \leq 1.45 \cdot 10^{-212}\right)\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -1.62000000000000009e-15 or -1.7999999999999998e-207 < z < -3.5000000000000004e-285 or 1.45e-212 < z Initial program 58.2%
associate-*l/65.0%
*-commutative65.0%
fma-def65.0%
*-commutative65.0%
fma-def65.0%
fma-def65.0%
Simplified65.0%
Taylor expanded in z around inf 92.3%
*-commutative92.3%
Simplified92.3%
if -1.62000000000000009e-15 < z < -1.7999999999999998e-207 or -3.5000000000000004e-285 < z < 1.45e-212Initial program 99.5%
associate-/l*99.0%
fma-def99.0%
fma-def99.0%
fma-def99.0%
Simplified99.0%
Taylor expanded in z around 0 99.9%
+-commutative99.9%
div-inv99.8%
fma-def99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 74.8%
Final simplification87.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.65e+24) (not (<= z 4e-6))) (+ x (/ y 14.431876219268936)) (+ x (/ y (+ (* z 0.39999999996247915) 12.000000000000014)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.65e+24) || !(z <= 4e-6)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y / ((z * 0.39999999996247915) + 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 <= (-1.65d+24)) .or. (.not. (z <= 4d-6))) then
tmp = x + (y / 14.431876219268936d0)
else
tmp = x + (y / ((z * 0.39999999996247915d0) + 12.000000000000014d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.65e+24) || !(z <= 4e-6)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.65e+24) or not (z <= 4e-6): tmp = x + (y / 14.431876219268936) else: tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.65e+24) || !(z <= 4e-6)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = Float64(x + Float64(y / Float64(Float64(z * 0.39999999996247915) + 12.000000000000014))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.65e+24) || ~((z <= 4e-6))) tmp = x + (y / 14.431876219268936); else tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.65e+24], N[Not[LessEqual[z, 4e-6]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z * 0.39999999996247915), $MachinePrecision] + 12.000000000000014), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+24} \lor \neg \left(z \leq 4 \cdot 10^{-6}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot 0.39999999996247915 + 12.000000000000014}\\
\end{array}
\end{array}
if z < -1.6499999999999999e24 or 3.99999999999999982e-6 < z Initial program 38.4%
associate-/l*50.5%
fma-def50.5%
fma-def50.5%
fma-def50.5%
Simplified50.5%
Taylor expanded in z around inf 99.4%
if -1.6499999999999999e24 < z < 3.99999999999999982e-6Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.9%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= z -1.65e+24)
(+ x (/ y 14.431876219268936))
(if (<= z 4e-6)
(+ x (/ y (+ (* z 0.39999999996247915) 12.000000000000014)))
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.65e+24) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 4e-6) {
tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014));
} 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 <= (-1.65d+24)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 4d-6) then
tmp = x + (y / ((z * 0.39999999996247915d0) + 12.000000000000014d0))
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 <= -1.65e+24) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 4e-6) {
tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014));
} else {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.65e+24: tmp = x + (y / 14.431876219268936) elif z <= 4e-6: tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)) else: tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.65e+24) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 4e-6) tmp = Float64(x + Float64(y / Float64(Float64(z * 0.39999999996247915) + 12.000000000000014))); 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 <= -1.65e+24) tmp = x + (y / 14.431876219268936); elseif (z <= 4e-6) tmp = x + (y / ((z * 0.39999999996247915) + 12.000000000000014)); else tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.65e+24], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-6], N[(x + N[(y / N[(N[(z * 0.39999999996247915), $MachinePrecision] + 12.000000000000014), $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 -1.65 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-6}:\\
\;\;\;\;x + \frac{y}{z \cdot 0.39999999996247915 + 12.000000000000014}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -1.6499999999999999e24Initial program 32.8%
associate-/l*43.3%
fma-def43.3%
fma-def43.3%
fma-def43.3%
Simplified43.3%
Taylor expanded in z around inf 99.9%
if -1.6499999999999999e24 < z < 3.99999999999999982e-6Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.9%
if 3.99999999999999982e-6 < z Initial program 43.5%
associate-/l*57.1%
fma-def57.1%
fma-def57.1%
fma-def57.1%
Simplified57.1%
Taylor expanded in z around inf 99.0%
associate-*r/99.0%
metadata-eval99.0%
Simplified99.0%
Final simplification99.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.65e+24) (not (<= z 4e-6))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.65e+24) || !(z <= 4e-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 <= (-1.65d+24)) .or. (.not. (z <= 4d-6))) 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 <= -1.65e+24) || !(z <= 4e-6)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.65e+24) or not (z <= 4e-6): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.65e+24) || !(z <= 4e-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 <= -1.65e+24) || ~((z <= 4e-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, -1.65e+24], N[Not[LessEqual[z, 4e-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 -1.65 \cdot 10^{+24} \lor \neg \left(z \leq 4 \cdot 10^{-6}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -1.6499999999999999e24 or 3.99999999999999982e-6 < z Initial program 38.4%
associate-*l/48.4%
*-commutative48.4%
fma-def48.4%
*-commutative48.4%
fma-def48.4%
fma-def48.3%
Simplified48.3%
Taylor expanded in z around inf 99.2%
*-commutative99.2%
Simplified99.2%
if -1.6499999999999999e24 < z < 3.99999999999999982e-6Initial program 99.6%
associate-*l/99.6%
*-commutative99.6%
fma-def99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.65e+24) (not (<= z 4e-6))) (+ x (* y 0.0692910599291889)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.65e+24) || !(z <= 4e-6)) {
tmp = x + (y * 0.0692910599291889);
} 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 <= (-1.65d+24)) .or. (.not. (z <= 4d-6))) then
tmp = x + (y * 0.0692910599291889d0)
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 <= -1.65e+24) || !(z <= 4e-6)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.65e+24) or not (z <= 4e-6): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.65e+24) || !(z <= 4e-6)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(x + Float64(y / 12.000000000000014)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.65e+24) || ~((z <= 4e-6))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y / 12.000000000000014); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.65e+24], N[Not[LessEqual[z, 4e-6]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+24} \lor \neg \left(z \leq 4 \cdot 10^{-6}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -1.6499999999999999e24 or 3.99999999999999982e-6 < z Initial program 38.4%
associate-*l/48.4%
*-commutative48.4%
fma-def48.4%
*-commutative48.4%
fma-def48.4%
fma-def48.3%
Simplified48.3%
Taylor expanded in z around inf 99.2%
*-commutative99.2%
Simplified99.2%
if -1.6499999999999999e24 < z < 3.99999999999999982e-6Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.9%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.65e+24) (not (<= z 4e-6))) (+ x (/ y 14.431876219268936)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.65e+24) || !(z <= 4e-6)) {
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 <= (-1.65d+24)) .or. (.not. (z <= 4d-6))) 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 <= -1.65e+24) || !(z <= 4e-6)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.65e+24) or not (z <= 4e-6): tmp = x + (y / 14.431876219268936) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.65e+24) || !(z <= 4e-6)) 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 <= -1.65e+24) || ~((z <= 4e-6))) tmp = x + (y / 14.431876219268936); else tmp = x + (y / 12.000000000000014); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.65e+24], N[Not[LessEqual[z, 4e-6]], $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 -1.65 \cdot 10^{+24} \lor \neg \left(z \leq 4 \cdot 10^{-6}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -1.6499999999999999e24 or 3.99999999999999982e-6 < z Initial program 38.4%
associate-/l*50.5%
fma-def50.5%
fma-def50.5%
fma-def50.5%
Simplified50.5%
Taylor expanded in z around inf 99.4%
if -1.6499999999999999e24 < z < 3.99999999999999982e-6Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 99.9%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (if (<= y -1.35e+98) (* y 0.08333333333333323) (if (<= y 7.8e+37) x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.35e+98) {
tmp = y * 0.08333333333333323;
} else if (y <= 7.8e+37) {
tmp = x;
} 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 (y <= (-1.35d+98)) then
tmp = y * 0.08333333333333323d0
else if (y <= 7.8d+37) then
tmp = x
else
tmp = y * 0.08333333333333323d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1.35e+98) {
tmp = y * 0.08333333333333323;
} else if (y <= 7.8e+37) {
tmp = x;
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.35e+98: tmp = y * 0.08333333333333323 elif y <= 7.8e+37: tmp = x else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.35e+98) tmp = Float64(y * 0.08333333333333323); elseif (y <= 7.8e+37) tmp = x; else tmp = Float64(y * 0.08333333333333323); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.35e+98) tmp = y * 0.08333333333333323; elseif (y <= 7.8e+37) tmp = x; else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.35e+98], N[(y * 0.08333333333333323), $MachinePrecision], If[LessEqual[y, 7.8e+37], x, N[(y * 0.08333333333333323), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{+98}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+37}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if y < -1.35e98 or 7.7999999999999997e37 < y Initial program 53.1%
associate-/l*70.8%
fma-def70.8%
fma-def70.8%
fma-def70.8%
Simplified70.8%
Taylor expanded in z around 0 65.3%
+-commutative65.3%
div-inv65.2%
fma-def65.2%
metadata-eval65.2%
Applied egg-rr65.2%
Taylor expanded in y around inf 53.3%
if -1.35e98 < y < 7.7999999999999997e37Initial program 76.6%
associate-/l*76.5%
fma-def76.5%
fma-def76.5%
fma-def76.5%
Simplified76.5%
Taylor expanded in z around 0 90.0%
Taylor expanded in x around inf 72.2%
Final simplification65.7%
(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.5%
associate-/l*74.5%
fma-def74.5%
fma-def74.5%
fma-def74.5%
Simplified74.5%
Taylor expanded in z around 0 81.5%
Taylor expanded in x around inf 52.1%
Final simplification52.1%
(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 2023268
(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))))