
(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 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
5e+306)
(+
x
(*
y
(/
(fma (fma z 0.0692910599291889 0.4917317610505968) z 0.279195317918525)
(fma (+ z 6.012459259764103) z 3.350343815022304))))
(+ x (/ 1.0 (/ 14.431876219268936 y)))))
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+306) {
tmp = x + (y * (fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma((z + 6.012459259764103), z, 3.350343815022304)));
} else {
tmp = x + (1.0 / (14.431876219268936 / y));
}
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+306) tmp = Float64(x + Float64(y * Float64(fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma(Float64(z + 6.012459259764103), z, 3.350343815022304)))); else tmp = Float64(x + Float64(1.0 / Float64(14.431876219268936 / y))); 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+306], N[(x + N[(y * N[(N[(N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] * z + 0.279195317918525), $MachinePrecision] / N[(N[(z + 6.012459259764103), $MachinePrecision] * z + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.0 / N[(14.431876219268936 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 5 \cdot 10^{+306}:\\
\;\;\;\;x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{\frac{14.431876219268936}{y}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 4.99999999999999993e306Initial program 94.0%
remove-double-neg94.0%
associate-/l*99.7%
distribute-rgt-neg-in99.7%
distribute-lft-neg-in99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
remove-double-neg99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
Simplified99.7%
if 4.99999999999999993e306 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.9%
remove-double-neg0.9%
associate-/l*16.1%
distribute-rgt-neg-in16.1%
distribute-lft-neg-in16.1%
distribute-lft-neg-in16.1%
distribute-rgt-neg-in16.1%
remove-double-neg16.1%
fma-define16.1%
fma-define16.1%
fma-define16.1%
Simplified16.1%
fma-define16.1%
fma-define16.1%
fma-define16.1%
associate-/l*0.9%
clear-num0.9%
*-commutative0.9%
fma-undefine0.9%
*-commutative0.9%
fma-define0.9%
*-commutative0.9%
fma-undefine0.9%
Applied egg-rr0.9%
Taylor expanded in z around inf 99.8%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* z (+ z 6.012459259764103)) 3.350343815022304)))
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
t_0)
5e+306)
(fma (fma z (* z 0.0692910599291889) 0.279195317918525) (/ y t_0) x)
(+ x (/ 1.0 (/ 14.431876219268936 y))))))
double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double tmp;
if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / t_0) <= 5e+306) {
tmp = fma(fma(z, (z * 0.0692910599291889), 0.279195317918525), (y / t_0), x);
} else {
tmp = x + (1.0 / (14.431876219268936 / y));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / t_0) <= 5e+306) tmp = fma(fma(z, Float64(z * 0.0692910599291889), 0.279195317918525), Float64(y / t_0), x); else tmp = Float64(x + Float64(1.0 / Float64(14.431876219268936 / y))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 5e+306], N[(N[(z * N[(z * 0.0692910599291889), $MachinePrecision] + 0.279195317918525), $MachinePrecision] * N[(y / t$95$0), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(1.0 / N[(14.431876219268936 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\\
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{t\_0} \leq 5 \cdot 10^{+306}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, z \cdot 0.0692910599291889, 0.279195317918525\right), \frac{y}{t\_0}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{\frac{14.431876219268936}{y}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 4.99999999999999993e306Initial program 94.0%
+-commutative94.0%
*-commutative94.0%
associate-/l*99.1%
fma-define99.1%
*-commutative99.1%
fma-define99.1%
fma-define99.1%
*-commutative99.1%
fma-define99.1%
Simplified99.1%
Taylor expanded in z around inf 98.1%
*-commutative98.1%
Simplified98.1%
Taylor expanded in y around 0 98.1%
if 4.99999999999999993e306 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.9%
remove-double-neg0.9%
associate-/l*16.1%
distribute-rgt-neg-in16.1%
distribute-lft-neg-in16.1%
distribute-lft-neg-in16.1%
distribute-rgt-neg-in16.1%
remove-double-neg16.1%
fma-define16.1%
fma-define16.1%
fma-define16.1%
Simplified16.1%
fma-define16.1%
fma-define16.1%
fma-define16.1%
associate-/l*0.9%
clear-num0.9%
*-commutative0.9%
fma-undefine0.9%
*-commutative0.9%
fma-define0.9%
*-commutative0.9%
fma-undefine0.9%
Applied egg-rr0.9%
Taylor expanded in z around inf 99.8%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -3.8e+19) (not (<= z 32000000000000.0)))
(+ x (/ 1.0 (/ 14.431876219268936 y)))
(+
(/
(*
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 <= -3.8e+19) || !(z <= 32000000000000.0)) {
tmp = x + (1.0 / (14.431876219268936 / y));
} 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 <= (-3.8d+19)) .or. (.not. (z <= 32000000000000.0d0))) then
tmp = x + (1.0d0 / (14.431876219268936d0 / y))
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 <= -3.8e+19) || !(z <= 32000000000000.0)) {
tmp = x + (1.0 / (14.431876219268936 / y));
} 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 <= -3.8e+19) or not (z <= 32000000000000.0): tmp = x + (1.0 / (14.431876219268936 / y)) 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 <= -3.8e+19) || !(z <= 32000000000000.0)) tmp = Float64(x + Float64(1.0 / Float64(14.431876219268936 / y))); 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 <= -3.8e+19) || ~((z <= 32000000000000.0))) tmp = x + (1.0 / (14.431876219268936 / y)); 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, -3.8e+19], N[Not[LessEqual[z, 32000000000000.0]], $MachinePrecision]], N[(x + N[(1.0 / N[(14.431876219268936 / y), $MachinePrecision]), $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 -3.8 \cdot 10^{+19} \lor \neg \left(z \leq 32000000000000\right):\\
\;\;\;\;x + \frac{1}{\frac{14.431876219268936}{y}}\\
\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 < -3.8e19 or 3.2e13 < z Initial program 25.3%
remove-double-neg25.3%
associate-/l*44.4%
distribute-rgt-neg-in44.4%
distribute-lft-neg-in44.4%
distribute-lft-neg-in44.4%
distribute-rgt-neg-in44.4%
remove-double-neg44.4%
fma-define44.4%
fma-define44.4%
fma-define44.4%
Simplified44.4%
fma-define44.4%
fma-define44.4%
fma-define44.4%
associate-/l*25.3%
clear-num25.3%
*-commutative25.3%
fma-undefine25.3%
*-commutative25.3%
fma-define25.3%
*-commutative25.3%
fma-undefine25.3%
Applied egg-rr25.3%
Taylor expanded in z around inf 99.8%
if -3.8e19 < z < 3.2e13Initial program 99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= x -1.15e-97)
x
(if (<= x -2.1e-299)
(* y 0.08333333333333323)
(if (<= x 9.6e-199)
(* y 0.0692910599291889)
(if (<= x 7e-13) (* y 0.08333333333333323) x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.15e-97) {
tmp = x;
} else if (x <= -2.1e-299) {
tmp = y * 0.08333333333333323;
} else if (x <= 9.6e-199) {
tmp = y * 0.0692910599291889;
} else if (x <= 7e-13) {
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 (x <= (-1.15d-97)) then
tmp = x
else if (x <= (-2.1d-299)) then
tmp = y * 0.08333333333333323d0
else if (x <= 9.6d-199) then
tmp = y * 0.0692910599291889d0
else if (x <= 7d-13) 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 (x <= -1.15e-97) {
tmp = x;
} else if (x <= -2.1e-299) {
tmp = y * 0.08333333333333323;
} else if (x <= 9.6e-199) {
tmp = y * 0.0692910599291889;
} else if (x <= 7e-13) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.15e-97: tmp = x elif x <= -2.1e-299: tmp = y * 0.08333333333333323 elif x <= 9.6e-199: tmp = y * 0.0692910599291889 elif x <= 7e-13: tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.15e-97) tmp = x; elseif (x <= -2.1e-299) tmp = Float64(y * 0.08333333333333323); elseif (x <= 9.6e-199) tmp = Float64(y * 0.0692910599291889); elseif (x <= 7e-13) tmp = Float64(y * 0.08333333333333323); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.15e-97) tmp = x; elseif (x <= -2.1e-299) tmp = y * 0.08333333333333323; elseif (x <= 9.6e-199) tmp = y * 0.0692910599291889; elseif (x <= 7e-13) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.15e-97], x, If[LessEqual[x, -2.1e-299], N[(y * 0.08333333333333323), $MachinePrecision], If[LessEqual[x, 9.6e-199], N[(y * 0.0692910599291889), $MachinePrecision], If[LessEqual[x, 7e-13], N[(y * 0.08333333333333323), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{-97}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-299}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{elif}\;x \leq 9.6 \cdot 10^{-199}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-13}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.14999999999999997e-97 or 7.0000000000000005e-13 < x Initial program 66.8%
+-commutative66.8%
*-commutative66.8%
associate-/l*75.0%
fma-define75.0%
*-commutative75.0%
fma-define75.0%
fma-define75.0%
*-commutative75.0%
fma-define75.0%
Simplified75.0%
Taylor expanded in y around 0 68.8%
if -1.14999999999999997e-97 < x < -2.1000000000000001e-299 or 9.59999999999999983e-199 < x < 7.0000000000000005e-13Initial program 73.5%
+-commutative73.5%
*-commutative73.5%
associate-/l*79.1%
fma-define79.1%
*-commutative79.1%
fma-define79.1%
fma-define79.1%
*-commutative79.1%
fma-define79.1%
Simplified79.1%
Taylor expanded in z around 0 78.1%
+-commutative78.1%
Simplified78.1%
Taylor expanded in y around inf 61.9%
if -2.1000000000000001e-299 < x < 9.59999999999999983e-199Initial program 46.7%
+-commutative46.7%
*-commutative46.7%
associate-/l*62.5%
fma-define62.5%
*-commutative62.5%
fma-define62.5%
fma-define62.5%
*-commutative62.5%
fma-define62.4%
Simplified62.4%
Taylor expanded in z around inf 76.9%
+-commutative76.9%
Simplified76.9%
Taylor expanded in y around inf 68.4%
Final simplification66.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -5.5) (not (<= z 1.35e-8)))
(+
x
(*
y
(-
0.0692910599291889
(/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z))))
(+ x (/ y (+ 12.000000000000014 (* z 0.39999999996247915))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.35e-8)) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-5.5d0)) .or. (.not. (z <= 1.35d-8))) then
tmp = x + (y * (0.0692910599291889d0 - (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
else
tmp = x + (y / (12.000000000000014d0 + (z * 0.39999999996247915d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.35e-8)) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 1.35e-8): tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))) else: tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 1.35e-8)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z)))); else tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * 0.39999999996247915)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 1.35e-8))) tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))); else tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 1.35e-8]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 - N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(12.000000000000014 + N[(z * 0.39999999996247915), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 1.35 \cdot 10^{-8}\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot 0.39999999996247915}\\
\end{array}
\end{array}
if z < -5.5 or 1.35000000000000001e-8 < z Initial program 31.4%
remove-double-neg31.4%
associate-/l*48.9%
distribute-rgt-neg-in48.9%
distribute-lft-neg-in48.9%
distribute-lft-neg-in48.9%
distribute-rgt-neg-in48.9%
remove-double-neg48.9%
fma-define48.9%
fma-define48.9%
fma-define48.9%
Simplified48.9%
Taylor expanded in z around -inf 99.0%
mul-1-neg99.0%
unsub-neg99.0%
sub-neg99.0%
associate-*r/99.0%
metadata-eval99.0%
metadata-eval99.0%
Simplified99.0%
if -5.5 < z < 1.35000000000000001e-8Initial program 99.6%
remove-double-neg99.6%
associate-/l*99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
associate-/l*99.6%
clear-num99.6%
*-commutative99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
*-commutative99.6%
fma-undefine99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in y around 0 99.9%
*-commutative99.9%
Simplified99.9%
Final simplification99.5%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+ x (/ 1.0 (/ 14.431876219268936 y)))
(if (<= z 1.35e-8)
(+ x (* y 0.08333333333333323))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (1.0 / (14.431876219268936 / y));
} else if (z <= 1.35e-8) {
tmp = x + (y * 0.08333333333333323);
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-5.5d0)) then
tmp = x + (1.0d0 / (14.431876219268936d0 / y))
else if (z <= 1.35d-8) then
tmp = x + (y * 0.08333333333333323d0)
else
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (1.0 / (14.431876219268936 / y));
} else if (z <= 1.35e-8) {
tmp = x + (y * 0.08333333333333323);
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (1.0 / (14.431876219268936 / y)) elif z <= 1.35e-8: tmp = x + (y * 0.08333333333333323) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(1.0 / Float64(14.431876219268936 / y))); elseif (z <= 1.35e-8) tmp = Float64(x + Float64(y * 0.08333333333333323)); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x + (1.0 / (14.431876219268936 / y)); elseif (z <= 1.35e-8) tmp = x + (y * 0.08333333333333323); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(1.0 / N[(14.431876219268936 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-8], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + \frac{1}{\frac{14.431876219268936}{y}}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-8}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -5.5Initial program 34.9%
remove-double-neg34.9%
associate-/l*50.8%
distribute-rgt-neg-in50.8%
distribute-lft-neg-in50.8%
distribute-lft-neg-in50.8%
distribute-rgt-neg-in50.8%
remove-double-neg50.8%
fma-define50.8%
fma-define50.8%
fma-define50.8%
Simplified50.8%
fma-define50.8%
fma-define50.8%
fma-define50.8%
associate-/l*34.9%
clear-num34.9%
*-commutative34.9%
fma-undefine34.9%
*-commutative34.9%
fma-define34.9%
*-commutative34.9%
fma-undefine34.9%
Applied egg-rr34.9%
Taylor expanded in z around inf 98.5%
if -5.5 < z < 1.35000000000000001e-8Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in z around 0 99.8%
+-commutative99.8%
Simplified99.8%
if 1.35000000000000001e-8 < z Initial program 29.1%
remove-double-neg29.1%
associate-/l*47.7%
distribute-rgt-neg-in47.7%
distribute-lft-neg-in47.7%
distribute-lft-neg-in47.7%
distribute-rgt-neg-in47.7%
remove-double-neg47.7%
fma-define47.7%
fma-define47.7%
fma-define47.7%
Simplified47.7%
Taylor expanded in z around inf 98.9%
associate-*r/98.9%
metadata-eval98.9%
Simplified98.9%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+ x (/ 1.0 (/ 14.431876219268936 y)))
(if (<= z 1.35e-8)
(+ x (/ y (+ 12.000000000000014 (* z 0.39999999996247915))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (1.0 / (14.431876219268936 / y));
} else if (z <= 1.35e-8) {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-5.5d0)) then
tmp = x + (1.0d0 / (14.431876219268936d0 / y))
else if (z <= 1.35d-8) then
tmp = x + (y / (12.000000000000014d0 + (z * 0.39999999996247915d0)))
else
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (1.0 / (14.431876219268936 / y));
} else if (z <= 1.35e-8) {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (1.0 / (14.431876219268936 / y)) elif z <= 1.35e-8: tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(1.0 / Float64(14.431876219268936 / y))); elseif (z <= 1.35e-8) tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * 0.39999999996247915)))); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x + (1.0 / (14.431876219268936 / y)); elseif (z <= 1.35e-8) tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(1.0 / N[(14.431876219268936 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-8], N[(x + N[(y / N[(12.000000000000014 + N[(z * 0.39999999996247915), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + \frac{1}{\frac{14.431876219268936}{y}}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-8}:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot 0.39999999996247915}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -5.5Initial program 34.9%
remove-double-neg34.9%
associate-/l*50.8%
distribute-rgt-neg-in50.8%
distribute-lft-neg-in50.8%
distribute-lft-neg-in50.8%
distribute-rgt-neg-in50.8%
remove-double-neg50.8%
fma-define50.8%
fma-define50.8%
fma-define50.8%
Simplified50.8%
fma-define50.8%
fma-define50.8%
fma-define50.8%
associate-/l*34.9%
clear-num34.9%
*-commutative34.9%
fma-undefine34.9%
*-commutative34.9%
fma-define34.9%
*-commutative34.9%
fma-undefine34.9%
Applied egg-rr34.9%
Taylor expanded in z around inf 98.5%
if -5.5 < z < 1.35000000000000001e-8Initial program 99.6%
remove-double-neg99.6%
associate-/l*99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
associate-/l*99.6%
clear-num99.6%
*-commutative99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
*-commutative99.6%
fma-undefine99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in y around 0 99.9%
*-commutative99.9%
Simplified99.9%
if 1.35000000000000001e-8 < z Initial program 29.1%
remove-double-neg29.1%
associate-/l*47.7%
distribute-rgt-neg-in47.7%
distribute-lft-neg-in47.7%
distribute-lft-neg-in47.7%
distribute-rgt-neg-in47.7%
remove-double-neg47.7%
fma-define47.7%
fma-define47.7%
fma-define47.7%
Simplified47.7%
Taylor expanded in z around inf 98.9%
associate-*r/98.9%
metadata-eval98.9%
Simplified98.9%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.35e-8))) (+ x (/ 1.0 (/ 14.431876219268936 y))) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.35e-8)) {
tmp = x + (1.0 / (14.431876219268936 / y));
} 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 <= 1.35d-8))) then
tmp = x + (1.0d0 / (14.431876219268936d0 / y))
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 <= 1.35e-8)) {
tmp = x + (1.0 / (14.431876219268936 / y));
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 1.35e-8): tmp = x + (1.0 / (14.431876219268936 / y)) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 1.35e-8)) tmp = Float64(x + Float64(1.0 / Float64(14.431876219268936 / y))); 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 <= 1.35e-8))) tmp = x + (1.0 / (14.431876219268936 / y)); 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, 1.35e-8]], $MachinePrecision]], N[(x + N[(1.0 / N[(14.431876219268936 / y), $MachinePrecision]), $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 1.35 \cdot 10^{-8}\right):\\
\;\;\;\;x + \frac{1}{\frac{14.431876219268936}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.5 or 1.35000000000000001e-8 < z Initial program 31.4%
remove-double-neg31.4%
associate-/l*48.9%
distribute-rgt-neg-in48.9%
distribute-lft-neg-in48.9%
distribute-lft-neg-in48.9%
distribute-rgt-neg-in48.9%
remove-double-neg48.9%
fma-define48.9%
fma-define48.9%
fma-define48.9%
Simplified48.9%
fma-define48.9%
fma-define48.9%
fma-define48.9%
associate-/l*31.4%
clear-num31.3%
*-commutative31.3%
fma-undefine31.3%
*-commutative31.3%
fma-define31.3%
*-commutative31.3%
fma-undefine31.3%
Applied egg-rr31.3%
Taylor expanded in z around inf 98.4%
if -5.5 < z < 1.35000000000000001e-8Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in z around 0 99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -4.2e-71) (not (<= z -7.5e-232))) (+ x (* y 0.0692910599291889)) (* y 0.08333333333333323)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -4.2e-71) || !(z <= -7.5e-232)) {
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 <= (-4.2d-71)) .or. (.not. (z <= (-7.5d-232)))) 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 <= -4.2e-71) || !(z <= -7.5e-232)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -4.2e-71) or not (z <= -7.5e-232): tmp = x + (y * 0.0692910599291889) else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -4.2e-71) || !(z <= -7.5e-232)) 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 <= -4.2e-71) || ~((z <= -7.5e-232))) tmp = x + (y * 0.0692910599291889); else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -4.2e-71], N[Not[LessEqual[z, -7.5e-232]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(y * 0.08333333333333323), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-71} \lor \neg \left(z \leq -7.5 \cdot 10^{-232}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -4.2000000000000002e-71 or -7.5000000000000006e-232 < z Initial program 61.6%
+-commutative61.6%
*-commutative61.6%
associate-/l*71.0%
fma-define71.0%
*-commutative71.0%
fma-define71.0%
fma-define71.0%
*-commutative71.0%
fma-define71.0%
Simplified71.0%
Taylor expanded in z around inf 80.7%
+-commutative80.7%
Simplified80.7%
if -4.2000000000000002e-71 < z < -7.5000000000000006e-232Initial program 99.5%
+-commutative99.5%
*-commutative99.5%
associate-/l*99.5%
fma-define99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
*-commutative99.5%
fma-define99.5%
Simplified99.5%
Taylor expanded in z around 0 99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 67.3%
Final simplification78.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 1.35e-8))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 1.35e-8)) {
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 <= 1.35d-8))) 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 <= 1.35e-8)) {
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 <= 1.35e-8): 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 <= 1.35e-8)) 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 <= 1.35e-8))) 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, 1.35e-8]], $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 1.35 \cdot 10^{-8}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.5 or 1.35000000000000001e-8 < z Initial program 31.4%
+-commutative31.4%
*-commutative31.4%
associate-/l*48.2%
fma-define48.2%
*-commutative48.2%
fma-define48.2%
fma-define48.2%
*-commutative48.2%
fma-define48.2%
Simplified48.2%
Taylor expanded in z around inf 98.0%
+-commutative98.0%
Simplified98.0%
if -5.5 < z < 1.35000000000000001e-8Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
*-commutative99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in z around 0 99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.0%
(FPCore (x y z) :precision binary64 (if (<= x -8.5e-32) x (if (<= x 2.55e-48) (* y 0.0692910599291889) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -8.5e-32) {
tmp = x;
} else if (x <= 2.55e-48) {
tmp = y * 0.0692910599291889;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-8.5d-32)) then
tmp = x
else if (x <= 2.55d-48) then
tmp = y * 0.0692910599291889d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -8.5e-32) {
tmp = x;
} else if (x <= 2.55e-48) {
tmp = y * 0.0692910599291889;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -8.5e-32: tmp = x elif x <= 2.55e-48: tmp = y * 0.0692910599291889 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -8.5e-32) tmp = x; elseif (x <= 2.55e-48) tmp = Float64(y * 0.0692910599291889); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -8.5e-32) tmp = x; elseif (x <= 2.55e-48) tmp = y * 0.0692910599291889; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -8.5e-32], x, If[LessEqual[x, 2.55e-48], N[(y * 0.0692910599291889), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{-32}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.55 \cdot 10^{-48}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -8.5000000000000003e-32 or 2.55000000000000006e-48 < x Initial program 68.1%
+-commutative68.1%
*-commutative68.1%
associate-/l*75.1%
fma-define75.1%
*-commutative75.1%
fma-define75.1%
fma-define75.1%
*-commutative75.1%
fma-define75.1%
Simplified75.1%
Taylor expanded in y around 0 68.8%
if -8.5000000000000003e-32 < x < 2.55000000000000006e-48Initial program 65.8%
+-commutative65.8%
*-commutative65.8%
associate-/l*75.1%
fma-define75.1%
*-commutative75.1%
fma-define75.1%
fma-define75.1%
*-commutative75.1%
fma-define75.1%
Simplified75.1%
Taylor expanded in z around inf 63.3%
+-commutative63.3%
Simplified63.3%
Taylor expanded in y around inf 48.1%
Final simplification59.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 67.1%
+-commutative67.1%
*-commutative67.1%
associate-/l*75.1%
fma-define75.1%
*-commutative75.1%
fma-define75.1%
fma-define75.1%
*-commutative75.1%
fma-define75.1%
Simplified75.1%
Taylor expanded in y around 0 47.1%
Final simplification47.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 2024076
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
:precision binary64
:alt
(if (< z -8120153.652456675) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x)) (if (< z 6.576118972787377e+20) (+ x (* (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304)))) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x))))
(+ x (/ (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))