
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
(FPCore (x y z)
:precision binary64
(if (or (<= z -9.8e+33) (not (<= z 36000.0)))
(+ x (/ y 14.431876219268936))
(+
x
(+
(/
(* y (* z (+ (* z 0.0692910599291889) 0.4917317610505968)))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
(*
0.279195317918525
(/ y (fma z (+ z 6.012459259764103) 3.350343815022304)))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -9.8e+33) || !(z <= 36000.0)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (((y * (z * ((z * 0.0692910599291889) + 0.4917317610505968))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + (0.279195317918525 * (y / fma(z, (z + 6.012459259764103), 3.350343815022304))));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if ((z <= -9.8e+33) || !(z <= 36000.0)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = Float64(x + Float64(Float64(Float64(y * Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) + Float64(0.279195317918525 * Float64(y / fma(z, Float64(z + 6.012459259764103), 3.350343815022304))))); end return tmp end
code[x_, y_, z_] := If[Or[LessEqual[z, -9.8e+33], N[Not[LessEqual[z, 36000.0]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y * N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] + N[(0.279195317918525 * N[(y / N[(z * N[(z + 6.012459259764103), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+33} \lor \neg \left(z \leq 36000\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} + 0.279195317918525 \cdot \frac{y}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}\right)\\
\end{array}
\end{array}
if z < -9.80000000000000027e33 or 36000 < z Initial program 33.9%
associate-/l*48.4%
fma-def48.4%
fma-def48.4%
fma-def48.4%
Simplified48.4%
Taylor expanded in z around inf 100.0%
if -9.80000000000000027e33 < z < 36000Initial program 99.6%
associate-*l/99.6%
*-commutative99.6%
fma-def99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Simplified99.6%
fma-udef99.6%
*-commutative99.6%
distribute-lft-in99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 99.7%
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))
x)
5e+302)
(+
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)) + x) <= 5e+302) {
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(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) + x) <= 5e+302) 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[(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], 5e+302], 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} + x \leq 5 \cdot 10^{+302}:\\
\;\;\;\;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 x (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000))) < 5e302Initial program 94.2%
associate-*l/98.1%
*-commutative98.1%
fma-def98.1%
*-commutative98.1%
fma-def98.1%
fma-def98.1%
Simplified98.1%
if 5e302 < (+.f64 x (/.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*13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
Simplified13.5%
Taylor expanded in z around inf 100.0%
Final simplification98.7%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
5e+302)
(+
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)) <= 5e+302) {
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)) <= 5e+302) 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], 5e+302], 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 5 \cdot 10^{+302}:\\
\;\;\;\;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)) < 5e302Initial program 94.2%
associate-/l*99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
if 5e302 < (/.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*13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
Simplified13.5%
Taylor expanded in z around inf 100.0%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -9.8e+33) (not (<= z 36000.0)))
(+ x (/ y 14.431876219268936))
(+
x
(/
(+
(* y (* z (+ (* z 0.0692910599291889) 0.4917317610505968)))
(* y 0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -9.8e+33) || !(z <= 36000.0)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (((y * (z * ((z * 0.0692910599291889) + 0.4917317610505968))) + (y * 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
}
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 <= (-9.8d+33)) .or. (.not. (z <= 36000.0d0))) then
tmp = x + (y / 14.431876219268936d0)
else
tmp = x + (((y * (z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0))) + (y * 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -9.8e+33) || !(z <= 36000.0)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (((y * (z * ((z * 0.0692910599291889) + 0.4917317610505968))) + (y * 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -9.8e+33) or not (z <= 36000.0): tmp = x + (y / 14.431876219268936) else: tmp = x + (((y * (z * ((z * 0.0692910599291889) + 0.4917317610505968))) + (y * 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -9.8e+33) || !(z <= 36000.0)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = Float64(x + Float64(Float64(Float64(y * Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968))) + Float64(y * 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -9.8e+33) || ~((z <= 36000.0))) tmp = x + (y / 14.431876219268936); else tmp = x + (((y * (z * ((z * 0.0692910599291889) + 0.4917317610505968))) + (y * 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -9.8e+33], N[Not[LessEqual[z, 36000.0]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y * N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+33} \lor \neg \left(z \leq 36000\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)\right) + y \cdot 0.279195317918525}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\end{array}
\end{array}
if z < -9.80000000000000027e33 or 36000 < z Initial program 33.9%
associate-/l*48.4%
fma-def48.4%
fma-def48.4%
fma-def48.4%
Simplified48.4%
Taylor expanded in z around inf 100.0%
if -9.80000000000000027e33 < z < 36000Initial program 99.6%
distribute-lft-in99.6%
fma-def99.6%
*-commutative99.6%
Applied egg-rr99.6%
fma-def99.6%
Applied egg-rr99.6%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (or (<= z -9.8e+33) (not (<= z 36000.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 <= -9.8e+33) || !(z <= 36000.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 <= (-9.8d+33)) .or. (.not. (z <= 36000.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 <= -9.8e+33) || !(z <= 36000.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 <= -9.8e+33) or not (z <= 36000.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 <= -9.8e+33) || !(z <= 36000.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 <= -9.8e+33) || ~((z <= 36000.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, -9.8e+33], N[Not[LessEqual[z, 36000.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 -9.8 \cdot 10^{+33} \lor \neg \left(z \leq 36000\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 < -9.80000000000000027e33 or 36000 < z Initial program 33.9%
associate-/l*48.4%
fma-def48.4%
fma-def48.4%
fma-def48.4%
Simplified48.4%
Taylor expanded in z around inf 100.0%
if -9.80000000000000027e33 < z < 36000Initial program 99.6%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+ x (* y (- 0.0692910599291889 (/ -0.07512208616047561 z))))
(if (<= z 6.2)
(+ x (/ y (+ 12.000000000000014 (* z 0.39999999996247915))))
(+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y * (0.0692910599291889 - (-0.07512208616047561 / z)));
} else if (z <= 6.2) {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
} else {
tmp = x + (y / 14.431876219268936);
}
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 - ((-0.07512208616047561d0) / z)))
else if (z <= 6.2d0) then
tmp = x + (y / (12.000000000000014d0 + (z * 0.39999999996247915d0)))
else
tmp = x + (y / 14.431876219268936d0)
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 - (-0.07512208616047561 / z)));
} else if (z <= 6.2) {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (y * (0.0692910599291889 - (-0.07512208616047561 / z))) elif z <= 6.2: tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))) else: tmp = x + (y / 14.431876219268936) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(-0.07512208616047561 / z)))); elseif (z <= 6.2) tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * 0.39999999996247915)))); else tmp = Float64(x + Float64(y / 14.431876219268936)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x + (y * (0.0692910599291889 - (-0.07512208616047561 / z))); elseif (z <= 6.2) tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))); else tmp = x + (y / 14.431876219268936); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y * N[(0.0692910599291889 - N[(-0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2], N[(x + N[(y / N[(12.000000000000014 + N[(z * 0.39999999996247915), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{-0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 6.2:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot 0.39999999996247915}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\end{array}
\end{array}
if z < -5.5Initial program 32.6%
associate-*l/45.4%
*-commutative45.4%
fma-def45.4%
*-commutative45.4%
fma-def45.4%
fma-def45.4%
Simplified45.4%
Taylor expanded in z around -inf 99.6%
+-commutative99.6%
mul-1-neg99.6%
unsub-neg99.6%
*-commutative99.6%
distribute-rgt-out--99.6%
associate-/l*99.6%
metadata-eval99.6%
Simplified99.6%
div-inv99.6%
clear-num99.6%
distribute-lft-out--99.6%
Applied egg-rr99.6%
if -5.5 < z < 6.20000000000000018Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 98.0%
*-commutative98.0%
Simplified98.0%
if 6.20000000000000018 < z Initial program 39.9%
associate-/l*53.1%
fma-def53.1%
fma-def53.1%
fma-def53.1%
Simplified53.1%
Taylor expanded in z around inf 99.0%
Final simplification98.7%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z))))
(if (<= z 6.2)
(+ x (/ y (+ 12.000000000000014 (* z 0.39999999996247915))))
(+ x (/ y 14.431876219268936)))))
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.2) {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
} else {
tmp = x + (y / 14.431876219268936);
}
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.2d0) then
tmp = x + (y / (12.000000000000014d0 + (z * 0.39999999996247915d0)))
else
tmp = x + (y / 14.431876219268936d0)
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.2) {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) elif z <= 6.2: tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))) else: tmp = x + (y / 14.431876219268936) 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.2) tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * 0.39999999996247915)))); else tmp = Float64(x + Float64(y / 14.431876219268936)); 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.2) tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))); else tmp = x + (y / 14.431876219268936); 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.2], N[(x + N[(y / N[(12.000000000000014 + N[(z * 0.39999999996247915), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $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.2:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot 0.39999999996247915}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\end{array}
\end{array}
if z < -5.5Initial program 32.6%
associate-/l*47.4%
fma-def47.4%
fma-def47.4%
fma-def47.4%
Simplified47.4%
Taylor expanded in z around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
if -5.5 < z < 6.20000000000000018Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 98.0%
*-commutative98.0%
Simplified98.0%
if 6.20000000000000018 < z Initial program 39.9%
associate-/l*53.1%
fma-def53.1%
fma-def53.1%
fma-def53.1%
Simplified53.1%
Taylor expanded in z around inf 99.0%
Final simplification98.8%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+ x (* y (- 0.0692910599291889 (/ -0.07512208616047561 z))))
(if (<= z 5.6)
(+ x (/ y 12.000000000000014))
(+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y * (0.0692910599291889 - (-0.07512208616047561 / z)));
} else if (z <= 5.6) {
tmp = x + (y / 12.000000000000014);
} else {
tmp = x + (y / 14.431876219268936);
}
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 - ((-0.07512208616047561d0) / z)))
else if (z <= 5.6d0) then
tmp = x + (y / 12.000000000000014d0)
else
tmp = x + (y / 14.431876219268936d0)
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 - (-0.07512208616047561 / z)));
} else if (z <= 5.6) {
tmp = x + (y / 12.000000000000014);
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (y * (0.0692910599291889 - (-0.07512208616047561 / z))) elif z <= 5.6: tmp = x + (y / 12.000000000000014) else: tmp = x + (y / 14.431876219268936) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(-0.07512208616047561 / z)))); elseif (z <= 5.6) tmp = Float64(x + Float64(y / 12.000000000000014)); else tmp = Float64(x + Float64(y / 14.431876219268936)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x + (y * (0.0692910599291889 - (-0.07512208616047561 / z))); elseif (z <= 5.6) tmp = x + (y / 12.000000000000014); else tmp = x + (y / 14.431876219268936); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y * N[(0.0692910599291889 - N[(-0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{-0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 5.6:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\end{array}
\end{array}
if z < -5.5Initial program 32.6%
associate-*l/45.4%
*-commutative45.4%
fma-def45.4%
*-commutative45.4%
fma-def45.4%
fma-def45.4%
Simplified45.4%
Taylor expanded in z around -inf 99.6%
+-commutative99.6%
mul-1-neg99.6%
unsub-neg99.6%
*-commutative99.6%
distribute-rgt-out--99.6%
associate-/l*99.6%
metadata-eval99.6%
Simplified99.6%
div-inv99.6%
clear-num99.6%
distribute-lft-out--99.6%
Applied egg-rr99.6%
if -5.5 < z < 5.5999999999999996Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 97.3%
if 5.5999999999999996 < z Initial program 39.9%
associate-/l*53.1%
fma-def53.1%
fma-def53.1%
fma-def53.1%
Simplified53.1%
Taylor expanded in z around inf 99.0%
Final simplification98.4%
(FPCore (x y z) :precision binary64 (if (or (<= y 1.16e+98) (not (<= y 7.8e+266))) (+ x (* y 0.0692910599291889)) (* y 0.08333333333333323)))
double code(double x, double y, double z) {
double tmp;
if ((y <= 1.16e+98) || !(y <= 7.8e+266)) {
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 ((y <= 1.16d+98) .or. (.not. (y <= 7.8d+266))) 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 ((y <= 1.16e+98) || !(y <= 7.8e+266)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= 1.16e+98) or not (y <= 7.8e+266): tmp = x + (y * 0.0692910599291889) else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if ((y <= 1.16e+98) || !(y <= 7.8e+266)) 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 ((y <= 1.16e+98) || ~((y <= 7.8e+266))) tmp = x + (y * 0.0692910599291889); else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, 1.16e+98], N[Not[LessEqual[y, 7.8e+266]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(y * 0.08333333333333323), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.16 \cdot 10^{+98} \lor \neg \left(y \leq 7.8 \cdot 10^{+266}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if y < 1.15999999999999995e98 or 7.79999999999999984e266 < y Initial program 63.6%
associate-*l/68.4%
*-commutative68.4%
fma-def68.4%
*-commutative68.4%
fma-def68.4%
fma-def68.4%
Simplified68.4%
Taylor expanded in z around inf 86.1%
*-commutative86.1%
Simplified86.1%
if 1.15999999999999995e98 < y < 7.79999999999999984e266Initial program 70.3%
associate-/l*86.6%
fma-def86.6%
fma-def86.6%
fma-def86.6%
Simplified86.6%
Taylor expanded in z around 0 82.3%
Taylor expanded in x around 0 82.2%
+-commutative82.2%
*-commutative82.2%
fma-udef82.2%
Simplified82.2%
Taylor expanded in y around inf 64.0%
Final simplification82.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 6.0))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 6.0)) {
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 <= (-5.5d0)) .or. (.not. (z <= 6.0d0))) 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 <= -5.5) || !(z <= 6.0)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 6.0): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 6.0)) 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 <= -5.5) || ~((z <= 6.0))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 6.0]], $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 -5.5 \lor \neg \left(z \leq 6\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.5 or 6 < z Initial program 36.7%
associate-*l/48.6%
*-commutative48.6%
fma-def48.6%
*-commutative48.6%
fma-def48.6%
fma-def48.6%
Simplified48.6%
Taylor expanded in z around inf 98.8%
*-commutative98.8%
Simplified98.8%
if -5.5 < z < 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 97.2%
*-commutative97.2%
Simplified97.2%
Final simplification98.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 6.3))) (+ x (* y 0.0692910599291889)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 6.3)) {
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 <= (-5.5d0)) .or. (.not. (z <= 6.3d0))) 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 <= -5.5) || !(z <= 6.3)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 6.3): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 6.3)) 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 <= -5.5) || ~((z <= 6.3))) tmp = x + (y * 0.0692910599291889); 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.3]], $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 -5.5 \lor \neg \left(z \leq 6.3\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -5.5 or 6.29999999999999982 < z Initial program 36.7%
associate-*l/48.6%
*-commutative48.6%
fma-def48.6%
*-commutative48.6%
fma-def48.6%
fma-def48.6%
Simplified48.6%
Taylor expanded in z around inf 98.8%
*-commutative98.8%
Simplified98.8%
if -5.5 < z < 6.29999999999999982Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 97.3%
Final simplification98.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 5.8))) (+ x (/ y 14.431876219268936)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.8)) {
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 <= 5.8d0))) 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 <= 5.8)) {
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 <= 5.8): 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 <= 5.8)) 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 <= 5.8))) 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, 5.8]], $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 5.8\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -5.5 or 5.79999999999999982 < z Initial program 36.7%
associate-/l*50.6%
fma-def50.6%
fma-def50.6%
fma-def50.6%
Simplified50.6%
Taylor expanded in z around inf 99.2%
if -5.5 < z < 5.79999999999999982Initial program 99.6%
associate-/l*99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 97.3%
Final simplification98.3%
(FPCore (x y z) :precision binary64 (if (or (<= y -6.6e+80) (not (<= y 9.6e-11))) (* y 0.08333333333333323) x))
double code(double x, double y, double z) {
double tmp;
if ((y <= -6.6e+80) || !(y <= 9.6e-11)) {
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 <= (-6.6d+80)) .or. (.not. (y <= 9.6d-11))) 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 <= -6.6e+80) || !(y <= 9.6e-11)) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -6.6e+80) or not (y <= 9.6e-11): tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -6.6e+80) || !(y <= 9.6e-11)) tmp = Float64(y * 0.08333333333333323); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -6.6e+80) || ~((y <= 9.6e-11))) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -6.6e+80], N[Not[LessEqual[y, 9.6e-11]], $MachinePrecision]], N[(y * 0.08333333333333323), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.6 \cdot 10^{+80} \lor \neg \left(y \leq 9.6 \cdot 10^{-11}\right):\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.59999999999999982e80 or 9.6000000000000005e-11 < y Initial program 58.0%
associate-/l*75.3%
fma-def75.2%
fma-def75.2%
fma-def75.2%
Simplified75.2%
Taylor expanded in z around 0 65.1%
Taylor expanded in x around 0 65.1%
+-commutative65.1%
*-commutative65.1%
fma-udef65.1%
Simplified65.1%
Taylor expanded in y around inf 49.6%
if -6.59999999999999982e80 < y < 9.6000000000000005e-11Initial program 69.5%
associate-/l*70.1%
fma-def70.1%
fma-def70.1%
fma-def70.1%
Simplified70.1%
Taylor expanded in z around 0 86.3%
Taylor expanded in x around inf 74.3%
Final simplification63.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 64.7%
associate-/l*72.3%
fma-def72.3%
fma-def72.3%
fma-def72.3%
Simplified72.3%
Taylor expanded in z around 0 77.3%
Taylor expanded in x around inf 50.6%
Final simplification50.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 2023336
(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))))