
(FPCore (x y z) :precision binary64 (/ (* (cosh x) (/ y x)) z))
double code(double x, double y, double z) {
return (cosh(x) * (y / x)) / z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (cosh(x) * (y / x)) / z
end function
public static double code(double x, double y, double z) {
return (Math.cosh(x) * (y / x)) / z;
}
def code(x, y, z): return (math.cosh(x) * (y / x)) / z
function code(x, y, z) return Float64(Float64(cosh(x) * Float64(y / x)) / z) end
function tmp = code(x, y, z) tmp = (cosh(x) * (y / x)) / z; end
code[x_, y_, z_] := N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cosh x \cdot \frac{y}{x}}{z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (* (cosh x) (/ y x)) z))
double code(double x, double y, double z) {
return (cosh(x) * (y / x)) / z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (cosh(x) * (y / x)) / z
end function
public static double code(double x, double y, double z) {
return (Math.cosh(x) * (y / x)) / z;
}
def code(x, y, z): return (math.cosh(x) * (y / x)) / z
function code(x, y, z) return Float64(Float64(cosh(x) * Float64(y / x)) / z) end
function tmp = code(x, y, z) tmp = (cosh(x) * (y / x)) / z; end
code[x_, y_, z_] := N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cosh x \cdot \frac{y}{x}}{z}
\end{array}
(FPCore (x y z) :precision binary64 (if (<= y -4.5e+75) (/ (cosh x) (* x (/ z y))) (/ (* y (/ (cosh x) x)) z)))
double code(double x, double y, double z) {
double tmp;
if (y <= -4.5e+75) {
tmp = cosh(x) / (x * (z / y));
} else {
tmp = (y * (cosh(x) / x)) / z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-4.5d+75)) then
tmp = cosh(x) / (x * (z / y))
else
tmp = (y * (cosh(x) / x)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -4.5e+75) {
tmp = Math.cosh(x) / (x * (z / y));
} else {
tmp = (y * (Math.cosh(x) / x)) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -4.5e+75: tmp = math.cosh(x) / (x * (z / y)) else: tmp = (y * (math.cosh(x) / x)) / z return tmp
function code(x, y, z) tmp = 0.0 if (y <= -4.5e+75) tmp = Float64(cosh(x) / Float64(x * Float64(z / y))); else tmp = Float64(Float64(y * Float64(cosh(x) / x)) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -4.5e+75) tmp = cosh(x) / (x * (z / y)); else tmp = (y * (cosh(x) / x)) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -4.5e+75], N[(N[Cosh[x], $MachinePrecision] / N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[Cosh[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+75}:\\
\;\;\;\;\frac{\cosh x}{x \cdot \frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \frac{\cosh x}{x}}{z}\\
\end{array}
\end{array}
if y < -4.5000000000000004e75Initial program 85.7%
associate-/l*85.7%
associate-/r/99.8%
Simplified99.8%
if -4.5000000000000004e75 < y Initial program 84.7%
*-commutative84.7%
associate-*r/84.7%
Simplified84.7%
frac-times81.8%
associate-*r/81.5%
*-commutative81.5%
associate-/r*93.8%
associate-*l/98.0%
Applied egg-rr98.0%
Final simplification98.4%
(FPCore (x y z) :precision binary64 (if (<= (* (cosh x) (/ y x)) INFINITY) (* (/ y x) (/ (cosh x) z)) (* y (/ (cosh x) (* x z)))))
double code(double x, double y, double z) {
double tmp;
if ((cosh(x) * (y / x)) <= ((double) INFINITY)) {
tmp = (y / x) * (cosh(x) / z);
} else {
tmp = y * (cosh(x) / (x * z));
}
return tmp;
}
public static double code(double x, double y, double z) {
double tmp;
if ((Math.cosh(x) * (y / x)) <= Double.POSITIVE_INFINITY) {
tmp = (y / x) * (Math.cosh(x) / z);
} else {
tmp = y * (Math.cosh(x) / (x * z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (math.cosh(x) * (y / x)) <= math.inf: tmp = (y / x) * (math.cosh(x) / z) else: tmp = y * (math.cosh(x) / (x * z)) return tmp
function code(x, y, z) tmp = 0.0 if (Float64(cosh(x) * Float64(y / x)) <= Inf) tmp = Float64(Float64(y / x) * Float64(cosh(x) / z)); else tmp = Float64(y * Float64(cosh(x) / Float64(x * z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((cosh(x) * (y / x)) <= Inf) tmp = (y / x) * (cosh(x) / z); else tmp = y * (cosh(x) / (x * z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(y / x), $MachinePrecision] * N[(N[Cosh[x], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[Cosh[x], $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq \infty:\\
\;\;\;\;\frac{y}{x} \cdot \frac{\cosh x}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{\cosh x}{x \cdot z}\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 y x)) < +inf.0Initial program 94.9%
*-commutative94.9%
associate-*r/94.9%
Simplified94.9%
if +inf.0 < (*.f64 (cosh.f64 x) (/.f64 y x)) Initial program 0.0%
associate-*r/100.0%
associate-/l/70.4%
associate-*l/70.4%
*-commutative70.4%
*-commutative70.4%
Simplified70.4%
Final simplification92.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -4e-35) (not (<= z 2.8e-87))) (* y (/ (cosh x) (* x z))) (* (cosh x) (/ (/ y z) x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -4e-35) || !(z <= 2.8e-87)) {
tmp = y * (cosh(x) / (x * z));
} else {
tmp = cosh(x) * ((y / z) / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-4d-35)) .or. (.not. (z <= 2.8d-87))) then
tmp = y * (cosh(x) / (x * z))
else
tmp = cosh(x) * ((y / z) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -4e-35) || !(z <= 2.8e-87)) {
tmp = y * (Math.cosh(x) / (x * z));
} else {
tmp = Math.cosh(x) * ((y / z) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -4e-35) or not (z <= 2.8e-87): tmp = y * (math.cosh(x) / (x * z)) else: tmp = math.cosh(x) * ((y / z) / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -4e-35) || !(z <= 2.8e-87)) tmp = Float64(y * Float64(cosh(x) / Float64(x * z))); else tmp = Float64(cosh(x) * Float64(Float64(y / z) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -4e-35) || ~((z <= 2.8e-87))) tmp = y * (cosh(x) / (x * z)); else tmp = cosh(x) * ((y / z) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -4e-35], N[Not[LessEqual[z, 2.8e-87]], $MachinePrecision]], N[(y * N[(N[Cosh[x], $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cosh[x], $MachinePrecision] * N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-35} \lor \neg \left(z \leq 2.8 \cdot 10^{-87}\right):\\
\;\;\;\;y \cdot \frac{\cosh x}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\cosh x \cdot \frac{\frac{y}{z}}{x}\\
\end{array}
\end{array}
if z < -4.00000000000000003e-35 or 2.8000000000000001e-87 < z Initial program 80.1%
associate-*r/92.0%
associate-/l/81.6%
associate-*l/81.6%
*-commutative81.6%
*-commutative81.6%
Simplified81.6%
if -4.00000000000000003e-35 < z < 2.8000000000000001e-87Initial program 91.0%
associate-*r/91.0%
associate-/l/89.7%
associate-/r*99.8%
Simplified99.8%
Final simplification89.6%
(FPCore (x y z) :precision binary64 (* y (/ (cosh x) (* x z))))
double code(double x, double y, double z) {
return y * (cosh(x) / (x * z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = y * (cosh(x) / (x * z))
end function
public static double code(double x, double y, double z) {
return y * (Math.cosh(x) / (x * z));
}
def code(x, y, z): return y * (math.cosh(x) / (x * z))
function code(x, y, z) return Float64(y * Float64(cosh(x) / Float64(x * z))) end
function tmp = code(x, y, z) tmp = y * (cosh(x) / (x * z)); end
code[x_, y_, z_] := N[(y * N[(N[Cosh[x], $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \frac{\cosh x}{x \cdot z}
\end{array}
Initial program 84.9%
associate-*r/95.5%
associate-/l/85.2%
associate-*l/84.9%
*-commutative84.9%
*-commutative84.9%
Simplified84.9%
Final simplification84.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ y (* x z))))
(if (<= z -8.4e-76)
(+ t_0 (* 0.5 (/ (* y x) z)))
(if (<= z -5.1e-174)
(/ (+ (* (/ y x) (/ z x)) (* z (* y 0.5))) (* z (/ z x)))
(+ t_0 (* 0.5 (* y (/ x z))))))))
double code(double x, double y, double z) {
double t_0 = y / (x * z);
double tmp;
if (z <= -8.4e-76) {
tmp = t_0 + (0.5 * ((y * x) / z));
} else if (z <= -5.1e-174) {
tmp = (((y / x) * (z / x)) + (z * (y * 0.5))) / (z * (z / x));
} else {
tmp = t_0 + (0.5 * (y * (x / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = y / (x * z)
if (z <= (-8.4d-76)) then
tmp = t_0 + (0.5d0 * ((y * x) / z))
else if (z <= (-5.1d-174)) then
tmp = (((y / x) * (z / x)) + (z * (y * 0.5d0))) / (z * (z / x))
else
tmp = t_0 + (0.5d0 * (y * (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y / (x * z);
double tmp;
if (z <= -8.4e-76) {
tmp = t_0 + (0.5 * ((y * x) / z));
} else if (z <= -5.1e-174) {
tmp = (((y / x) * (z / x)) + (z * (y * 0.5))) / (z * (z / x));
} else {
tmp = t_0 + (0.5 * (y * (x / z)));
}
return tmp;
}
def code(x, y, z): t_0 = y / (x * z) tmp = 0 if z <= -8.4e-76: tmp = t_0 + (0.5 * ((y * x) / z)) elif z <= -5.1e-174: tmp = (((y / x) * (z / x)) + (z * (y * 0.5))) / (z * (z / x)) else: tmp = t_0 + (0.5 * (y * (x / z))) return tmp
function code(x, y, z) t_0 = Float64(y / Float64(x * z)) tmp = 0.0 if (z <= -8.4e-76) tmp = Float64(t_0 + Float64(0.5 * Float64(Float64(y * x) / z))); elseif (z <= -5.1e-174) tmp = Float64(Float64(Float64(Float64(y / x) * Float64(z / x)) + Float64(z * Float64(y * 0.5))) / Float64(z * Float64(z / x))); else tmp = Float64(t_0 + Float64(0.5 * Float64(y * Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = y / (x * z); tmp = 0.0; if (z <= -8.4e-76) tmp = t_0 + (0.5 * ((y * x) / z)); elseif (z <= -5.1e-174) tmp = (((y / x) * (z / x)) + (z * (y * 0.5))) / (z * (z / x)); else tmp = t_0 + (0.5 * (y * (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.4e-76], N[(t$95$0 + N[(0.5 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.1e-174], N[(N[(N[(N[(y / x), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(0.5 * N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x \cdot z}\\
\mathbf{if}\;z \leq -8.4 \cdot 10^{-76}:\\
\;\;\;\;t_0 + 0.5 \cdot \frac{y \cdot x}{z}\\
\mathbf{elif}\;z \leq -5.1 \cdot 10^{-174}:\\
\;\;\;\;\frac{\frac{y}{x} \cdot \frac{z}{x} + z \cdot \left(y \cdot 0.5\right)}{z \cdot \frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + 0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\
\end{array}
\end{array}
if z < -8.39999999999999969e-76Initial program 80.2%
*-commutative80.2%
associate-*r/80.2%
Simplified80.2%
Taylor expanded in x around 0 54.1%
if -8.39999999999999969e-76 < z < -5.10000000000000032e-174Initial program 95.1%
*-commutative95.1%
associate-*r/95.0%
Simplified95.0%
Taylor expanded in x around 0 59.4%
+-commutative59.4%
associate-/l*63.7%
*-commutative63.7%
Simplified63.7%
+-commutative63.7%
associate-/r*77.4%
associate-*r/77.4%
frac-add90.6%
Applied egg-rr90.6%
if -5.10000000000000032e-174 < z Initial program 85.8%
*-commutative85.8%
associate-*r/85.8%
Simplified85.8%
Taylor expanded in x around 0 70.6%
+-commutative70.6%
associate-/l*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in y around 0 70.6%
associate-*r/74.7%
Simplified74.7%
Final simplification70.0%
(FPCore (x y z) :precision binary64 (if (or (<= y -4.2e-258) (not (<= y 1.5e-292))) (+ (/ y (* x z)) (* 0.5 (* y (/ x z)))) (/ (* y (+ (* x 0.5) (/ 1.0 x))) z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -4.2e-258) || !(y <= 1.5e-292)) {
tmp = (y / (x * z)) + (0.5 * (y * (x / z)));
} else {
tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-4.2d-258)) .or. (.not. (y <= 1.5d-292))) then
tmp = (y / (x * z)) + (0.5d0 * (y * (x / z)))
else
tmp = (y * ((x * 0.5d0) + (1.0d0 / x))) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -4.2e-258) || !(y <= 1.5e-292)) {
tmp = (y / (x * z)) + (0.5 * (y * (x / z)));
} else {
tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -4.2e-258) or not (y <= 1.5e-292): tmp = (y / (x * z)) + (0.5 * (y * (x / z))) else: tmp = (y * ((x * 0.5) + (1.0 / x))) / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -4.2e-258) || !(y <= 1.5e-292)) tmp = Float64(Float64(y / Float64(x * z)) + Float64(0.5 * Float64(y * Float64(x / z)))); else tmp = Float64(Float64(y * Float64(Float64(x * 0.5) + Float64(1.0 / x))) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -4.2e-258) || ~((y <= 1.5e-292))) tmp = (y / (x * z)) + (0.5 * (y * (x / z))); else tmp = (y * ((x * 0.5) + (1.0 / x))) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -4.2e-258], N[Not[LessEqual[y, 1.5e-292]], $MachinePrecision]], N[(N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[(x * 0.5), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-258} \lor \neg \left(y \leq 1.5 \cdot 10^{-292}\right):\\
\;\;\;\;\frac{y}{x \cdot z} + 0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\
\end{array}
\end{array}
if y < -4.1999999999999998e-258 or 1.50000000000000008e-292 < y Initial program 86.7%
*-commutative86.7%
associate-*r/86.7%
Simplified86.7%
Taylor expanded in x around 0 68.4%
+-commutative68.4%
associate-/l*70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in y around 0 68.4%
associate-*r/70.4%
Simplified70.4%
if -4.1999999999999998e-258 < y < 1.50000000000000008e-292Initial program 60.9%
*-commutative60.9%
associate-*r/61.1%
Simplified61.1%
frac-times50.5%
associate-*r/46.5%
*-commutative46.5%
associate-/r*57.6%
associate-*l/99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 56.4%
Final simplification69.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ y (* x z))))
(if (<= y -2.5e+102)
(+ t_0 (* 0.5 (/ (* y x) z)))
(if (<= y 8e-295)
(/ (* y (+ (* x 0.5) (/ 1.0 x))) z)
(+ t_0 (* 0.5 (* y (/ x z))))))))
double code(double x, double y, double z) {
double t_0 = y / (x * z);
double tmp;
if (y <= -2.5e+102) {
tmp = t_0 + (0.5 * ((y * x) / z));
} else if (y <= 8e-295) {
tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
} else {
tmp = t_0 + (0.5 * (y * (x / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = y / (x * z)
if (y <= (-2.5d+102)) then
tmp = t_0 + (0.5d0 * ((y * x) / z))
else if (y <= 8d-295) then
tmp = (y * ((x * 0.5d0) + (1.0d0 / x))) / z
else
tmp = t_0 + (0.5d0 * (y * (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y / (x * z);
double tmp;
if (y <= -2.5e+102) {
tmp = t_0 + (0.5 * ((y * x) / z));
} else if (y <= 8e-295) {
tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
} else {
tmp = t_0 + (0.5 * (y * (x / z)));
}
return tmp;
}
def code(x, y, z): t_0 = y / (x * z) tmp = 0 if y <= -2.5e+102: tmp = t_0 + (0.5 * ((y * x) / z)) elif y <= 8e-295: tmp = (y * ((x * 0.5) + (1.0 / x))) / z else: tmp = t_0 + (0.5 * (y * (x / z))) return tmp
function code(x, y, z) t_0 = Float64(y / Float64(x * z)) tmp = 0.0 if (y <= -2.5e+102) tmp = Float64(t_0 + Float64(0.5 * Float64(Float64(y * x) / z))); elseif (y <= 8e-295) tmp = Float64(Float64(y * Float64(Float64(x * 0.5) + Float64(1.0 / x))) / z); else tmp = Float64(t_0 + Float64(0.5 * Float64(y * Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = y / (x * z); tmp = 0.0; if (y <= -2.5e+102) tmp = t_0 + (0.5 * ((y * x) / z)); elseif (y <= 8e-295) tmp = (y * ((x * 0.5) + (1.0 / x))) / z; else tmp = t_0 + (0.5 * (y * (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e+102], N[(t$95$0 + N[(0.5 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e-295], N[(N[(y * N[(N[(x * 0.5), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(t$95$0 + N[(0.5 * N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x \cdot z}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+102}:\\
\;\;\;\;t_0 + 0.5 \cdot \frac{y \cdot x}{z}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-295}:\\
\;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t_0 + 0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\
\end{array}
\end{array}
if y < -2.5e102Initial program 84.2%
*-commutative84.2%
associate-*r/84.3%
Simplified84.3%
Taylor expanded in x around 0 87.9%
if -2.5e102 < y < 8.00000000000000048e-295Initial program 82.9%
*-commutative82.9%
associate-*r/83.0%
Simplified83.0%
frac-times77.1%
associate-*r/76.2%
*-commutative76.2%
associate-/r*89.6%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 55.6%
if 8.00000000000000048e-295 < y Initial program 86.5%
*-commutative86.5%
associate-*r/86.5%
Simplified86.5%
Taylor expanded in x around 0 68.5%
+-commutative68.5%
associate-/l*71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in y around 0 68.5%
associate-*r/72.3%
Simplified72.3%
Final simplification69.8%
(FPCore (x y z) :precision binary64 (if (<= z 2.1e+97) (/ (* y (+ (* x 0.5) (/ 1.0 x))) z) (* y (/ (/ 1.0 x) z))))
double code(double x, double y, double z) {
double tmp;
if (z <= 2.1e+97) {
tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
} else {
tmp = y * ((1.0 / x) / z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= 2.1d+97) then
tmp = (y * ((x * 0.5d0) + (1.0d0 / x))) / z
else
tmp = y * ((1.0d0 / x) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= 2.1e+97) {
tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
} else {
tmp = y * ((1.0 / x) / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= 2.1e+97: tmp = (y * ((x * 0.5) + (1.0 / x))) / z else: tmp = y * ((1.0 / x) / z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= 2.1e+97) tmp = Float64(Float64(y * Float64(Float64(x * 0.5) + Float64(1.0 / x))) / z); else tmp = Float64(y * Float64(Float64(1.0 / x) / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= 2.1e+97) tmp = (y * ((x * 0.5) + (1.0 / x))) / z; else tmp = y * ((1.0 / x) / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, 2.1e+97], N[(N[(y * N[(N[(x * 0.5), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(y * N[(N[(1.0 / x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.1 \cdot 10^{+97}:\\
\;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{\frac{1}{x}}{z}\\
\end{array}
\end{array}
if z < 2.10000000000000012e97Initial program 86.9%
*-commutative86.9%
associate-*r/86.9%
Simplified86.9%
frac-times87.8%
associate-*r/87.5%
*-commutative87.5%
associate-/r*94.2%
associate-*l/96.9%
Applied egg-rr96.9%
Taylor expanded in x around 0 68.6%
if 2.10000000000000012e97 < z Initial program 72.7%
*-commutative72.7%
associate-*r/72.8%
Simplified72.8%
Taylor expanded in x around 0 55.9%
*-commutative55.9%
associate-/r*42.9%
div-inv42.9%
*-un-lft-identity42.9%
times-frac56.0%
Applied egg-rr56.0%
Final simplification66.8%
(FPCore (x y z) :precision binary64 (if (<= y -8.5e+102) (/ (- (/ 1.0 x) (* x -0.5)) (/ z y)) (/ (* y (+ (* x 0.5) (/ 1.0 x))) z)))
double code(double x, double y, double z) {
double tmp;
if (y <= -8.5e+102) {
tmp = ((1.0 / x) - (x * -0.5)) / (z / y);
} else {
tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-8.5d+102)) then
tmp = ((1.0d0 / x) - (x * (-0.5d0))) / (z / y)
else
tmp = (y * ((x * 0.5d0) + (1.0d0 / x))) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -8.5e+102) {
tmp = ((1.0 / x) - (x * -0.5)) / (z / y);
} else {
tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -8.5e+102: tmp = ((1.0 / x) - (x * -0.5)) / (z / y) else: tmp = (y * ((x * 0.5) + (1.0 / x))) / z return tmp
function code(x, y, z) tmp = 0.0 if (y <= -8.5e+102) tmp = Float64(Float64(Float64(1.0 / x) - Float64(x * -0.5)) / Float64(z / y)); else tmp = Float64(Float64(y * Float64(Float64(x * 0.5) + Float64(1.0 / x))) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -8.5e+102) tmp = ((1.0 / x) - (x * -0.5)) / (z / y); else tmp = (y * ((x * 0.5) + (1.0 / x))) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -8.5e+102], N[(N[(N[(1.0 / x), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[(x * 0.5), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{1}{x} - x \cdot -0.5}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\
\end{array}
\end{array}
if y < -8.4999999999999996e102Initial program 84.2%
*-commutative84.2%
associate-*r/84.3%
Simplified84.3%
frac-times97.7%
associate-*r/97.7%
*-commutative97.7%
associate-/r*99.8%
associate-*l/84.3%
Applied egg-rr84.3%
Taylor expanded in x around 0 72.3%
associate-*r*72.3%
*-commutative72.3%
associate-*r*72.3%
Simplified72.3%
Taylor expanded in y around -inf 72.4%
mul-1-neg72.4%
associate-/l*85.9%
*-commutative85.9%
Simplified85.9%
if -8.4999999999999996e102 < y Initial program 85.1%
*-commutative85.1%
associate-*r/85.1%
Simplified85.1%
frac-times82.3%
associate-*r/81.9%
*-commutative81.9%
associate-/r*93.9%
associate-*l/98.1%
Applied egg-rr98.1%
Taylor expanded in x around 0 63.4%
Final simplification67.6%
(FPCore (x y z) :precision binary64 (* y (- (* 0.5 (/ x z)) (/ -1.0 (* x z)))))
double code(double x, double y, double z) {
return y * ((0.5 * (x / z)) - (-1.0 / (x * z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = y * ((0.5d0 * (x / z)) - ((-1.0d0) / (x * z)))
end function
public static double code(double x, double y, double z) {
return y * ((0.5 * (x / z)) - (-1.0 / (x * z)));
}
def code(x, y, z): return y * ((0.5 * (x / z)) - (-1.0 / (x * z)))
function code(x, y, z) return Float64(y * Float64(Float64(0.5 * Float64(x / z)) - Float64(-1.0 / Float64(x * z)))) end
function tmp = code(x, y, z) tmp = y * ((0.5 * (x / z)) - (-1.0 / (x * z))); end
code[x_, y_, z_] := N[(y * N[(N[(0.5 * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(-1.0 / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(0.5 \cdot \frac{x}{z} - \frac{-1}{x \cdot z}\right)
\end{array}
Initial program 84.9%
associate-*r/95.5%
associate-/l/85.2%
associate-*l/84.9%
*-commutative84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in x around 0 66.4%
Final simplification66.4%
(FPCore (x y z) :precision binary64 (if (or (<= x -1.4) (not (<= x 1.4))) (* x (/ (* y 0.5) z)) (/ (/ y z) x)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.4) || !(x <= 1.4)) {
tmp = x * ((y * 0.5) / z);
} else {
tmp = (y / z) / x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1.4d0)) .or. (.not. (x <= 1.4d0))) then
tmp = x * ((y * 0.5d0) / z)
else
tmp = (y / z) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.4) || !(x <= 1.4)) {
tmp = x * ((y * 0.5) / z);
} else {
tmp = (y / z) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.4) or not (x <= 1.4): tmp = x * ((y * 0.5) / z) else: tmp = (y / z) / x return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.4) || !(x <= 1.4)) tmp = Float64(x * Float64(Float64(y * 0.5) / z)); else tmp = Float64(Float64(y / z) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.4) || ~((x <= 1.4))) tmp = x * ((y * 0.5) / z); else tmp = (y / z) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.4], N[Not[LessEqual[x, 1.4]], $MachinePrecision]], N[(x * N[(N[(y * 0.5), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \lor \neg \left(x \leq 1.4\right):\\
\;\;\;\;x \cdot \frac{y \cdot 0.5}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\end{array}
\end{array}
if x < -1.3999999999999999 or 1.3999999999999999 < x Initial program 79.4%
*-commutative79.4%
associate-*r/79.4%
Simplified79.4%
Taylor expanded in x around 0 40.5%
+-commutative40.5%
associate-/l*43.4%
*-commutative43.4%
Simplified43.4%
Taylor expanded in x around inf 40.5%
associate-*r/40.5%
associate-*r*40.5%
*-commutative40.5%
associate-*r*40.5%
Simplified40.5%
associate-*l*40.5%
*-un-lft-identity40.5%
times-frac38.4%
/-rgt-identity38.4%
Applied egg-rr38.4%
if -1.3999999999999999 < x < 1.3999999999999999Initial program 90.7%
*-commutative90.7%
associate-*r/90.7%
Simplified90.7%
Taylor expanded in x around 0 90.5%
associate-*l/92.4%
div-inv92.4%
Applied egg-rr92.4%
Final simplification64.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -1.4) (not (<= x 1.4))) (* y (/ (* x 0.5) z)) (/ (/ y z) x)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.4) || !(x <= 1.4)) {
tmp = y * ((x * 0.5) / z);
} else {
tmp = (y / z) / x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1.4d0)) .or. (.not. (x <= 1.4d0))) then
tmp = y * ((x * 0.5d0) / z)
else
tmp = (y / z) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.4) || !(x <= 1.4)) {
tmp = y * ((x * 0.5) / z);
} else {
tmp = (y / z) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.4) or not (x <= 1.4): tmp = y * ((x * 0.5) / z) else: tmp = (y / z) / x return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.4) || !(x <= 1.4)) tmp = Float64(y * Float64(Float64(x * 0.5) / z)); else tmp = Float64(Float64(y / z) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.4) || ~((x <= 1.4))) tmp = y * ((x * 0.5) / z); else tmp = (y / z) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.4], N[Not[LessEqual[x, 1.4]], $MachinePrecision]], N[(y * N[(N[(x * 0.5), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \lor \neg \left(x \leq 1.4\right):\\
\;\;\;\;y \cdot \frac{x \cdot 0.5}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\end{array}
\end{array}
if x < -1.3999999999999999 or 1.3999999999999999 < x Initial program 79.4%
*-commutative79.4%
associate-*r/79.4%
Simplified79.4%
Taylor expanded in x around 0 40.5%
+-commutative40.5%
associate-/l*43.4%
*-commutative43.4%
Simplified43.4%
Taylor expanded in x around inf 40.5%
associate-*r/40.5%
associate-*r*40.5%
*-commutative40.5%
associate-*r*40.5%
Simplified40.5%
*-commutative40.5%
*-un-lft-identity40.5%
times-frac44.1%
/-rgt-identity44.1%
Applied egg-rr44.1%
if -1.3999999999999999 < x < 1.3999999999999999Initial program 90.7%
*-commutative90.7%
associate-*r/90.7%
Simplified90.7%
Taylor expanded in x around 0 90.5%
associate-*l/92.4%
div-inv92.4%
Applied egg-rr92.4%
Final simplification67.7%
(FPCore (x y z) :precision binary64 (if (or (<= y -9.6e-68) (not (<= y 6.8e-146))) (/ (/ y z) x) (/ (/ y x) z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -9.6e-68) || !(y <= 6.8e-146)) {
tmp = (y / z) / x;
} else {
tmp = (y / x) / z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-9.6d-68)) .or. (.not. (y <= 6.8d-146))) then
tmp = (y / z) / x
else
tmp = (y / x) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -9.6e-68) || !(y <= 6.8e-146)) {
tmp = (y / z) / x;
} else {
tmp = (y / x) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -9.6e-68) or not (y <= 6.8e-146): tmp = (y / z) / x else: tmp = (y / x) / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -9.6e-68) || !(y <= 6.8e-146)) tmp = Float64(Float64(y / z) / x); else tmp = Float64(Float64(y / x) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -9.6e-68) || ~((y <= 6.8e-146))) tmp = (y / z) / x; else tmp = (y / x) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -9.6e-68], N[Not[LessEqual[y, 6.8e-146]], $MachinePrecision]], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{-68} \lor \neg \left(y \leq 6.8 \cdot 10^{-146}\right):\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\
\end{array}
\end{array}
if y < -9.59999999999999965e-68 or 6.8000000000000001e-146 < y Initial program 91.1%
*-commutative91.1%
associate-*r/91.1%
Simplified91.1%
Taylor expanded in x around 0 47.7%
associate-*l/61.1%
div-inv61.1%
Applied egg-rr61.1%
if -9.59999999999999965e-68 < y < 6.8000000000000001e-146Initial program 71.7%
*-commutative71.7%
associate-*r/71.7%
Simplified71.7%
frac-times74.6%
associate-*r/73.7%
*-commutative73.7%
associate-/r*87.2%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 37.8%
associate-/l/49.6%
Simplified49.6%
Final simplification57.4%
(FPCore (x y z) :precision binary64 (if (<= y -6.8e-125) (/ y (* x z)) (/ (/ y x) z)))
double code(double x, double y, double z) {
double tmp;
if (y <= -6.8e-125) {
tmp = y / (x * z);
} else {
tmp = (y / x) / z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-6.8d-125)) then
tmp = y / (x * z)
else
tmp = (y / x) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -6.8e-125) {
tmp = y / (x * z);
} else {
tmp = (y / x) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -6.8e-125: tmp = y / (x * z) else: tmp = (y / x) / z return tmp
function code(x, y, z) tmp = 0.0 if (y <= -6.8e-125) tmp = Float64(y / Float64(x * z)); else tmp = Float64(Float64(y / x) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -6.8e-125) tmp = y / (x * z); else tmp = (y / x) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -6.8e-125], N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{-125}:\\
\;\;\;\;\frac{y}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\
\end{array}
\end{array}
if y < -6.7999999999999995e-125Initial program 89.7%
*-commutative89.7%
associate-*r/89.8%
Simplified89.8%
Taylor expanded in x around 0 52.5%
if -6.7999999999999995e-125 < y Initial program 82.1%
*-commutative82.1%
associate-*r/82.1%
Simplified82.1%
frac-times81.0%
associate-*r/80.5%
*-commutative80.5%
associate-/r*92.2%
associate-*l/97.6%
Applied egg-rr97.6%
Taylor expanded in x around 0 45.6%
associate-/l/50.4%
Simplified50.4%
Final simplification51.2%
(FPCore (x y z) :precision binary64 (/ y (* x z)))
double code(double x, double y, double z) {
return y / (x * z);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = y / (x * z)
end function
public static double code(double x, double y, double z) {
return y / (x * z);
}
def code(x, y, z): return y / (x * z)
function code(x, y, z) return Float64(y / Float64(x * z)) end
function tmp = code(x, y, z) tmp = y / (x * z); end
code[x_, y_, z_] := N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{y}{x \cdot z}
\end{array}
Initial program 84.9%
*-commutative84.9%
associate-*r/84.9%
Simplified84.9%
Taylor expanded in x around 0 48.1%
Final simplification48.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (/ (/ y z) x) (cosh x))))
(if (< y -4.618902267687042e-52)
t_0
(if (< y 1.038530535935153e-39) (/ (/ (* (cosh x) y) x) z) t_0))))
double code(double x, double y, double z) {
double t_0 = ((y / z) / x) * cosh(x);
double tmp;
if (y < -4.618902267687042e-52) {
tmp = t_0;
} else if (y < 1.038530535935153e-39) {
tmp = ((cosh(x) * y) / x) / z;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((y / z) / x) * cosh(x)
if (y < (-4.618902267687042d-52)) then
tmp = t_0
else if (y < 1.038530535935153d-39) then
tmp = ((cosh(x) * y) / x) / z
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y / z) / x) * Math.cosh(x);
double tmp;
if (y < -4.618902267687042e-52) {
tmp = t_0;
} else if (y < 1.038530535935153e-39) {
tmp = ((Math.cosh(x) * y) / x) / z;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y / z) / x) * math.cosh(x) tmp = 0 if y < -4.618902267687042e-52: tmp = t_0 elif y < 1.038530535935153e-39: tmp = ((math.cosh(x) * y) / x) / z else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y / z) / x) * cosh(x)) tmp = 0.0 if (y < -4.618902267687042e-52) tmp = t_0; elseif (y < 1.038530535935153e-39) tmp = Float64(Float64(Float64(cosh(x) * y) / x) / z); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y / z) / x) * cosh(x); tmp = 0.0; if (y < -4.618902267687042e-52) tmp = t_0; elseif (y < 1.038530535935153e-39) tmp = ((cosh(x) * y) / x) / z; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision] * N[Cosh[x], $MachinePrecision]), $MachinePrecision]}, If[Less[y, -4.618902267687042e-52], t$95$0, If[Less[y, 1.038530535935153e-39], N[(N[(N[(N[Cosh[x], $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision] / z), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{y}{z}}{x} \cdot \cosh x\\
\mathbf{if}\;y < -4.618902267687042 \cdot 10^{-52}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y < 1.038530535935153 \cdot 10^{-39}:\\
\;\;\;\;\frac{\frac{\cosh x \cdot y}{x}}{z}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
herbie shell --seed 2023174
(FPCore (x y z)
:name "Linear.Quaternion:$ctan from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< y -4.618902267687042e-52) (* (/ (/ y z) x) (cosh x)) (if (< y 1.038530535935153e-39) (/ (/ (* (cosh x) y) x) z) (* (/ (/ y z) x) (cosh x))))
(/ (* (cosh x) (/ y x)) z))