
(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 18 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 -6e+72) (/ (* x y) (fma 0.5 (/ a (/ (pow z 2.0) t)) -1.0)) (if (<= z 1.35e+37) (/ (* z (* x y)) (sqrt (- (* z z) (* a t)))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+72) {
tmp = (x * y) / fma(0.5, (a / (pow(z, 2.0) / t)), -1.0);
} else if (z <= 1.35e+37) {
tmp = (z * (x * y)) / sqrt(((z * z) - (a * t)));
} else {
tmp = x * y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e+72) tmp = Float64(Float64(x * y) / fma(0.5, Float64(a / Float64((z ^ 2.0) / t)), -1.0)); elseif (z <= 1.35e+37) tmp = Float64(Float64(z * Float64(x * y)) / sqrt(Float64(Float64(z * z) - Float64(a * t)))); else tmp = Float64(x * y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e+72], N[(N[(x * y), $MachinePrecision] / N[(0.5 * N[(a / N[(N[Power[z, 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+37], N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+72}:\\
\;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(0.5, \frac{a}{\frac{{z}^{2}}{t}}, -1\right)}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+37}:\\
\;\;\;\;\frac{z \cdot \left(x \cdot y\right)}{\sqrt{z \cdot z - a \cdot t}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -6.00000000000000006e72Initial program 27.7%
associate-/l*36.7%
Simplified36.7%
Taylor expanded in z around -inf 92.7%
fma-neg92.7%
associate-/l*96.5%
metadata-eval96.5%
Simplified96.5%
if -6.00000000000000006e72 < z < 1.34999999999999993e37Initial program 91.2%
if 1.34999999999999993e37 < z Initial program 53.4%
associate-*l/53.5%
*-commutative53.5%
associate-*l/52.3%
associate-*r*51.4%
sub-neg51.4%
distribute-rgt-neg-out51.4%
+-commutative51.4%
fma-def51.4%
Simplified51.4%
Taylor expanded in t around 0 98.8%
Final simplification94.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -2e+83) (* y (- x)) (if (<= z 1.35e+37) (* z (/ (* x y) (sqrt (- (* z z) (* a t))))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2e+83) {
tmp = y * -x;
} else if (z <= 1.35e+37) {
tmp = z * ((x * y) / sqrt(((z * z) - (a * t))));
} else {
tmp = x * y;
}
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 <= (-2d+83)) then
tmp = y * -x
else if (z <= 1.35d+37) then
tmp = z * ((x * y) / sqrt(((z * z) - (a * t))))
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2e+83) {
tmp = y * -x;
} else if (z <= 1.35e+37) {
tmp = z * ((x * y) / Math.sqrt(((z * z) - (a * t))));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2e+83: tmp = y * -x elif z <= 1.35e+37: tmp = z * ((x * y) / math.sqrt(((z * z) - (a * t)))) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2e+83) tmp = Float64(y * Float64(-x)); elseif (z <= 1.35e+37) tmp = Float64(z * Float64(Float64(x * y) / sqrt(Float64(Float64(z * z) - Float64(a * t))))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2e+83) tmp = y * -x; elseif (z <= 1.35e+37) tmp = z * ((x * y) / sqrt(((z * z) - (a * t)))); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2e+83], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.35e+37], N[(z * N[(N[(x * y), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+83}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+37}:\\
\;\;\;\;z \cdot \frac{x \cdot y}{\sqrt{z \cdot z - a \cdot t}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -2.00000000000000006e83Initial program 26.6%
associate-*l/30.6%
*-commutative30.6%
associate-*l/29.0%
associate-*r*24.8%
sub-neg24.8%
distribute-rgt-neg-out24.8%
+-commutative24.8%
fma-def24.8%
Simplified24.8%
Taylor expanded in z around -inf 96.4%
*-commutative96.4%
mul-1-neg96.4%
*-commutative96.4%
Simplified96.4%
if -2.00000000000000006e83 < z < 1.34999999999999993e37Initial program 90.7%
associate-*l/90.1%
Simplified90.1%
if 1.34999999999999993e37 < z Initial program 53.4%
associate-*l/53.5%
*-commutative53.5%
associate-*l/52.3%
associate-*r*51.4%
sub-neg51.4%
distribute-rgt-neg-out51.4%
+-commutative51.4%
fma-def51.4%
Simplified51.4%
Taylor expanded in t around 0 98.8%
Final simplification94.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.15e+74) (* y (- x)) (if (<= z 1.25e+37) (/ (* z (* x y)) (sqrt (- (* z z) (* a t)))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.15e+74) {
tmp = y * -x;
} else if (z <= 1.25e+37) {
tmp = (z * (x * y)) / sqrt(((z * z) - (a * t)));
} else {
tmp = x * y;
}
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.15d+74)) then
tmp = y * -x
else if (z <= 1.25d+37) then
tmp = (z * (x * y)) / sqrt(((z * z) - (a * t)))
else
tmp = x * y
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.15e+74) {
tmp = y * -x;
} else if (z <= 1.25e+37) {
tmp = (z * (x * y)) / Math.sqrt(((z * z) - (a * t)));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.15e+74: tmp = y * -x elif z <= 1.25e+37: tmp = (z * (x * y)) / math.sqrt(((z * z) - (a * t))) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.15e+74) tmp = Float64(y * Float64(-x)); elseif (z <= 1.25e+37) tmp = Float64(Float64(z * Float64(x * y)) / sqrt(Float64(Float64(z * z) - Float64(a * t)))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.15e+74) tmp = y * -x; elseif (z <= 1.25e+37) tmp = (z * (x * y)) / sqrt(((z * z) - (a * t))); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.15e+74], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.25e+37], N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+74}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+37}:\\
\;\;\;\;\frac{z \cdot \left(x \cdot y\right)}{\sqrt{z \cdot z - a \cdot t}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -2.15e74Initial program 27.7%
associate-*l/33.2%
*-commutative33.2%
associate-*l/31.6%
associate-*r*27.5%
sub-neg27.5%
distribute-rgt-neg-out27.5%
+-commutative27.5%
fma-def27.5%
Simplified27.5%
Taylor expanded in z around -inf 96.5%
*-commutative96.5%
mul-1-neg96.5%
*-commutative96.5%
Simplified96.5%
if -2.15e74 < z < 1.24999999999999997e37Initial program 91.2%
if 1.24999999999999997e37 < z Initial program 53.4%
associate-*l/53.5%
*-commutative53.5%
associate-*l/52.3%
associate-*r*51.4%
sub-neg51.4%
distribute-rgt-neg-out51.4%
+-commutative51.4%
fma-def51.4%
Simplified51.4%
Taylor expanded in t around 0 98.8%
Final simplification94.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.3e-32) (* y (- x)) (if (<= z 8.2e+20) (* (pow (* a (- t)) -0.5) (* x (* z y))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.3e-32) {
tmp = y * -x;
} else if (z <= 8.2e+20) {
tmp = pow((a * -t), -0.5) * (x * (z * y));
} else {
tmp = x * y;
}
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.3d-32)) then
tmp = y * -x
else if (z <= 8.2d+20) then
tmp = ((a * -t) ** (-0.5d0)) * (x * (z * y))
else
tmp = x * y
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.3e-32) {
tmp = y * -x;
} else if (z <= 8.2e+20) {
tmp = Math.pow((a * -t), -0.5) * (x * (z * y));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.3e-32: tmp = y * -x elif z <= 8.2e+20: tmp = math.pow((a * -t), -0.5) * (x * (z * y)) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.3e-32) tmp = Float64(y * Float64(-x)); elseif (z <= 8.2e+20) tmp = Float64((Float64(a * Float64(-t)) ^ -0.5) * Float64(x * Float64(z * y))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.3e-32) tmp = y * -x; elseif (z <= 8.2e+20) tmp = ((a * -t) ^ -0.5) * (x * (z * y)); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.3e-32], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 8.2e+20], N[(N[Power[N[(a * (-t)), $MachinePrecision], -0.5], $MachinePrecision] * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{-32}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+20}:\\
\;\;\;\;{\left(a \cdot \left(-t\right)\right)}^{-0.5} \cdot \left(x \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -4.2999999999999999e-32Initial program 50.6%
associate-*l/54.2%
*-commutative54.2%
associate-*l/53.1%
associate-*r*50.3%
sub-neg50.3%
distribute-rgt-neg-out50.3%
+-commutative50.3%
fma-def50.3%
Simplified50.3%
Taylor expanded in z around -inf 93.6%
*-commutative93.6%
mul-1-neg93.6%
*-commutative93.6%
Simplified93.6%
if -4.2999999999999999e-32 < z < 8.2e20Initial program 89.2%
Taylor expanded in x around 0 86.8%
div-inv86.9%
*-commutative86.9%
pow1/286.9%
pow-flip86.9%
pow286.9%
metadata-eval86.9%
*-commutative86.9%
Applied egg-rr86.9%
Taylor expanded in z around 0 75.5%
associate-*r*75.5%
mul-1-neg75.5%
*-commutative75.5%
Simplified75.5%
if 8.2e20 < z Initial program 56.7%
associate-*l/56.9%
*-commutative56.9%
associate-*l/55.7%
associate-*r*53.7%
sub-neg53.7%
distribute-rgt-neg-out53.7%
+-commutative53.7%
fma-def53.8%
Simplified53.8%
Taylor expanded in t around 0 96.7%
Final simplification88.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.8e-31) (* y (- x)) (if (<= z 8e+20) (* (/ y (sqrt (* a (- t)))) (* z x)) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e-31) {
tmp = y * -x;
} else if (z <= 8e+20) {
tmp = (y / sqrt((a * -t))) * (z * x);
} else {
tmp = x * y;
}
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.8d-31)) then
tmp = y * -x
else if (z <= 8d+20) then
tmp = (y / sqrt((a * -t))) * (z * x)
else
tmp = x * y
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.8e-31) {
tmp = y * -x;
} else if (z <= 8e+20) {
tmp = (y / Math.sqrt((a * -t))) * (z * x);
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.8e-31: tmp = y * -x elif z <= 8e+20: tmp = (y / math.sqrt((a * -t))) * (z * x) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.8e-31) tmp = Float64(y * Float64(-x)); elseif (z <= 8e+20) tmp = Float64(Float64(y / sqrt(Float64(a * Float64(-t)))) * Float64(z * x)); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.8e-31) tmp = y * -x; elseif (z <= 8e+20) tmp = (y / sqrt((a * -t))) * (z * x); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e-31], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 8e+20], N[(N[(y / N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(z * x), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{-31}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+20}:\\
\;\;\;\;\frac{y}{\sqrt{a \cdot \left(-t\right)}} \cdot \left(z \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -6.8000000000000002e-31Initial program 50.6%
associate-*l/54.2%
*-commutative54.2%
associate-*l/53.1%
associate-*r*50.3%
sub-neg50.3%
distribute-rgt-neg-out50.3%
+-commutative50.3%
fma-def50.3%
Simplified50.3%
Taylor expanded in z around -inf 93.6%
*-commutative93.6%
mul-1-neg93.6%
*-commutative93.6%
Simplified93.6%
if -6.8000000000000002e-31 < z < 8e20Initial program 89.2%
associate-*l/87.4%
*-commutative87.4%
associate-*l/87.4%
associate-*r*85.4%
sub-neg85.4%
distribute-rgt-neg-out85.4%
+-commutative85.4%
fma-def84.3%
Simplified84.3%
Taylor expanded in t around inf 72.8%
*-commutative72.8%
mul-1-neg72.8%
*-commutative72.8%
Simplified72.8%
if 8e20 < z Initial program 56.7%
associate-*l/56.9%
*-commutative56.9%
associate-*l/55.7%
associate-*r*53.7%
sub-neg53.7%
distribute-rgt-neg-out53.7%
+-commutative53.7%
fma-def53.8%
Simplified53.8%
Taylor expanded in t around 0 96.7%
Final simplification87.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.9e+48)
(* y (- x))
(if (<= z 4.8e-172)
(* (/ y (- z (* 0.5 (/ t (/ z a))))) (* z (- x)))
(* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e+48) {
tmp = y * -x;
} else if (z <= 4.8e-172) {
tmp = (y / (z - (0.5 * (t / (z / a))))) * (z * -x);
} else {
tmp = x * y;
}
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.9d+48)) then
tmp = y * -x
else if (z <= 4.8d-172) then
tmp = (y / (z - (0.5d0 * (t / (z / a))))) * (z * -x)
else
tmp = x * y
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.9e+48) {
tmp = y * -x;
} else if (z <= 4.8e-172) {
tmp = (y / (z - (0.5 * (t / (z / a))))) * (z * -x);
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.9e+48: tmp = y * -x elif z <= 4.8e-172: tmp = (y / (z - (0.5 * (t / (z / a))))) * (z * -x) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.9e+48) tmp = Float64(y * Float64(-x)); elseif (z <= 4.8e-172) tmp = Float64(Float64(y / Float64(z - Float64(0.5 * Float64(t / Float64(z / a))))) * Float64(z * Float64(-x))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.9e+48) tmp = y * -x; elseif (z <= 4.8e-172) tmp = (y / (z - (0.5 * (t / (z / a))))) * (z * -x); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.9e+48], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 4.8e-172], N[(N[(y / N[(z - N[(0.5 * N[(t / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z * (-x)), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+48}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-172}:\\
\;\;\;\;\frac{y}{z - 0.5 \cdot \frac{t}{\frac{z}{a}}} \cdot \left(z \cdot \left(-x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -1.9e48Initial program 31.5%
associate-*l/36.7%
*-commutative36.7%
associate-*l/35.1%
associate-*r*31.3%
sub-neg31.3%
distribute-rgt-neg-out31.3%
+-commutative31.3%
fma-def31.3%
Simplified31.3%
Taylor expanded in z around -inf 96.7%
*-commutative96.7%
mul-1-neg96.7%
*-commutative96.7%
Simplified96.7%
if -1.9e48 < z < 4.8000000000000002e-172Initial program 89.1%
associate-*l/89.3%
*-commutative89.3%
associate-*l/89.4%
associate-*r*84.5%
sub-neg84.5%
distribute-rgt-neg-out84.5%
+-commutative84.5%
fma-def83.4%
Simplified83.4%
Taylor expanded in z around -inf 55.4%
*-commutative55.4%
div-inv55.4%
associate-*l*55.4%
frac-2neg55.4%
metadata-eval55.4%
mul-1-neg55.4%
add-sqr-sqrt45.0%
sqrt-unprod53.3%
mul-1-neg53.3%
mul-1-neg53.3%
sqr-neg53.3%
sqrt-prod11.6%
add-sqr-sqrt54.4%
Applied egg-rr54.4%
frac-2neg54.4%
neg-sub054.4%
div-sub54.4%
Applied egg-rr55.4%
div055.4%
neg-sub055.4%
distribute-neg-frac55.4%
associate-*r*55.4%
*-commutative55.4%
associate-*r/55.4%
associate-/l*55.4%
Simplified55.4%
if 4.8000000000000002e-172 < z Initial program 65.5%
associate-*l/63.9%
*-commutative63.9%
associate-*l/63.0%
associate-*r*63.9%
sub-neg63.9%
distribute-rgt-neg-out63.9%
+-commutative63.9%
fma-def63.9%
Simplified63.9%
Taylor expanded in t around 0 86.9%
Final simplification77.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -3e-91) (* y (- x)) (if (<= z 2.2e-58) (* (* z x) (/ y (+ z (* -0.5 (/ a (/ z t)))))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e-91) {
tmp = y * -x;
} else if (z <= 2.2e-58) {
tmp = (z * x) * (y / (z + (-0.5 * (a / (z / t)))));
} else {
tmp = x * y;
}
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 <= (-3d-91)) then
tmp = y * -x
else if (z <= 2.2d-58) then
tmp = (z * x) * (y / (z + ((-0.5d0) * (a / (z / t)))))
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e-91) {
tmp = y * -x;
} else if (z <= 2.2e-58) {
tmp = (z * x) * (y / (z + (-0.5 * (a / (z / t)))));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3e-91: tmp = y * -x elif z <= 2.2e-58: tmp = (z * x) * (y / (z + (-0.5 * (a / (z / t))))) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3e-91) tmp = Float64(y * Float64(-x)); elseif (z <= 2.2e-58) tmp = Float64(Float64(z * x) * Float64(y / Float64(z + Float64(-0.5 * Float64(a / Float64(z / t)))))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3e-91) tmp = y * -x; elseif (z <= 2.2e-58) tmp = (z * x) * (y / (z + (-0.5 * (a / (z / t))))); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e-91], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 2.2e-58], N[(N[(z * x), $MachinePrecision] * N[(y / N[(z + N[(-0.5 * N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-91}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-58}:\\
\;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -3.0000000000000002e-91Initial program 53.4%
associate-*l/57.1%
*-commutative57.1%
associate-*l/56.1%
associate-*r*54.0%
sub-neg54.0%
distribute-rgt-neg-out54.0%
+-commutative54.0%
fma-def54.0%
Simplified54.0%
Taylor expanded in z around -inf 85.4%
*-commutative85.4%
mul-1-neg85.4%
*-commutative85.4%
Simplified85.4%
if -3.0000000000000002e-91 < z < 2.20000000000000006e-58Initial program 90.5%
associate-*l/87.4%
*-commutative87.4%
associate-*l/87.4%
associate-*r*84.5%
sub-neg84.5%
distribute-rgt-neg-out84.5%
+-commutative84.5%
fma-def83.0%
Simplified83.0%
Taylor expanded in t around 0 48.0%
associate-/l*48.5%
Simplified48.5%
if 2.20000000000000006e-58 < z Initial program 61.7%
associate-*l/61.8%
*-commutative61.8%
associate-*l/60.9%
associate-*r*58.9%
sub-neg58.9%
distribute-rgt-neg-out58.9%
+-commutative58.9%
fma-def59.0%
Simplified59.0%
Taylor expanded in t around 0 91.1%
Final simplification77.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -3e-91) (* y (- x)) (if (<= z 3.7e+21) (/ (* x (* z y)) (+ z (* -0.5 (* t (/ a z))))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e-91) {
tmp = y * -x;
} else if (z <= 3.7e+21) {
tmp = (x * (z * y)) / (z + (-0.5 * (t * (a / z))));
} else {
tmp = x * y;
}
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 <= (-3d-91)) then
tmp = y * -x
else if (z <= 3.7d+21) then
tmp = (x * (z * y)) / (z + ((-0.5d0) * (t * (a / z))))
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e-91) {
tmp = y * -x;
} else if (z <= 3.7e+21) {
tmp = (x * (z * y)) / (z + (-0.5 * (t * (a / z))));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3e-91: tmp = y * -x elif z <= 3.7e+21: tmp = (x * (z * y)) / (z + (-0.5 * (t * (a / z)))) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3e-91) tmp = Float64(y * Float64(-x)); elseif (z <= 3.7e+21) tmp = Float64(Float64(x * Float64(z * y)) / Float64(z + Float64(-0.5 * Float64(t * Float64(a / z))))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3e-91) tmp = y * -x; elseif (z <= 3.7e+21) tmp = (x * (z * y)) / (z + (-0.5 * (t * (a / z)))); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e-91], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 3.7e+21], N[(N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision] / N[(z + N[(-0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-91}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+21}:\\
\;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z + -0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -3.0000000000000002e-91Initial program 53.4%
associate-*l/57.1%
*-commutative57.1%
associate-*l/56.1%
associate-*r*54.0%
sub-neg54.0%
distribute-rgt-neg-out54.0%
+-commutative54.0%
fma-def54.0%
Simplified54.0%
Taylor expanded in z around -inf 85.4%
*-commutative85.4%
mul-1-neg85.4%
*-commutative85.4%
Simplified85.4%
if -3.0000000000000002e-91 < z < 3.7e21Initial program 91.7%
Taylor expanded in x around 0 89.0%
Taylor expanded in z around inf 47.0%
associate-*l/47.4%
*-commutative47.4%
Simplified47.4%
if 3.7e21 < z Initial program 56.7%
associate-*l/56.9%
*-commutative56.9%
associate-*l/55.7%
associate-*r*53.7%
sub-neg53.7%
distribute-rgt-neg-out53.7%
+-commutative53.7%
fma-def53.8%
Simplified53.8%
Taylor expanded in t around 0 96.7%
Final simplification77.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.22e+48) (* y (- x)) (if (<= z 3.7e-177) (* (* z x) (/ y (- (* 0.5 (/ (* a t) z)) z))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.22e+48) {
tmp = y * -x;
} else if (z <= 3.7e-177) {
tmp = (z * x) * (y / ((0.5 * ((a * t) / z)) - z));
} else {
tmp = x * y;
}
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.22d+48)) then
tmp = y * -x
else if (z <= 3.7d-177) then
tmp = (z * x) * (y / ((0.5d0 * ((a * t) / z)) - z))
else
tmp = x * y
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.22e+48) {
tmp = y * -x;
} else if (z <= 3.7e-177) {
tmp = (z * x) * (y / ((0.5 * ((a * t) / z)) - z));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.22e+48: tmp = y * -x elif z <= 3.7e-177: tmp = (z * x) * (y / ((0.5 * ((a * t) / z)) - z)) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.22e+48) tmp = Float64(y * Float64(-x)); elseif (z <= 3.7e-177) tmp = Float64(Float64(z * x) * Float64(y / Float64(Float64(0.5 * Float64(Float64(a * t) / z)) - z))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.22e+48) tmp = y * -x; elseif (z <= 3.7e-177) tmp = (z * x) * (y / ((0.5 * ((a * t) / z)) - z)); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.22e+48], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 3.7e-177], N[(N[(z * x), $MachinePrecision] * N[(y / N[(N[(0.5 * N[(N[(a * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{+48}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-177}:\\
\;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{0.5 \cdot \frac{a \cdot t}{z} - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -1.22000000000000004e48Initial program 31.5%
associate-*l/36.7%
*-commutative36.7%
associate-*l/35.1%
associate-*r*31.3%
sub-neg31.3%
distribute-rgt-neg-out31.3%
+-commutative31.3%
fma-def31.3%
Simplified31.3%
Taylor expanded in z around -inf 96.7%
*-commutative96.7%
mul-1-neg96.7%
*-commutative96.7%
Simplified96.7%
if -1.22000000000000004e48 < z < 3.69999999999999993e-177Initial program 89.1%
associate-*l/89.3%
*-commutative89.3%
associate-*l/89.4%
associate-*r*84.5%
sub-neg84.5%
distribute-rgt-neg-out84.5%
+-commutative84.5%
fma-def83.4%
Simplified83.4%
Taylor expanded in z around -inf 55.4%
if 3.69999999999999993e-177 < z Initial program 65.5%
associate-*l/63.9%
*-commutative63.9%
associate-*l/63.0%
associate-*r*63.9%
sub-neg63.9%
distribute-rgt-neg-out63.9%
+-commutative63.9%
fma-def63.9%
Simplified63.9%
Taylor expanded in t around 0 86.9%
Final simplification77.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.25e+52) (* y (- x)) (if (<= z 7.3e-177) (/ (* x (* z y)) (- (* 0.5 (/ (* a t) z)) z)) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.25e+52) {
tmp = y * -x;
} else if (z <= 7.3e-177) {
tmp = (x * (z * y)) / ((0.5 * ((a * t) / z)) - z);
} else {
tmp = x * y;
}
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.25d+52)) then
tmp = y * -x
else if (z <= 7.3d-177) then
tmp = (x * (z * y)) / ((0.5d0 * ((a * t) / z)) - z)
else
tmp = x * y
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.25e+52) {
tmp = y * -x;
} else if (z <= 7.3e-177) {
tmp = (x * (z * y)) / ((0.5 * ((a * t) / z)) - z);
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.25e+52: tmp = y * -x elif z <= 7.3e-177: tmp = (x * (z * y)) / ((0.5 * ((a * t) / z)) - z) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.25e+52) tmp = Float64(y * Float64(-x)); elseif (z <= 7.3e-177) tmp = Float64(Float64(x * Float64(z * y)) / Float64(Float64(0.5 * Float64(Float64(a * t) / z)) - z)); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.25e+52) tmp = y * -x; elseif (z <= 7.3e-177) tmp = (x * (z * y)) / ((0.5 * ((a * t) / z)) - z); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.25e+52], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 7.3e-177], N[(N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision] / N[(N[(0.5 * N[(N[(a * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+52}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 7.3 \cdot 10^{-177}:\\
\;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{0.5 \cdot \frac{a \cdot t}{z} - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -2.25e52Initial program 31.5%
associate-*l/36.7%
*-commutative36.7%
associate-*l/35.1%
associate-*r*31.3%
sub-neg31.3%
distribute-rgt-neg-out31.3%
+-commutative31.3%
fma-def31.3%
Simplified31.3%
Taylor expanded in z around -inf 96.7%
*-commutative96.7%
mul-1-neg96.7%
*-commutative96.7%
Simplified96.7%
if -2.25e52 < z < 7.2999999999999998e-177Initial program 89.1%
Taylor expanded in x around 0 85.9%
Taylor expanded in z around -inf 55.6%
if 7.2999999999999998e-177 < z Initial program 65.5%
associate-*l/63.9%
*-commutative63.9%
associate-*l/63.0%
associate-*r*63.9%
sub-neg63.9%
distribute-rgt-neg-out63.9%
+-commutative63.9%
fma-def63.9%
Simplified63.9%
Taylor expanded in t around 0 86.9%
Final simplification77.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.5e-91) (* y (- x)) (if (<= z 9e-173) (* (* z x) (* 2.0 (/ z (/ (* a t) (- y))))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e-91) {
tmp = y * -x;
} else if (z <= 9e-173) {
tmp = (z * x) * (2.0 * (z / ((a * t) / -y)));
} else {
tmp = x * y;
}
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.5d-91)) then
tmp = y * -x
else if (z <= 9d-173) then
tmp = (z * x) * (2.0d0 * (z / ((a * t) / -y)))
else
tmp = x * y
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.5e-91) {
tmp = y * -x;
} else if (z <= 9e-173) {
tmp = (z * x) * (2.0 * (z / ((a * t) / -y)));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e-91: tmp = y * -x elif z <= 9e-173: tmp = (z * x) * (2.0 * (z / ((a * t) / -y))) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e-91) tmp = Float64(y * Float64(-x)); elseif (z <= 9e-173) tmp = Float64(Float64(z * x) * Float64(2.0 * Float64(z / Float64(Float64(a * t) / Float64(-y))))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.5e-91) tmp = y * -x; elseif (z <= 9e-173) tmp = (z * x) * (2.0 * (z / ((a * t) / -y))); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e-91], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 9e-173], N[(N[(z * x), $MachinePrecision] * N[(2.0 * N[(z / N[(N[(a * t), $MachinePrecision] / (-y)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-91}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-173}:\\
\;\;\;\;\left(z \cdot x\right) \cdot \left(2 \cdot \frac{z}{\frac{a \cdot t}{-y}}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -3.4999999999999999e-91Initial program 53.4%
associate-*l/57.1%
*-commutative57.1%
associate-*l/56.1%
associate-*r*54.0%
sub-neg54.0%
distribute-rgt-neg-out54.0%
+-commutative54.0%
fma-def54.0%
Simplified54.0%
Taylor expanded in z around -inf 85.4%
*-commutative85.4%
mul-1-neg85.4%
*-commutative85.4%
Simplified85.4%
if -3.4999999999999999e-91 < z < 9.00000000000000037e-173Initial program 89.9%
associate-*l/89.4%
*-commutative89.4%
associate-*l/89.5%
associate-*r*81.0%
sub-neg81.0%
distribute-rgt-neg-out81.0%
+-commutative81.0%
fma-def79.1%
Simplified79.1%
Taylor expanded in z around -inf 43.7%
Taylor expanded in z around 0 42.0%
times-frac41.5%
Simplified41.5%
clear-num41.5%
metadata-eval41.5%
frac-2neg41.5%
mul-1-neg41.5%
frac-times39.8%
metadata-eval39.8%
*-un-lft-identity39.8%
add-sqr-sqrt24.7%
sqrt-unprod37.8%
swap-sqr37.8%
metadata-eval37.8%
unpow237.8%
*-un-lft-identity37.8%
unpow237.8%
sqrt-prod17.1%
add-sqr-sqrt41.4%
Applied egg-rr41.4%
add-sqr-sqrt25.4%
frac-2neg25.4%
sqrt-unprod38.7%
sqr-neg38.7%
sqrt-unprod17.9%
add-sqr-sqrt39.8%
associate-*l/40.2%
distribute-lft-neg-in40.2%
distribute-rgt-neg-in40.2%
add-sqr-sqrt22.2%
sqrt-unprod33.8%
sqr-neg33.8%
sqrt-unprod16.2%
add-sqr-sqrt41.8%
Applied egg-rr41.8%
if 9.00000000000000037e-173 < z Initial program 65.5%
associate-*l/63.9%
*-commutative63.9%
associate-*l/63.0%
associate-*r*63.9%
sub-neg63.9%
distribute-rgt-neg-out63.9%
+-commutative63.9%
fma-def63.9%
Simplified63.9%
Taylor expanded in t around 0 86.9%
Final simplification76.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.5e-66) (* y (- x)) (if (<= z 2.3e-181) (* z (* x (* 2.0 (* (/ z a) (/ y t))))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.5e-66) {
tmp = y * -x;
} else if (z <= 2.3e-181) {
tmp = z * (x * (2.0 * ((z / a) * (y / t))));
} else {
tmp = x * y;
}
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.5d-66)) then
tmp = y * -x
else if (z <= 2.3d-181) then
tmp = z * (x * (2.0d0 * ((z / a) * (y / t))))
else
tmp = x * y
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.5e-66) {
tmp = y * -x;
} else if (z <= 2.3e-181) {
tmp = z * (x * (2.0 * ((z / a) * (y / t))));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.5e-66: tmp = y * -x elif z <= 2.3e-181: tmp = z * (x * (2.0 * ((z / a) * (y / t)))) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.5e-66) tmp = Float64(y * Float64(-x)); elseif (z <= 2.3e-181) tmp = Float64(z * Float64(x * Float64(2.0 * Float64(Float64(z / a) * Float64(y / t))))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.5e-66) tmp = y * -x; elseif (z <= 2.3e-181) tmp = z * (x * (2.0 * ((z / a) * (y / t)))); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.5e-66], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 2.3e-181], N[(z * N[(x * N[(2.0 * N[(N[(z / a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{-66}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-181}:\\
\;\;\;\;z \cdot \left(x \cdot \left(2 \cdot \left(\frac{z}{a} \cdot \frac{y}{t}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -1.5000000000000001e-66Initial program 52.3%
associate-*l/55.6%
*-commutative55.6%
associate-*l/54.6%
associate-*r*53.1%
sub-neg53.1%
distribute-rgt-neg-out53.1%
+-commutative53.1%
fma-def53.1%
Simplified53.1%
Taylor expanded in z around -inf 87.0%
*-commutative87.0%
mul-1-neg87.0%
*-commutative87.0%
Simplified87.0%
if -1.5000000000000001e-66 < z < 2.29999999999999991e-181Initial program 89.6%
associate-*l/89.9%
*-commutative89.9%
associate-*l/90.0%
associate-*r*81.0%
sub-neg81.0%
distribute-rgt-neg-out81.0%
+-commutative81.0%
fma-def79.2%
Simplified79.2%
Taylor expanded in z around -inf 45.1%
Taylor expanded in z around 0 41.9%
times-frac41.4%
Simplified41.4%
pow141.4%
associate-*r*41.5%
*-commutative41.5%
*-commutative41.5%
frac-times42.0%
*-commutative42.0%
times-frac40.1%
Applied egg-rr40.1%
unpow140.1%
Simplified40.1%
if 2.29999999999999991e-181 < z Initial program 65.5%
associate-*l/63.9%
*-commutative63.9%
associate-*l/63.0%
associate-*r*63.9%
sub-neg63.9%
distribute-rgt-neg-out63.9%
+-commutative63.9%
fma-def63.9%
Simplified63.9%
Taylor expanded in t around 0 86.9%
Final simplification76.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -3e-91) (* y (- x)) (if (<= z 1.65e-177) (* (* z x) (* -2.0 (/ z (* t (/ a y))))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e-91) {
tmp = y * -x;
} else if (z <= 1.65e-177) {
tmp = (z * x) * (-2.0 * (z / (t * (a / y))));
} else {
tmp = x * y;
}
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 <= (-3d-91)) then
tmp = y * -x
else if (z <= 1.65d-177) then
tmp = (z * x) * ((-2.0d0) * (z / (t * (a / y))))
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e-91) {
tmp = y * -x;
} else if (z <= 1.65e-177) {
tmp = (z * x) * (-2.0 * (z / (t * (a / y))));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3e-91: tmp = y * -x elif z <= 1.65e-177: tmp = (z * x) * (-2.0 * (z / (t * (a / y)))) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3e-91) tmp = Float64(y * Float64(-x)); elseif (z <= 1.65e-177) tmp = Float64(Float64(z * x) * Float64(-2.0 * Float64(z / Float64(t * Float64(a / y))))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3e-91) tmp = y * -x; elseif (z <= 1.65e-177) tmp = (z * x) * (-2.0 * (z / (t * (a / y)))); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e-91], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.65e-177], N[(N[(z * x), $MachinePrecision] * N[(-2.0 * N[(z / N[(t * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-91}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-177}:\\
\;\;\;\;\left(z \cdot x\right) \cdot \left(-2 \cdot \frac{z}{t \cdot \frac{a}{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -3.0000000000000002e-91Initial program 53.4%
associate-*l/57.1%
*-commutative57.1%
associate-*l/56.1%
associate-*r*54.0%
sub-neg54.0%
distribute-rgt-neg-out54.0%
+-commutative54.0%
fma-def54.0%
Simplified54.0%
Taylor expanded in z around -inf 85.4%
*-commutative85.4%
mul-1-neg85.4%
*-commutative85.4%
Simplified85.4%
if -3.0000000000000002e-91 < z < 1.65e-177Initial program 89.9%
associate-*l/89.4%
*-commutative89.4%
associate-*l/89.5%
associate-*r*81.0%
sub-neg81.0%
distribute-rgt-neg-out81.0%
+-commutative81.0%
fma-def79.1%
Simplified79.1%
Taylor expanded in z around -inf 43.7%
Taylor expanded in z around 0 42.0%
times-frac41.5%
Simplified41.5%
clear-num41.5%
metadata-eval41.5%
frac-2neg41.5%
mul-1-neg41.5%
frac-times39.8%
metadata-eval39.8%
*-un-lft-identity39.8%
add-sqr-sqrt24.7%
sqrt-unprod37.8%
swap-sqr37.8%
metadata-eval37.8%
unpow237.8%
*-un-lft-identity37.8%
unpow237.8%
sqrt-prod17.1%
add-sqr-sqrt41.4%
Applied egg-rr41.4%
Taylor expanded in z around 0 43.6%
*-commutative43.6%
associate-/l*41.8%
*-commutative41.8%
associate-*r/41.4%
Simplified41.4%
if 1.65e-177 < z Initial program 65.5%
associate-*l/63.9%
*-commutative63.9%
associate-*l/63.0%
associate-*r*63.9%
sub-neg63.9%
distribute-rgt-neg-out63.9%
+-commutative63.9%
fma-def63.9%
Simplified63.9%
Taylor expanded in t around 0 86.9%
Final simplification76.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.45e-58) (* y (- x)) (if (<= z 1.05e-239) (/ (* y (* z (- x))) z) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e-58) {
tmp = y * -x;
} else if (z <= 1.05e-239) {
tmp = (y * (z * -x)) / z;
} else {
tmp = x * y;
}
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.45d-58)) then
tmp = y * -x
else if (z <= 1.05d-239) then
tmp = (y * (z * -x)) / z
else
tmp = x * y
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.45e-58) {
tmp = y * -x;
} else if (z <= 1.05e-239) {
tmp = (y * (z * -x)) / z;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.45e-58: tmp = y * -x elif z <= 1.05e-239: tmp = (y * (z * -x)) / z else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e-58) tmp = Float64(y * Float64(-x)); elseif (z <= 1.05e-239) tmp = Float64(Float64(y * Float64(z * Float64(-x))) / z); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.45e-58) tmp = y * -x; elseif (z <= 1.05e-239) tmp = (y * (z * -x)) / z; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e-58], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.05e-239], N[(N[(y * N[(z * (-x)), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{-58}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(-x\right)\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -1.44999999999999995e-58Initial program 52.9%
associate-*l/56.3%
*-commutative56.3%
associate-*l/55.2%
associate-*r*52.6%
sub-neg52.6%
distribute-rgt-neg-out52.6%
+-commutative52.6%
fma-def52.6%
Simplified52.6%
Taylor expanded in z around -inf 88.6%
*-commutative88.6%
mul-1-neg88.6%
*-commutative88.6%
Simplified88.6%
if -1.44999999999999995e-58 < z < 1.0500000000000001e-239Initial program 87.6%
associate-*l/88.4%
*-commutative88.4%
associate-*l/88.5%
associate-*r*79.9%
sub-neg79.9%
distribute-rgt-neg-out79.9%
+-commutative79.9%
fma-def77.9%
Simplified77.9%
Taylor expanded in t around 0 19.2%
*-commutative19.2%
frac-2neg19.2%
mul-1-neg19.2%
associate-*r/29.5%
*-commutative29.5%
add-sqr-sqrt19.1%
sqrt-unprod8.6%
mul-1-neg8.6%
mul-1-neg8.6%
sqr-neg8.6%
sqrt-prod10.2%
add-sqr-sqrt38.2%
Applied egg-rr38.2%
if 1.0500000000000001e-239 < z Initial program 67.3%
associate-*l/65.6%
*-commutative65.6%
associate-*l/64.8%
associate-*r*65.6%
sub-neg65.6%
distribute-rgt-neg-out65.6%
+-commutative65.6%
fma-def65.6%
Simplified65.6%
Taylor expanded in t around 0 81.2%
Final simplification75.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.25e-215) (* y (- x)) (if (<= z 5e-173) (/ y (/ z (* z x))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.25e-215) {
tmp = y * -x;
} else if (z <= 5e-173) {
tmp = y / (z / (z * x));
} else {
tmp = x * y;
}
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.25d-215)) then
tmp = y * -x
else if (z <= 5d-173) then
tmp = y / (z / (z * x))
else
tmp = x * y
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.25e-215) {
tmp = y * -x;
} else if (z <= 5e-173) {
tmp = y / (z / (z * x));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.25e-215: tmp = y * -x elif z <= 5e-173: tmp = y / (z / (z * x)) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.25e-215) tmp = Float64(y * Float64(-x)); elseif (z <= 5e-173) tmp = Float64(y / Float64(z / Float64(z * x))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.25e-215) tmp = y * -x; elseif (z <= 5e-173) tmp = y / (z / (z * x)); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.25e-215], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 5e-173], N[(y / N[(z / N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.25 \cdot 10^{-215}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-173}:\\
\;\;\;\;\frac{y}{\frac{z}{z \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -3.25e-215Initial program 59.6%
associate-*l/61.9%
*-commutative61.9%
associate-*l/61.1%
associate-*r*58.4%
sub-neg58.4%
distribute-rgt-neg-out58.4%
+-commutative58.4%
fma-def57.5%
Simplified57.5%
Taylor expanded in z around -inf 75.6%
*-commutative75.6%
mul-1-neg75.6%
*-commutative75.6%
Simplified75.6%
if -3.25e-215 < z < 5.0000000000000002e-173Initial program 88.3%
associate-*l/89.8%
*-commutative89.8%
associate-*l/89.8%
associate-*r*80.3%
sub-neg80.3%
distribute-rgt-neg-out80.3%
+-commutative80.3%
fma-def80.2%
Simplified80.2%
Taylor expanded in t around 0 23.6%
associate-*l/37.9%
associate-/l*29.8%
*-commutative29.8%
Applied egg-rr29.8%
if 5.0000000000000002e-173 < z Initial program 65.5%
associate-*l/63.9%
*-commutative63.9%
associate-*l/63.0%
associate-*r*63.9%
sub-neg63.9%
distribute-rgt-neg-out63.9%
+-commutative63.9%
fma-def63.9%
Simplified63.9%
Taylor expanded in t around 0 86.9%
Final simplification73.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.55e-215) (* y (- x)) (if (<= z 1.45e-112) (/ (* x (* z y)) z) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.55e-215) {
tmp = y * -x;
} else if (z <= 1.45e-112) {
tmp = (x * (z * y)) / z;
} else {
tmp = x * y;
}
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.55d-215)) then
tmp = y * -x
else if (z <= 1.45d-112) then
tmp = (x * (z * y)) / z
else
tmp = x * y
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.55e-215) {
tmp = y * -x;
} else if (z <= 1.45e-112) {
tmp = (x * (z * y)) / z;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.55e-215: tmp = y * -x elif z <= 1.45e-112: tmp = (x * (z * y)) / z else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.55e-215) tmp = Float64(y * Float64(-x)); elseif (z <= 1.45e-112) tmp = Float64(Float64(x * Float64(z * y)) / z); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.55e-215) tmp = y * -x; elseif (z <= 1.45e-112) tmp = (x * (z * y)) / z; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.55e-215], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.45e-112], N[(N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-215}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-112}:\\
\;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -1.54999999999999997e-215Initial program 60.0%
associate-*l/62.3%
*-commutative62.3%
associate-*l/61.4%
associate-*r*58.8%
sub-neg58.8%
distribute-rgt-neg-out58.8%
+-commutative58.8%
fma-def57.9%
Simplified57.9%
Taylor expanded in z around -inf 74.9%
*-commutative74.9%
mul-1-neg74.9%
*-commutative74.9%
Simplified74.9%
if -1.54999999999999997e-215 < z < 1.44999999999999996e-112Initial program 87.2%
associate-*l/84.3%
*-commutative84.3%
associate-*l/84.4%
associate-*r*82.1%
sub-neg82.1%
distribute-rgt-neg-out82.1%
+-commutative82.1%
fma-def81.9%
Simplified81.9%
Taylor expanded in t around 0 28.6%
associate-*l/43.7%
*-commutative43.7%
associate-*r*47.4%
Applied egg-rr47.4%
if 1.44999999999999996e-112 < z Initial program 64.7%
associate-*l/64.8%
*-commutative64.8%
associate-*l/63.9%
associate-*r*62.1%
sub-neg62.1%
distribute-rgt-neg-out62.1%
+-commutative62.1%
fma-def62.2%
Simplified62.2%
Taylor expanded in t around 0 88.1%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -5e-310) (* y (- x)) (* x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e-310) {
tmp = y * -x;
} else {
tmp = x * y;
}
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 <= (-5d-310)) then
tmp = y * -x
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e-310) {
tmp = y * -x;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e-310: tmp = y * -x else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e-310) tmp = Float64(y * Float64(-x)); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e-310) tmp = y * -x; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e-310], N[(y * (-x)), $MachinePrecision], N[(x * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-310}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -4.999999999999985e-310Initial program 64.2%
associate-*l/66.2%
*-commutative66.2%
associate-*l/65.5%
associate-*r*61.0%
sub-neg61.0%
distribute-rgt-neg-out61.0%
+-commutative61.0%
fma-def60.2%
Simplified60.2%
Taylor expanded in z around -inf 66.5%
*-commutative66.5%
mul-1-neg66.5%
*-commutative66.5%
Simplified66.5%
if -4.999999999999985e-310 < z Initial program 68.6%
associate-*l/67.8%
*-commutative67.8%
associate-*l/67.1%
associate-*r*67.1%
sub-neg67.1%
distribute-rgt-neg-out67.1%
+-commutative67.1%
fma-def67.1%
Simplified67.1%
Taylor expanded in t around 0 76.1%
Final simplification71.3%
(FPCore (x y z t a) :precision binary64 (* x y))
double code(double x, double y, double z, double t, double a) {
return x * y;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x * y;
}
def code(x, y, z, t, a): return x * y
function code(x, y, z, t, a) return Float64(x * y) end
function tmp = code(x, y, z, t, a) tmp = x * y; end
code[x_, y_, z_, t_, a_] := N[(x * y), $MachinePrecision]
\begin{array}{l}
\\
x \cdot y
\end{array}
Initial program 66.4%
associate-*l/67.0%
*-commutative67.0%
associate-*l/66.3%
associate-*r*64.0%
sub-neg64.0%
distribute-rgt-neg-out64.0%
+-commutative64.0%
fma-def63.6%
Simplified63.6%
Taylor expanded in t around 0 43.7%
Final simplification43.7%
(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 2023301
(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)))))