
(FPCore (x y z t a) :precision binary64 (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
double code(double x, double y, double z, double t, double a) {
return ((x * y) * z) / sqrt(((z * z) - (t * a)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) * z) / sqrt(((z * z) - (t * a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) * z) / Math.sqrt(((z * z) - (t * a)));
}
def code(x, y, z, t, a): return ((x * y) * z) / math.sqrt(((z * z) - (t * a)))
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) * z) / sqrt(Float64(Float64(z * z) - Float64(t * a)))) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) * z) / sqrt(((z * z) - (t * a))); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
double code(double x, double y, double z, double t, double a) {
return ((x * y) * z) / sqrt(((z * z) - (t * a)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) * z) / sqrt(((z * z) - (t * a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) * z) / Math.sqrt(((z * z) - (t * a)));
}
def code(x, y, z, t, a): return ((x * y) * z) / math.sqrt(((z * z) - (t * a)))
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) * z) / sqrt(Float64(Float64(z * z) - Float64(t * a)))) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) * z) / sqrt(((z * z) - (t * a))); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.7e+86)
(* y (- x))
(if (<= z 1.1e-70)
(* y (/ (* z x) (sqrt (- (* z z) (* t a)))))
(/ (* y x) (sqrt (- 1.0 (/ a (/ (* z z) t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.7e+86) {
tmp = y * -x;
} else if (z <= 1.1e-70) {
tmp = y * ((z * x) / sqrt(((z * z) - (t * a))));
} else {
tmp = (y * x) / sqrt((1.0 - (a / ((z * z) / t))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.7d+86)) then
tmp = y * -x
else if (z <= 1.1d-70) then
tmp = y * ((z * x) / sqrt(((z * z) - (t * a))))
else
tmp = (y * x) / sqrt((1.0d0 - (a / ((z * z) / t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.7e+86) {
tmp = y * -x;
} else if (z <= 1.1e-70) {
tmp = y * ((z * x) / Math.sqrt(((z * z) - (t * a))));
} else {
tmp = (y * x) / Math.sqrt((1.0 - (a / ((z * z) / t))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.7e+86: tmp = y * -x elif z <= 1.1e-70: tmp = y * ((z * x) / math.sqrt(((z * z) - (t * a)))) else: tmp = (y * x) / math.sqrt((1.0 - (a / ((z * z) / t)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.7e+86) tmp = Float64(y * Float64(-x)); elseif (z <= 1.1e-70) tmp = Float64(y * Float64(Float64(z * x) / sqrt(Float64(Float64(z * z) - Float64(t * a))))); else tmp = Float64(Float64(y * x) / sqrt(Float64(1.0 - Float64(a / Float64(Float64(z * z) / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.7e+86) tmp = y * -x; elseif (z <= 1.1e-70) tmp = y * ((z * x) / sqrt(((z * z) - (t * a)))); else tmp = (y * x) / sqrt((1.0 - (a / ((z * z) / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.7e+86], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.1e-70], N[(y * N[(N[(z * x), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / N[Sqrt[N[(1.0 - N[(a / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.7 \cdot 10^{+86}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-70}:\\
\;\;\;\;y \cdot \frac{z \cdot x}{\sqrt{z \cdot z - t \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{\sqrt{1 - \frac{a}{\frac{z \cdot z}{t}}}}\\
\end{array}
\end{array}
if z < -6.69999999999999968e86Initial program 29.8%
*-commutative29.8%
associate-*l*25.9%
associate-*r/26.0%
Simplified26.0%
Taylor expanded in z around -inf 96.5%
neg-mul-196.5%
Simplified96.5%
if -6.69999999999999968e86 < z < 1.0999999999999999e-70Initial program 73.1%
*-commutative73.1%
associate-*l*77.3%
associate-*r/80.1%
Simplified80.1%
if 1.0999999999999999e-70 < z Initial program 56.5%
associate-/l*60.6%
Simplified60.6%
add-sqr-sqrt60.6%
sqrt-unprod60.6%
frac-times55.3%
add-sqr-sqrt55.3%
Applied egg-rr55.3%
div-sub55.3%
*-inverses97.0%
*-commutative97.0%
associate-/l*98.9%
Simplified98.9%
Final simplification90.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.2e+86)
(* y (- x))
(if (<= z 4.3e+24)
(* y (/ (* z x) (sqrt (- (* z z) (* t a)))))
(/ (* y x) (+ 1.0 (* (/ a (/ (* z z) t)) -0.5))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.2e+86) {
tmp = y * -x;
} else if (z <= 4.3e+24) {
tmp = y * ((z * x) / sqrt(((z * z) - (t * a))));
} else {
tmp = (y * x) / (1.0 + ((a / ((z * z) / t)) * -0.5));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5.2d+86)) then
tmp = y * -x
else if (z <= 4.3d+24) then
tmp = y * ((z * x) / sqrt(((z * z) - (t * a))))
else
tmp = (y * x) / (1.0d0 + ((a / ((z * z) / t)) * (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.2e+86) {
tmp = y * -x;
} else if (z <= 4.3e+24) {
tmp = y * ((z * x) / Math.sqrt(((z * z) - (t * a))));
} else {
tmp = (y * x) / (1.0 + ((a / ((z * z) / t)) * -0.5));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.2e+86: tmp = y * -x elif z <= 4.3e+24: tmp = y * ((z * x) / math.sqrt(((z * z) - (t * a)))) else: tmp = (y * x) / (1.0 + ((a / ((z * z) / t)) * -0.5)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.2e+86) tmp = Float64(y * Float64(-x)); elseif (z <= 4.3e+24) tmp = Float64(y * Float64(Float64(z * x) / sqrt(Float64(Float64(z * z) - Float64(t * a))))); else tmp = Float64(Float64(y * x) / Float64(1.0 + Float64(Float64(a / Float64(Float64(z * z) / t)) * -0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.2e+86) tmp = y * -x; elseif (z <= 4.3e+24) tmp = y * ((z * x) / sqrt(((z * z) - (t * a)))); else tmp = (y * x) / (1.0 + ((a / ((z * z) / t)) * -0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.2e+86], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 4.3e+24], N[(y * N[(N[(z * x), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / N[(1.0 + N[(N[(a / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+86}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+24}:\\
\;\;\;\;y \cdot \frac{z \cdot x}{\sqrt{z \cdot z - t \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{1 + \frac{a}{\frac{z \cdot z}{t}} \cdot -0.5}\\
\end{array}
\end{array}
if z < -5.1999999999999995e86Initial program 29.8%
*-commutative29.8%
associate-*l*25.9%
associate-*r/26.0%
Simplified26.0%
Taylor expanded in z around -inf 96.5%
neg-mul-196.5%
Simplified96.5%
if -5.1999999999999995e86 < z < 4.29999999999999987e24Initial program 76.8%
*-commutative76.8%
associate-*l*80.2%
associate-*r/82.6%
Simplified82.6%
if 4.29999999999999987e24 < z Initial program 45.7%
associate-/l*51.0%
Simplified51.0%
Taylor expanded in z around inf 95.0%
unpow295.0%
associate-/l*95.1%
Simplified95.1%
Final simplification89.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -7e-69)
(* y (- x))
(if (<= z 2.9e-67)
(* y (/ (* z x) (sqrt (* t (- a)))))
(/ (* y x) (+ 1.0 (* (/ a (/ (* z z) t)) -0.5))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7e-69) {
tmp = y * -x;
} else if (z <= 2.9e-67) {
tmp = y * ((z * x) / sqrt((t * -a)));
} else {
tmp = (y * x) / (1.0 + ((a / ((z * z) / t)) * -0.5));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-7d-69)) then
tmp = y * -x
else if (z <= 2.9d-67) then
tmp = y * ((z * x) / sqrt((t * -a)))
else
tmp = (y * x) / (1.0d0 + ((a / ((z * z) / t)) * (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7e-69) {
tmp = y * -x;
} else if (z <= 2.9e-67) {
tmp = y * ((z * x) / Math.sqrt((t * -a)));
} else {
tmp = (y * x) / (1.0 + ((a / ((z * z) / t)) * -0.5));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7e-69: tmp = y * -x elif z <= 2.9e-67: tmp = y * ((z * x) / math.sqrt((t * -a))) else: tmp = (y * x) / (1.0 + ((a / ((z * z) / t)) * -0.5)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7e-69) tmp = Float64(y * Float64(-x)); elseif (z <= 2.9e-67) tmp = Float64(y * Float64(Float64(z * x) / sqrt(Float64(t * Float64(-a))))); else tmp = Float64(Float64(y * x) / Float64(1.0 + Float64(Float64(a / Float64(Float64(z * z) / t)) * -0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7e-69) tmp = y * -x; elseif (z <= 2.9e-67) tmp = y * ((z * x) / sqrt((t * -a))); else tmp = (y * x) / (1.0 + ((a / ((z * z) / t)) * -0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7e-69], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 2.9e-67], N[(y * N[(N[(z * x), $MachinePrecision] / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / N[(1.0 + N[(N[(a / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-69}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-67}:\\
\;\;\;\;y \cdot \frac{z \cdot x}{\sqrt{t \cdot \left(-a\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{1 + \frac{a}{\frac{z \cdot z}{t}} \cdot -0.5}\\
\end{array}
\end{array}
if z < -7.0000000000000003e-69Initial program 45.3%
*-commutative45.3%
associate-*l*42.8%
associate-*r/44.9%
Simplified44.9%
Taylor expanded in z around -inf 82.0%
neg-mul-182.0%
Simplified82.0%
if -7.0000000000000003e-69 < z < 2.90000000000000005e-67Initial program 73.4%
*-commutative73.4%
associate-*l*78.9%
associate-*r/80.7%
Simplified80.7%
Taylor expanded in z around 0 68.4%
associate-*r*68.4%
neg-mul-168.4%
Simplified68.4%
if 2.90000000000000005e-67 < z Initial program 55.5%
associate-/l*59.8%
Simplified59.8%
Taylor expanded in z around inf 93.5%
unpow293.5%
associate-/l*93.6%
Simplified93.6%
Final simplification82.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.7e-211)
(* y (- x))
(if (<= z 1.22e-92)
(* y (/ (* z x) (+ z (* -0.5 (/ (* t a) z)))))
(* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e-211) {
tmp = y * -x;
} else if (z <= 1.22e-92) {
tmp = y * ((z * x) / (z + (-0.5 * ((t * a) / z))));
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.7d-211)) then
tmp = y * -x
else if (z <= 1.22d-92) then
tmp = y * ((z * x) / (z + ((-0.5d0) * ((t * a) / z))))
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e-211) {
tmp = y * -x;
} else if (z <= 1.22e-92) {
tmp = y * ((z * x) / (z + (-0.5 * ((t * a) / z))));
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.7e-211: tmp = y * -x elif z <= 1.22e-92: tmp = y * ((z * x) / (z + (-0.5 * ((t * a) / z)))) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.7e-211) tmp = Float64(y * Float64(-x)); elseif (z <= 1.22e-92) tmp = Float64(y * Float64(Float64(z * x) / Float64(z + Float64(-0.5 * Float64(Float64(t * a) / z))))); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.7e-211) tmp = y * -x; elseif (z <= 1.22e-92) tmp = y * ((z * x) / (z + (-0.5 * ((t * a) / z)))); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e-211], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.22e-92], N[(y * N[(N[(z * x), $MachinePrecision] / N[(z + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-211}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{-92}:\\
\;\;\;\;y \cdot \frac{z \cdot x}{z + -0.5 \cdot \frac{t \cdot a}{z}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -1.7e-211Initial program 48.1%
*-commutative48.1%
associate-*l*47.9%
associate-*r/49.1%
Simplified49.1%
Taylor expanded in z around -inf 72.3%
neg-mul-172.3%
Simplified72.3%
if -1.7e-211 < z < 1.21999999999999994e-92Initial program 75.8%
*-commutative75.8%
associate-*l*81.6%
associate-*r/85.3%
Simplified85.3%
Taylor expanded in z around inf 43.7%
if 1.21999999999999994e-92 < z Initial program 59.0%
*-commutative59.0%
associate-*l*57.4%
associate-*r/60.4%
Simplified60.4%
Taylor expanded in z around inf 90.2%
Final simplification74.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.6e-211) (* y (- x)) (if (<= z 9.6e-93) (/ y (/ (+ z (* -0.5 (/ (* t a) z))) (* z x))) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.6e-211) {
tmp = y * -x;
} else if (z <= 9.6e-93) {
tmp = y / ((z + (-0.5 * ((t * a) / z))) / (z * x));
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.6d-211)) then
tmp = y * -x
else if (z <= 9.6d-93) then
tmp = y / ((z + ((-0.5d0) * ((t * a) / z))) / (z * x))
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.6e-211) {
tmp = y * -x;
} else if (z <= 9.6e-93) {
tmp = y / ((z + (-0.5 * ((t * a) / z))) / (z * x));
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.6e-211: tmp = y * -x elif z <= 9.6e-93: tmp = y / ((z + (-0.5 * ((t * a) / z))) / (z * x)) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.6e-211) tmp = Float64(y * Float64(-x)); elseif (z <= 9.6e-93) tmp = Float64(y / Float64(Float64(z + Float64(-0.5 * Float64(Float64(t * a) / z))) / Float64(z * x))); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.6e-211) tmp = y * -x; elseif (z <= 9.6e-93) tmp = y / ((z + (-0.5 * ((t * a) / z))) / (z * x)); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.6e-211], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 9.6e-93], N[(y / N[(N[(z + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-211}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{-93}:\\
\;\;\;\;\frac{y}{\frac{z + -0.5 \cdot \frac{t \cdot a}{z}}{z \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -1.59999999999999993e-211Initial program 48.1%
*-commutative48.1%
associate-*l*47.9%
associate-*r/49.1%
Simplified49.1%
Taylor expanded in z around -inf 72.3%
neg-mul-172.3%
Simplified72.3%
if -1.59999999999999993e-211 < z < 9.6000000000000004e-93Initial program 75.8%
*-commutative75.8%
associate-*l*81.6%
associate-*r/85.3%
Simplified85.3%
clear-num85.3%
un-div-inv85.3%
*-commutative85.3%
Applied egg-rr85.3%
Taylor expanded in z around inf 43.7%
if 9.6000000000000004e-93 < z Initial program 59.0%
*-commutative59.0%
associate-*l*57.4%
associate-*r/60.4%
Simplified60.4%
Taylor expanded in z around inf 90.2%
Final simplification74.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.95e-209) (* y (- x)) (if (<= z 2.5e-162) (* 2.0 (/ (* x (* z y)) (* t (/ a z)))) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e-209) {
tmp = y * -x;
} else if (z <= 2.5e-162) {
tmp = 2.0 * ((x * (z * y)) / (t * (a / z)));
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.95d-209)) then
tmp = y * -x
else if (z <= 2.5d-162) then
tmp = 2.0d0 * ((x * (z * y)) / (t * (a / z)))
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e-209) {
tmp = y * -x;
} else if (z <= 2.5e-162) {
tmp = 2.0 * ((x * (z * y)) / (t * (a / z)));
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.95e-209: tmp = y * -x elif z <= 2.5e-162: tmp = 2.0 * ((x * (z * y)) / (t * (a / z))) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.95e-209) tmp = Float64(y * Float64(-x)); elseif (z <= 2.5e-162) tmp = Float64(2.0 * Float64(Float64(x * Float64(z * y)) / Float64(t * Float64(a / z)))); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.95e-209) tmp = y * -x; elseif (z <= 2.5e-162) tmp = 2.0 * ((x * (z * y)) / (t * (a / z))); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.95e-209], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 2.5e-162], N[(2.0 * N[(N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision] / N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-209}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-162}:\\
\;\;\;\;2 \cdot \frac{x \cdot \left(z \cdot y\right)}{t \cdot \frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -1.95e-209Initial program 48.6%
*-commutative48.6%
associate-*l*48.4%
associate-*r/49.6%
Simplified49.6%
Taylor expanded in z around -inf 72.9%
neg-mul-172.9%
Simplified72.9%
if -1.95e-209 < z < 2.50000000000000007e-162Initial program 74.7%
associate-*l/71.1%
Simplified71.1%
Taylor expanded in z around -inf 40.3%
Taylor expanded in a around inf 37.3%
associate-*l/37.3%
frac-2neg37.3%
associate-/l*40.4%
Applied egg-rr40.4%
neg-mul-140.4%
distribute-lft-neg-in40.4%
metadata-eval40.4%
times-frac40.4%
metadata-eval40.4%
associate-*l*40.6%
*-commutative40.6%
associate-/r/40.5%
Simplified40.5%
if 2.50000000000000007e-162 < z Initial program 60.6%
*-commutative60.6%
associate-*l*60.8%
associate-*r/63.8%
Simplified63.8%
Taylor expanded in z around inf 85.6%
Final simplification73.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.6e-209) (* y (- x)) (if (<= z 3.5e-160) (* z (* 2.0 (/ (/ (* y (* z x)) a) t))) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e-209) {
tmp = y * -x;
} else if (z <= 3.5e-160) {
tmp = z * (2.0 * (((y * (z * x)) / a) / t));
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.6d-209)) then
tmp = y * -x
else if (z <= 3.5d-160) then
tmp = z * (2.0d0 * (((y * (z * x)) / a) / t))
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e-209) {
tmp = y * -x;
} else if (z <= 3.5e-160) {
tmp = z * (2.0 * (((y * (z * x)) / a) / t));
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.6e-209: tmp = y * -x elif z <= 3.5e-160: tmp = z * (2.0 * (((y * (z * x)) / a) / t)) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.6e-209) tmp = Float64(y * Float64(-x)); elseif (z <= 3.5e-160) tmp = Float64(z * Float64(2.0 * Float64(Float64(Float64(y * Float64(z * x)) / a) / t))); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.6e-209) tmp = y * -x; elseif (z <= 3.5e-160) tmp = z * (2.0 * (((y * (z * x)) / a) / t)); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.6e-209], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 3.5e-160], N[(z * N[(2.0 * N[(N[(N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-209}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-160}:\\
\;\;\;\;z \cdot \left(2 \cdot \frac{\frac{y \cdot \left(z \cdot x\right)}{a}}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -2.59999999999999984e-209Initial program 48.6%
*-commutative48.6%
associate-*l*48.4%
associate-*r/49.6%
Simplified49.6%
Taylor expanded in z around -inf 72.9%
neg-mul-172.9%
Simplified72.9%
if -2.59999999999999984e-209 < z < 3.5000000000000003e-160Initial program 74.7%
associate-*l/71.1%
Simplified71.1%
Taylor expanded in z around -inf 40.3%
Taylor expanded in a around inf 37.3%
Taylor expanded in x around 0 37.4%
associate-/r*40.6%
*-commutative40.6%
Simplified40.6%
if 3.5000000000000003e-160 < z Initial program 60.6%
*-commutative60.6%
associate-*l*60.8%
associate-*r/63.8%
Simplified63.8%
Taylor expanded in z around inf 85.6%
Final simplification73.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.3e-209) (* y (- x)) (/ (* y x) (+ 1.0 (* (/ a (/ (* z z) t)) -0.5)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.3e-209) {
tmp = y * -x;
} else {
tmp = (y * x) / (1.0 + ((a / ((z * z) / t)) * -0.5));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.3d-209)) then
tmp = y * -x
else
tmp = (y * x) / (1.0d0 + ((a / ((z * z) / t)) * (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.3e-209) {
tmp = y * -x;
} else {
tmp = (y * x) / (1.0 + ((a / ((z * z) / t)) * -0.5));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.3e-209: tmp = y * -x else: tmp = (y * x) / (1.0 + ((a / ((z * z) / t)) * -0.5)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.3e-209) tmp = Float64(y * Float64(-x)); else tmp = Float64(Float64(y * x) / Float64(1.0 + Float64(Float64(a / Float64(Float64(z * z) / t)) * -0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.3e-209) tmp = y * -x; else tmp = (y * x) / (1.0 + ((a / ((z * z) / t)) * -0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.3e-209], N[(y * (-x)), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / N[(1.0 + N[(N[(a / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-209}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{1 + \frac{a}{\frac{z \cdot z}{t}} \cdot -0.5}\\
\end{array}
\end{array}
if z < -1.29999999999999992e-209Initial program 48.6%
*-commutative48.6%
associate-*l*48.4%
associate-*r/49.6%
Simplified49.6%
Taylor expanded in z around -inf 72.9%
neg-mul-172.9%
Simplified72.9%
if -1.29999999999999992e-209 < z Initial program 64.0%
associate-/l*67.2%
Simplified67.2%
Taylor expanded in z around inf 73.8%
unpow273.8%
associate-/l*74.6%
Simplified74.6%
Final simplification73.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.2e-215) (* y (- x)) (if (<= z 3.2e-163) (/ 1.0 (/ z (* y (* z x)))) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.2e-215) {
tmp = y * -x;
} else if (z <= 3.2e-163) {
tmp = 1.0 / (z / (y * (z * x)));
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5.2d-215)) then
tmp = y * -x
else if (z <= 3.2d-163) then
tmp = 1.0d0 / (z / (y * (z * x)))
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.2e-215) {
tmp = y * -x;
} else if (z <= 3.2e-163) {
tmp = 1.0 / (z / (y * (z * x)));
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.2e-215: tmp = y * -x elif z <= 3.2e-163: tmp = 1.0 / (z / (y * (z * x))) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.2e-215) tmp = Float64(y * Float64(-x)); elseif (z <= 3.2e-163) tmp = Float64(1.0 / Float64(z / Float64(y * Float64(z * x)))); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.2e-215) tmp = y * -x; elseif (z <= 3.2e-163) tmp = 1.0 / (z / (y * (z * x))); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.2e-215], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 3.2e-163], N[(1.0 / N[(z / N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{-215}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-163}:\\
\;\;\;\;\frac{1}{\frac{z}{y \cdot \left(z \cdot x\right)}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -5.2e-215Initial program 49.1%
*-commutative49.1%
associate-*l*48.8%
associate-*r/50.1%
Simplified50.1%
Taylor expanded in z around -inf 71.0%
neg-mul-171.0%
Simplified71.0%
if -5.2e-215 < z < 3.19999999999999988e-163Initial program 74.6%
associate-*l/70.5%
Simplified70.5%
Taylor expanded in z around -inf 19.6%
mul-1-neg19.6%
associate-/l*19.3%
distribute-neg-frac19.3%
Simplified19.3%
associate-*l/28.8%
Applied egg-rr28.8%
clear-num28.8%
inv-pow28.8%
*-commutative28.8%
add-sqr-sqrt18.7%
sqrt-unprod28.7%
sqr-neg28.7%
sqrt-unprod10.2%
add-sqr-sqrt28.9%
Applied egg-rr28.9%
unpow-128.9%
associate-/l/35.5%
*-commutative35.5%
associate-*r*38.5%
*-commutative38.5%
Simplified38.5%
if 3.19999999999999988e-163 < z Initial program 60.9%
*-commutative60.9%
associate-*l*61.1%
associate-*r/64.1%
Simplified64.1%
Taylor expanded in z around inf 84.9%
Final simplification73.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.7e-198) (* y (- x)) (if (<= z 3.2e-185) (/ (* z (* y x)) (- z)) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.7e-198) {
tmp = y * -x;
} else if (z <= 3.2e-185) {
tmp = (z * (y * x)) / -z;
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5.7d-198)) then
tmp = y * -x
else if (z <= 3.2d-185) then
tmp = (z * (y * x)) / -z
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.7e-198) {
tmp = y * -x;
} else if (z <= 3.2e-185) {
tmp = (z * (y * x)) / -z;
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.7e-198: tmp = y * -x elif z <= 3.2e-185: tmp = (z * (y * x)) / -z else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.7e-198) tmp = Float64(y * Float64(-x)); elseif (z <= 3.2e-185) tmp = Float64(Float64(z * Float64(y * x)) / Float64(-z)); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.7e-198) tmp = y * -x; elseif (z <= 3.2e-185) tmp = (z * (y * x)) / -z; else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.7e-198], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 3.2e-185], N[(N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision] / (-z)), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.7 \cdot 10^{-198}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-185}:\\
\;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{-z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -5.70000000000000028e-198Initial program 49.0%
*-commutative49.0%
associate-*l*48.8%
associate-*r/50.1%
Simplified50.1%
Taylor expanded in z around -inf 73.6%
neg-mul-173.6%
Simplified73.6%
if -5.70000000000000028e-198 < z < 3.1999999999999997e-185Initial program 72.3%
Taylor expanded in z around -inf 34.9%
neg-mul-134.9%
Simplified34.9%
if 3.1999999999999997e-185 < z Initial program 61.1%
*-commutative61.1%
associate-*l*60.5%
associate-*r/63.4%
Simplified63.4%
Taylor expanded in z around inf 82.8%
Final simplification72.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.5e-221) (* y (- x)) (if (<= z 3.3e-184) (/ (* z (* y x)) z) (* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.5e-221) {
tmp = y * -x;
} else if (z <= 3.3e-184) {
tmp = (z * (y * x)) / z;
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4.5d-221)) then
tmp = y * -x
else if (z <= 3.3d-184) then
tmp = (z * (y * x)) / z
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.5e-221) {
tmp = y * -x;
} else if (z <= 3.3e-184) {
tmp = (z * (y * x)) / z;
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.5e-221: tmp = y * -x elif z <= 3.3e-184: tmp = (z * (y * x)) / z else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.5e-221) tmp = Float64(y * Float64(-x)); elseif (z <= 3.3e-184) tmp = Float64(Float64(z * Float64(y * x)) / z); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.5e-221) tmp = y * -x; elseif (z <= 3.3e-184) tmp = (z * (y * x)) / z; else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.5e-221], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 3.3e-184], N[(N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-221}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-184}:\\
\;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -4.50000000000000026e-221Initial program 49.1%
*-commutative49.1%
associate-*l*48.8%
associate-*r/50.1%
Simplified50.1%
Taylor expanded in z around -inf 71.0%
neg-mul-171.0%
Simplified71.0%
if -4.50000000000000026e-221 < z < 3.2999999999999997e-184Initial program 75.3%
Taylor expanded in z around inf 38.7%
if 3.2999999999999997e-184 < z Initial program 61.1%
*-commutative61.1%
associate-*l*60.5%
associate-*r/63.4%
Simplified63.4%
Taylor expanded in z around inf 82.8%
Final simplification72.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.2e-304) (* y (- x)) (/ 1.0 (/ 1.0 (* y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.2e-304) {
tmp = y * -x;
} else {
tmp = 1.0 / (1.0 / (y * x));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5.2d-304)) then
tmp = y * -x
else
tmp = 1.0d0 / (1.0d0 / (y * x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.2e-304) {
tmp = y * -x;
} else {
tmp = 1.0 / (1.0 / (y * x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.2e-304: tmp = y * -x else: tmp = 1.0 / (1.0 / (y * x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.2e-304) tmp = Float64(y * Float64(-x)); else tmp = Float64(1.0 / Float64(1.0 / Float64(y * x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.2e-304) tmp = y * -x; else tmp = 1.0 / (1.0 / (y * x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.2e-304], N[(y * (-x)), $MachinePrecision], N[(1.0 / N[(1.0 / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{-304}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{1}{y \cdot x}}\\
\end{array}
\end{array}
if z < -5.19999999999999993e-304Initial program 53.3%
*-commutative53.3%
associate-*l*54.7%
associate-*r/55.8%
Simplified55.8%
Taylor expanded in z around -inf 64.9%
neg-mul-164.9%
Simplified64.9%
if -5.19999999999999993e-304 < z Initial program 61.7%
associate-*l/61.4%
Simplified61.4%
Taylor expanded in z around -inf 12.6%
mul-1-neg12.6%
associate-/l*12.8%
distribute-neg-frac12.8%
Simplified12.8%
associate-*l/14.8%
Applied egg-rr14.8%
clear-num14.8%
inv-pow14.8%
*-commutative14.8%
add-sqr-sqrt6.6%
sqrt-unprod28.3%
sqr-neg28.3%
sqrt-unprod31.2%
add-sqr-sqrt58.0%
Applied egg-rr58.0%
unpow-158.0%
associate-/l/60.6%
*-commutative60.6%
associate-*r*65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in z around 0 76.3%
Final simplification70.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.4e-304) (* y (- x)) (* y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.4e-304) {
tmp = y * -x;
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.4d-304)) then
tmp = y * -x
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.4e-304) {
tmp = y * -x;
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.4e-304: tmp = y * -x else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.4e-304) tmp = Float64(y * Float64(-x)); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.4e-304) tmp = y * -x; else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.4e-304], N[(y * (-x)), $MachinePrecision], N[(y * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-304}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -3.3999999999999999e-304Initial program 53.3%
*-commutative53.3%
associate-*l*54.7%
associate-*r/55.8%
Simplified55.8%
Taylor expanded in z around -inf 64.9%
neg-mul-164.9%
Simplified64.9%
if -3.3999999999999999e-304 < z Initial program 61.7%
*-commutative61.7%
associate-*l*61.2%
associate-*r/64.8%
Simplified64.8%
Taylor expanded in z around inf 76.1%
Final simplification70.8%
(FPCore (x y z t a) :precision binary64 (* y x))
double code(double x, double y, double z, double t, double a) {
return y * x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = y * x
end function
public static double code(double x, double y, double z, double t, double a) {
return y * x;
}
def code(x, y, z, t, a): return y * x
function code(x, y, z, t, a) return Float64(y * x) end
function tmp = code(x, y, z, t, a) tmp = y * x; end
code[x_, y_, z_, t_, a_] := N[(y * x), $MachinePrecision]
\begin{array}{l}
\\
y \cdot x
\end{array}
Initial program 57.7%
*-commutative57.7%
associate-*l*58.1%
associate-*r/60.5%
Simplified60.5%
Taylor expanded in z around inf 45.3%
Final simplification45.3%
(FPCore (x y z t a)
:precision binary64
(if (< z -3.1921305903852764e+46)
(- (* y x))
(if (< z 5.976268120920894e+90)
(/ (* x z) (/ (sqrt (- (* z z) (* a t))) y))
(* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z < -3.1921305903852764e+46) {
tmp = -(y * x);
} else if (z < 5.976268120920894e+90) {
tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y);
} else {
tmp = y * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z < (-3.1921305903852764d+46)) then
tmp = -(y * x)
else if (z < 5.976268120920894d+90) then
tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y)
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z < -3.1921305903852764e+46) {
tmp = -(y * x);
} else if (z < 5.976268120920894e+90) {
tmp = (x * z) / (Math.sqrt(((z * z) - (a * t))) / y);
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z < -3.1921305903852764e+46: tmp = -(y * x) elif z < 5.976268120920894e+90: tmp = (x * z) / (math.sqrt(((z * z) - (a * t))) / y) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z < -3.1921305903852764e+46) tmp = Float64(-Float64(y * x)); elseif (z < 5.976268120920894e+90) tmp = Float64(Float64(x * z) / Float64(sqrt(Float64(Float64(z * z) - Float64(a * t))) / y)); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z < -3.1921305903852764e+46) tmp = -(y * x); elseif (z < 5.976268120920894e+90) tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Less[z, -3.1921305903852764e+46], (-N[(y * x), $MachinePrecision]), If[Less[z, 5.976268120920894e+90], N[(N[(x * z), $MachinePrecision] / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z < -3.1921305903852764 \cdot 10^{+46}:\\
\;\;\;\;-y \cdot x\\
\mathbf{elif}\;z < 5.976268120920894 \cdot 10^{+90}:\\
\;\;\;\;\frac{x \cdot z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
herbie shell --seed 2023199
(FPCore (x y z t a)
:name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< z -3.1921305903852764e+46) (- (* y x)) (if (< z 5.976268120920894e+90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))
(/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))