Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\frac{\cosh x \cdot \frac{y}{x}}{z}
\]
↓
\[\begin{array}{l}
t_0 := \frac{\cosh x \cdot \frac{y}{x}}{z}\\
\mathbf{if}\;t_0 \leq -4 \cdot 10^{-68} \lor \neg \left(t_0 \leq 2 \cdot 10^{-27}\right):\\
\;\;\;\;\cosh x \cdot \frac{\frac{y}{z}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{x} + 0.5 \cdot \left(x \cdot y\right)}{z}\\
\end{array}
\]
(FPCore (x y z) :precision binary64 (/ (* (cosh x) (/ y x)) z)) ↓
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (* (cosh x) (/ y x)) z)))
(if (or (<= t_0 -4e-68) (not (<= t_0 2e-27)))
(* (cosh x) (/ (/ y z) x))
(/ (+ (/ y x) (* 0.5 (* x y))) z)))) double code(double x, double y, double z) {
return (cosh(x) * (y / x)) / z;
}
↓
double code(double x, double y, double z) {
double t_0 = (cosh(x) * (y / x)) / z;
double tmp;
if ((t_0 <= -4e-68) || !(t_0 <= 2e-27)) {
tmp = cosh(x) * ((y / z) / x);
} else {
tmp = ((y / x) + (0.5 * (x * y))) / 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
code = (cosh(x) * (y / x)) / z
end function
↓
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 = (cosh(x) * (y / x)) / z
if ((t_0 <= (-4d-68)) .or. (.not. (t_0 <= 2d-27))) then
tmp = cosh(x) * ((y / z) / x)
else
tmp = ((y / x) + (0.5d0 * (x * y))) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
return (Math.cosh(x) * (y / x)) / z;
}
↓
public static double code(double x, double y, double z) {
double t_0 = (Math.cosh(x) * (y / x)) / z;
double tmp;
if ((t_0 <= -4e-68) || !(t_0 <= 2e-27)) {
tmp = Math.cosh(x) * ((y / z) / x);
} else {
tmp = ((y / x) + (0.5 * (x * y))) / z;
}
return tmp;
}
def code(x, y, z):
return (math.cosh(x) * (y / x)) / z
↓
def code(x, y, z):
t_0 = (math.cosh(x) * (y / x)) / z
tmp = 0
if (t_0 <= -4e-68) or not (t_0 <= 2e-27):
tmp = math.cosh(x) * ((y / z) / x)
else:
tmp = ((y / x) + (0.5 * (x * y))) / z
return tmp
function code(x, y, z)
return Float64(Float64(cosh(x) * Float64(y / x)) / z)
end
↓
function code(x, y, z)
t_0 = Float64(Float64(cosh(x) * Float64(y / x)) / z)
tmp = 0.0
if ((t_0 <= -4e-68) || !(t_0 <= 2e-27))
tmp = Float64(cosh(x) * Float64(Float64(y / z) / x));
else
tmp = Float64(Float64(Float64(y / x) + Float64(0.5 * Float64(x * y))) / z);
end
return tmp
end
function tmp = code(x, y, z)
tmp = (cosh(x) * (y / x)) / z;
end
↓
function tmp_2 = code(x, y, z)
t_0 = (cosh(x) * (y / x)) / z;
tmp = 0.0;
if ((t_0 <= -4e-68) || ~((t_0 <= 2e-27)))
tmp = cosh(x) * ((y / z) / x);
else
tmp = ((y / x) + (0.5 * (x * y))) / z;
end
tmp_2 = tmp;
end
code[x_, y_, z_] := N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
↓
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -4e-68], N[Not[LessEqual[t$95$0, 2e-27]], $MachinePrecision]], N[(N[Cosh[x], $MachinePrecision] * N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / x), $MachinePrecision] + N[(0.5 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
\frac{\cosh x \cdot \frac{y}{x}}{z}
↓
\begin{array}{l}
t_0 := \frac{\cosh x \cdot \frac{y}{x}}{z}\\
\mathbf{if}\;t_0 \leq -4 \cdot 10^{-68} \lor \neg \left(t_0 \leq 2 \cdot 10^{-27}\right):\\
\;\;\;\;\cosh x \cdot \frac{\frac{y}{z}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{x} + 0.5 \cdot \left(x \cdot y\right)}{z}\\
\end{array}