
(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 -1.05e+78) (* x (- y)) (if (<= z 7e+100) (/ (* z (* x y)) (sqrt (- (* z z) (* t a)))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.05e+78) {
tmp = x * -y;
} else if (z <= 7e+100) {
tmp = (z * (x * y)) / sqrt(((z * z) - (t * a)));
} 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.05d+78)) then
tmp = x * -y
else if (z <= 7d+100) then
tmp = (z * (x * y)) / sqrt(((z * z) - (t * a)))
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.05e+78) {
tmp = x * -y;
} else if (z <= 7e+100) {
tmp = (z * (x * y)) / Math.sqrt(((z * z) - (t * a)));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.05e+78: tmp = x * -y elif z <= 7e+100: tmp = (z * (x * y)) / math.sqrt(((z * z) - (t * a))) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.05e+78) tmp = Float64(x * Float64(-y)); elseif (z <= 7e+100) tmp = Float64(Float64(z * Float64(x * y)) / sqrt(Float64(Float64(z * z) - Float64(t * a)))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.05e+78) tmp = x * -y; elseif (z <= 7e+100) tmp = (z * (x * y)) / sqrt(((z * z) - (t * a))); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.05e+78], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 7e+100], N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+78}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+100}:\\
\;\;\;\;\frac{z \cdot \left(x \cdot y\right)}{\sqrt{z \cdot z - t \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -1.05e78Initial program 32.0%
Taylor expanded in z around -inf 98.5%
mul-1-neg98.5%
distribute-rgt-neg-out98.5%
Simplified98.5%
if -1.05e78 < z < 6.99999999999999953e100Initial program 86.7%
if 6.99999999999999953e100 < z Initial program 35.7%
Taylor expanded in z around inf 98.2%
Final simplification91.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.06e+80) (* x (- y)) (if (<= z 1.1e+100) (* x (/ z (/ (sqrt (- (* z z) (* t a))) y))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.06e+80) {
tmp = x * -y;
} else if (z <= 1.1e+100) {
tmp = x * (z / (sqrt(((z * 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 <= (-2.06d+80)) then
tmp = x * -y
else if (z <= 1.1d+100) then
tmp = x * (z / (sqrt(((z * 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 <= -2.06e+80) {
tmp = x * -y;
} else if (z <= 1.1e+100) {
tmp = x * (z / (Math.sqrt(((z * z) - (t * a))) / y));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.06e+80: tmp = x * -y elif z <= 1.1e+100: tmp = x * (z / (math.sqrt(((z * z) - (t * a))) / y)) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.06e+80) tmp = Float64(x * Float64(-y)); elseif (z <= 1.1e+100) tmp = Float64(x * Float64(z / Float64(sqrt(Float64(Float64(z * z) - Float64(t * 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 <= -2.06e+80) tmp = x * -y; elseif (z <= 1.1e+100) tmp = x * (z / (sqrt(((z * z) - (t * a))) / y)); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.06e+80], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 1.1e+100], N[(x * N[(z / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.06 \cdot 10^{+80}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+100}:\\
\;\;\;\;x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -2.06e80Initial program 31.0%
Taylor expanded in z around -inf 98.5%
mul-1-neg98.5%
distribute-rgt-neg-out98.5%
Simplified98.5%
if -2.06e80 < z < 1.1e100Initial program 86.8%
associate-*l*81.3%
associate-*r/80.9%
*-commutative80.9%
associate-/l*82.1%
Simplified82.1%
if 1.1e100 < z Initial program 35.7%
Taylor expanded in z around inf 98.2%
Final simplification89.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.8e-91) (* x (- y)) (if (<= z 5.2e-70) (* x (/ z (/ (sqrt (* a (- t))) y))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8e-91) {
tmp = x * -y;
} else if (z <= 5.2e-70) {
tmp = x * (z / (sqrt((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 <= (-2.8d-91)) then
tmp = x * -y
else if (z <= 5.2d-70) then
tmp = x * (z / (sqrt((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 <= -2.8e-91) {
tmp = x * -y;
} else if (z <= 5.2e-70) {
tmp = x * (z / (Math.sqrt((a * -t)) / y));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.8e-91: tmp = x * -y elif z <= 5.2e-70: tmp = x * (z / (math.sqrt((a * -t)) / y)) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.8e-91) tmp = Float64(x * Float64(-y)); elseif (z <= 5.2e-70) tmp = Float64(x * Float64(z / Float64(sqrt(Float64(a * Float64(-t))) / y))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.8e-91) tmp = x * -y; elseif (z <= 5.2e-70) tmp = x * (z / (sqrt((a * -t)) / y)); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8e-91], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 5.2e-70], N[(x * N[(z / N[(N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-91}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-70}:\\
\;\;\;\;x \cdot \frac{z}{\frac{\sqrt{a \cdot \left(-t\right)}}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -2.8e-91Initial program 56.8%
Taylor expanded in z around -inf 91.8%
mul-1-neg91.8%
distribute-rgt-neg-out91.8%
Simplified91.8%
if -2.8e-91 < z < 5.20000000000000004e-70Initial program 81.3%
associate-*l*76.8%
associate-*r/75.8%
*-commutative75.8%
associate-/l*74.1%
Simplified74.1%
Taylor expanded in z around 0 67.9%
associate-*r*67.9%
neg-mul-167.9%
*-commutative67.9%
Simplified67.9%
if 5.20000000000000004e-70 < z Initial program 55.9%
Taylor expanded in z around inf 87.1%
Final simplification83.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.4e-91) (* x (- y)) (if (<= z 9.2e-70) (* (/ y (sqrt (* a (- t)))) (* z x)) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e-91) {
tmp = x * -y;
} else if (z <= 9.2e-70) {
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 <= (-1.4d-91)) then
tmp = x * -y
else if (z <= 9.2d-70) 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 <= -1.4e-91) {
tmp = x * -y;
} else if (z <= 9.2e-70) {
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 <= -1.4e-91: tmp = x * -y elif z <= 9.2e-70: 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 <= -1.4e-91) tmp = Float64(x * Float64(-y)); elseif (z <= 9.2e-70) 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 <= -1.4e-91) tmp = x * -y; elseif (z <= 9.2e-70) 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, -1.4e-91], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 9.2e-70], 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 -1.4 \cdot 10^{-91}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-70}:\\
\;\;\;\;\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 < -1.4e-91Initial program 56.8%
Taylor expanded in z around -inf 91.8%
mul-1-neg91.8%
distribute-rgt-neg-out91.8%
Simplified91.8%
if -1.4e-91 < z < 9.20000000000000002e-70Initial program 81.3%
associate-*l*76.8%
*-commutative76.8%
associate-*l*79.0%
associate-*r/79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in z around 0 72.9%
associate-*r*67.9%
neg-mul-167.9%
*-commutative67.9%
Simplified72.9%
if 9.20000000000000002e-70 < z Initial program 55.9%
Taylor expanded in z around inf 87.1%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -6e-103) (* x (- y)) (if (<= z 1.1e-69) (/ (* z (* x y)) (sqrt (* a (- t)))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e-103) {
tmp = x * -y;
} else if (z <= 1.1e-69) {
tmp = (z * (x * y)) / sqrt((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 <= (-6d-103)) then
tmp = x * -y
else if (z <= 1.1d-69) then
tmp = (z * (x * y)) / sqrt((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 <= -6e-103) {
tmp = x * -y;
} else if (z <= 1.1e-69) {
tmp = (z * (x * y)) / Math.sqrt((a * -t));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6e-103: tmp = x * -y elif z <= 1.1e-69: tmp = (z * (x * y)) / math.sqrt((a * -t)) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e-103) tmp = Float64(x * Float64(-y)); elseif (z <= 1.1e-69) tmp = Float64(Float64(z * Float64(x * y)) / sqrt(Float64(a * Float64(-t)))); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6e-103) tmp = x * -y; elseif (z <= 1.1e-69) tmp = (z * (x * y)) / sqrt((a * -t)); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e-103], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 1.1e-69], N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-103}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-69}:\\
\;\;\;\;\frac{z \cdot \left(x \cdot y\right)}{\sqrt{a \cdot \left(-t\right)}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -6e-103Initial program 56.8%
Taylor expanded in z around -inf 91.8%
mul-1-neg91.8%
distribute-rgt-neg-out91.8%
Simplified91.8%
if -6e-103 < z < 1.1e-69Initial program 81.3%
Taylor expanded in z around 0 73.7%
associate-*r*67.9%
neg-mul-167.9%
*-commutative67.9%
Simplified73.7%
if 1.1e-69 < z Initial program 55.9%
Taylor expanded in z around inf 87.1%
Final simplification85.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.6e-103) (* x (- y)) (if (<= z 2.8e-162) (/ (* (* z y) (- x)) (* -0.5 (* t (/ a z)))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.6e-103) {
tmp = x * -y;
} else if (z <= 2.8e-162) {
tmp = ((z * y) * -x) / (-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 <= (-1.6d-103)) then
tmp = x * -y
else if (z <= 2.8d-162) then
tmp = ((z * y) * -x) / ((-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 <= -1.6e-103) {
tmp = x * -y;
} else if (z <= 2.8e-162) {
tmp = ((z * y) * -x) / (-0.5 * (t * (a / z)));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.6e-103: tmp = x * -y elif z <= 2.8e-162: tmp = ((z * y) * -x) / (-0.5 * (t * (a / z))) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.6e-103) tmp = Float64(x * Float64(-y)); elseif (z <= 2.8e-162) tmp = Float64(Float64(Float64(z * y) * Float64(-x)) / 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 <= -1.6e-103) tmp = x * -y; elseif (z <= 2.8e-162) tmp = ((z * y) * -x) / (-0.5 * (t * (a / z))); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.6e-103], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 2.8e-162], N[(N[(N[(z * y), $MachinePrecision] * (-x)), $MachinePrecision] / N[(-0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-103}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-162}:\\
\;\;\;\;\frac{\left(z \cdot y\right) \cdot \left(-x\right)}{-0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -1.59999999999999988e-103Initial program 56.8%
Taylor expanded in z around -inf 91.8%
mul-1-neg91.8%
distribute-rgt-neg-out91.8%
Simplified91.8%
if -1.59999999999999988e-103 < z < 2.80000000000000022e-162Initial program 77.6%
associate-*l*76.1%
*-commutative76.1%
associate-*l*76.4%
associate-*r/76.6%
*-commutative76.6%
Simplified76.6%
Taylor expanded in z around -inf 45.2%
associate-*l/47.2%
frac-2neg47.2%
*-commutative47.2%
+-commutative47.2%
fma-def47.2%
*-commutative47.2%
add-sqr-sqrt30.7%
sqrt-unprod47.1%
mul-1-neg47.1%
mul-1-neg47.1%
sqr-neg47.1%
sqrt-prod16.6%
add-sqr-sqrt45.3%
Applied egg-rr45.3%
associate-*r*45.2%
distribute-rgt-neg-in45.2%
*-commutative45.2%
neg-sub045.2%
fma-udef45.2%
associate--r+45.2%
neg-sub045.2%
distribute-lft-neg-in45.2%
metadata-eval45.2%
*-commutative45.2%
Simplified45.2%
Taylor expanded in a around inf 41.3%
associate-/l*45.4%
associate-/r/45.5%
Simplified45.5%
if 2.80000000000000022e-162 < z Initial program 62.4%
Taylor expanded in z around inf 78.1%
Final simplification77.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.5e-148) (* x (- y)) (* y (* x (/ z (+ z (* -0.5 (* a (/ t z)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e-148) {
tmp = x * -y;
} else {
tmp = y * (x * (z / (z + (-0.5 * (a * (t / z))))));
}
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-148)) then
tmp = x * -y
else
tmp = y * (x * (z / (z + ((-0.5d0) * (a * (t / z))))))
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-148) {
tmp = x * -y;
} else {
tmp = y * (x * (z / (z + (-0.5 * (a * (t / z))))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e-148: tmp = x * -y else: tmp = y * (x * (z / (z + (-0.5 * (a * (t / z)))))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e-148) tmp = Float64(x * Float64(-y)); else tmp = Float64(y * Float64(x * Float64(z / Float64(z + Float64(-0.5 * Float64(a * Float64(t / z))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.5e-148) tmp = x * -y; else tmp = y * (x * (z / (z + (-0.5 * (a * (t / z)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e-148], N[(x * (-y)), $MachinePrecision], N[(y * N[(x * N[(z / N[(z + N[(-0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-148}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{z}{z + -0.5 \cdot \left(a \cdot \frac{t}{z}\right)}\right)\\
\end{array}
\end{array}
if z < -3.5e-148Initial program 58.1%
Taylor expanded in z around -inf 85.8%
mul-1-neg85.8%
distribute-rgt-neg-out85.8%
Simplified85.8%
if -3.5e-148 < z Initial program 67.3%
associate-*l/64.3%
associate-/l*61.8%
associate-*l/63.4%
associate-*r/61.9%
associate-/r/64.0%
associate-*r*66.7%
pow266.7%
Applied egg-rr66.7%
Taylor expanded in z around inf 68.1%
associate-*r/70.2%
Simplified70.2%
Final simplification77.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.4e-175) (* x (- y)) (if (<= z 1.85e-112) (/ 1.0 (* z (/ (/ 1.0 y) (* z x)))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e-175) {
tmp = x * -y;
} else if (z <= 1.85e-112) {
tmp = 1.0 / (z * ((1.0 / y) / (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 <= (-2.4d-175)) then
tmp = x * -y
else if (z <= 1.85d-112) then
tmp = 1.0d0 / (z * ((1.0d0 / y) / (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 <= -2.4e-175) {
tmp = x * -y;
} else if (z <= 1.85e-112) {
tmp = 1.0 / (z * ((1.0 / y) / (z * x)));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.4e-175: tmp = x * -y elif z <= 1.85e-112: tmp = 1.0 / (z * ((1.0 / y) / (z * x))) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.4e-175) tmp = Float64(x * Float64(-y)); elseif (z <= 1.85e-112) tmp = Float64(1.0 / Float64(z * Float64(Float64(1.0 / y) / 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 <= -2.4e-175) tmp = x * -y; elseif (z <= 1.85e-112) tmp = 1.0 / (z * ((1.0 / y) / (z * x))); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e-175], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 1.85e-112], N[(1.0 / N[(z * N[(N[(1.0 / y), $MachinePrecision] / N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-175}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-112}:\\
\;\;\;\;\frac{1}{z \cdot \frac{\frac{1}{y}}{z \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -2.4e-175Initial program 60.1%
Taylor expanded in z around -inf 83.4%
mul-1-neg83.4%
distribute-rgt-neg-out83.4%
Simplified83.4%
if -2.4e-175 < z < 1.8499999999999999e-112Initial program 79.4%
associate-*l*78.7%
*-commutative78.7%
associate-*l*77.0%
associate-*r/76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in z around -inf 31.3%
associate-*r/31.3%
neg-mul-131.3%
Simplified31.3%
associate-*l/41.1%
clear-num41.1%
add-sqr-sqrt24.3%
sqrt-unprod45.5%
sqr-neg45.5%
sqrt-unprod17.1%
add-sqr-sqrt44.0%
*-commutative44.0%
Applied egg-rr44.0%
associate-/r*34.4%
Simplified34.4%
div-inv34.4%
*-un-lft-identity34.4%
times-frac44.1%
Applied egg-rr44.1%
if 1.8499999999999999e-112 < z Initial program 59.2%
Taylor expanded in z around inf 83.2%
Final simplification76.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.2e-42) (* x (- y)) (if (<= z 3e-141) (/ (* y (* z x)) (- z)) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.2e-42) {
tmp = x * -y;
} else if (z <= 3e-141) {
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 <= (-4.2d-42)) then
tmp = x * -y
else if (z <= 3d-141) 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 <= -4.2e-42) {
tmp = x * -y;
} else if (z <= 3e-141) {
tmp = (y * (z * x)) / -z;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.2e-42: tmp = x * -y elif z <= 3e-141: tmp = (y * (z * x)) / -z else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.2e-42) tmp = Float64(x * Float64(-y)); elseif (z <= 3e-141) tmp = Float64(Float64(y * Float64(z * x)) / Float64(-z)); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.2e-42) tmp = x * -y; elseif (z <= 3e-141) tmp = (y * (z * x)) / -z; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.2e-42], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 3e-141], N[(N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision] / (-z)), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-42}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-141}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{-z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -4.20000000000000013e-42Initial program 52.3%
Taylor expanded in z around -inf 93.8%
mul-1-neg93.8%
distribute-rgt-neg-out93.8%
Simplified93.8%
if -4.20000000000000013e-42 < z < 2.99999999999999983e-141Initial program 81.6%
associate-/l*79.4%
*-commutative79.4%
associate-/l*81.6%
associate-*l*80.7%
Simplified80.7%
Taylor expanded in z around -inf 46.5%
neg-mul-146.5%
Simplified46.5%
if 2.99999999999999983e-141 < z Initial program 60.4%
Taylor expanded in z around inf 80.9%
Final simplification76.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.1e-194) (* x (- y)) (if (<= z 3e-141) (* (* z x) (/ y z)) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.1e-194) {
tmp = x * -y;
} else if (z <= 3e-141) {
tmp = (z * x) * (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 <= (-2.1d-194)) then
tmp = x * -y
else if (z <= 3d-141) then
tmp = (z * x) * (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 <= -2.1e-194) {
tmp = x * -y;
} else if (z <= 3e-141) {
tmp = (z * x) * (y / z);
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.1e-194: tmp = x * -y elif z <= 3e-141: tmp = (z * x) * (y / z) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.1e-194) tmp = Float64(x * Float64(-y)); elseif (z <= 3e-141) tmp = Float64(Float64(z * x) * Float64(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 <= -2.1e-194) tmp = x * -y; elseif (z <= 3e-141) tmp = (z * x) * (y / z); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.1e-194], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 3e-141], N[(N[(z * x), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-194}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-141}:\\
\;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -2.1e-194Initial program 60.3%
Taylor expanded in z around -inf 82.4%
mul-1-neg82.4%
distribute-rgt-neg-out82.4%
Simplified82.4%
if -2.1e-194 < z < 2.99999999999999983e-141Initial program 79.4%
associate-*l*79.8%
*-commutative79.8%
associate-*l*77.9%
associate-*r/75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in z around inf 34.6%
if 2.99999999999999983e-141 < z Initial program 60.4%
Taylor expanded in z around inf 80.9%
Final simplification74.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.2e-194) (* x (- y)) (if (<= z 2e-111) (/ y (/ z (* z x))) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e-194) {
tmp = x * -y;
} else if (z <= 2e-111) {
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 <= (-9.2d-194)) then
tmp = x * -y
else if (z <= 2d-111) 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 <= -9.2e-194) {
tmp = x * -y;
} else if (z <= 2e-111) {
tmp = y / (z / (z * x));
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.2e-194: tmp = x * -y elif z <= 2e-111: tmp = y / (z / (z * x)) else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.2e-194) tmp = Float64(x * Float64(-y)); elseif (z <= 2e-111) 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 <= -9.2e-194) tmp = x * -y; elseif (z <= 2e-111) tmp = y / (z / (z * x)); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e-194], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 2e-111], N[(y / N[(z / N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{-194}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-111}:\\
\;\;\;\;\frac{y}{\frac{z}{z \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -9.2000000000000001e-194Initial program 60.3%
Taylor expanded in z around -inf 82.4%
mul-1-neg82.4%
distribute-rgt-neg-out82.4%
Simplified82.4%
if -9.2000000000000001e-194 < z < 2.00000000000000018e-111Initial program 80.3%
associate-*l*79.5%
associate-*r/77.3%
*-commutative77.3%
associate-/l*75.3%
Simplified75.3%
associate-*r/78.7%
associate-/l*77.7%
*-commutative77.7%
associate-/l*79.3%
pow279.3%
*-commutative79.3%
Applied egg-rr79.3%
Taylor expanded in z around inf 37.9%
if 2.00000000000000018e-111 < z Initial program 59.2%
Taylor expanded in z around inf 83.2%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.5e-175) (* x (- y)) (if (<= z 5.2e-113) (/ (* y (* z x)) z) (* x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e-175) {
tmp = x * -y;
} else if (z <= 5.2e-113) {
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 <= (-9.5d-175)) then
tmp = x * -y
else if (z <= 5.2d-113) 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 <= -9.5e-175) {
tmp = x * -y;
} else if (z <= 5.2e-113) {
tmp = (y * (z * x)) / z;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e-175: tmp = x * -y elif z <= 5.2e-113: tmp = (y * (z * x)) / z else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e-175) tmp = Float64(x * Float64(-y)); elseif (z <= 5.2e-113) tmp = Float64(Float64(y * Float64(z * 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 <= -9.5e-175) tmp = x * -y; elseif (z <= 5.2e-113) tmp = (y * (z * x)) / z; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e-175], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 5.2e-113], N[(N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-175}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -9.50000000000000052e-175Initial program 60.1%
Taylor expanded in z around -inf 83.4%
mul-1-neg83.4%
distribute-rgt-neg-out83.4%
Simplified83.4%
if -9.50000000000000052e-175 < z < 5.1999999999999998e-113Initial program 79.4%
associate-/l*75.0%
*-commutative75.0%
associate-/l*79.4%
associate-*l*77.0%
Simplified77.0%
Taylor expanded in z around inf 44.0%
if 5.1999999999999998e-113 < z Initial program 59.2%
Taylor expanded in z around inf 83.2%
Final simplification76.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.05e-303) (* x (- y)) (* x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.05e-303) {
tmp = x * -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 <= (-2.05d-303)) then
tmp = x * -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 <= -2.05e-303) {
tmp = x * -y;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.05e-303: tmp = x * -y else: tmp = x * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.05e-303) tmp = Float64(x * 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 <= -2.05e-303) tmp = x * -y; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.05e-303], N[(x * (-y)), $MachinePrecision], N[(x * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{-303}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -2.05000000000000009e-303Initial program 61.9%
Taylor expanded in z around -inf 76.4%
mul-1-neg76.4%
distribute-rgt-neg-out76.4%
Simplified76.4%
if -2.05000000000000009e-303 < z Initial program 64.5%
Taylor expanded in z around inf 68.2%
Final simplification72.6%
(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 63.1%
Taylor expanded in z around inf 41.1%
Final simplification41.1%
(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 2023310
(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)))))