
(FPCore (x y z) :precision binary64 (/ (* x (/ (sin y) y)) z))
double code(double x, double y, double z) {
return (x * (sin(y) / y)) / z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (sin(y) / y)) / z
end function
public static double code(double x, double y, double z) {
return (x * (Math.sin(y) / y)) / z;
}
def code(x, y, z): return (x * (math.sin(y) / y)) / z
function code(x, y, z) return Float64(Float64(x * Float64(sin(y) / y)) / z) end
function tmp = code(x, y, z) tmp = (x * (sin(y) / y)) / z; end
code[x_, y_, z_] := N[(N[(x * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \frac{\sin y}{y}}{z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (* x (/ (sin y) y)) z))
double code(double x, double y, double z) {
return (x * (sin(y) / y)) / z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (sin(y) / y)) / z
end function
public static double code(double x, double y, double z) {
return (x * (Math.sin(y) / y)) / z;
}
def code(x, y, z): return (x * (math.sin(y) / y)) / z
function code(x, y, z) return Float64(Float64(x * Float64(sin(y) / y)) / z) end
function tmp = code(x, y, z) tmp = (x * (sin(y) / y)) / z; end
code[x_, y_, z_] := N[(N[(x * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \frac{\sin y}{y}}{z}
\end{array}
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= z_m 3.4e-40)
(/ x (* z_m (/ y (sin y))))
(/ (* x (/ (sin y) y)) z_m))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (z_m <= 3.4e-40) {
tmp = x / (z_m * (y / sin(y)));
} else {
tmp = (x * (sin(y) / y)) / z_m;
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (z_m <= 3.4d-40) then
tmp = x / (z_m * (y / sin(y)))
else
tmp = (x * (sin(y) / y)) / z_m
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (z_m <= 3.4e-40) {
tmp = x / (z_m * (y / Math.sin(y)));
} else {
tmp = (x * (Math.sin(y) / y)) / z_m;
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if z_m <= 3.4e-40: tmp = x / (z_m * (y / math.sin(y))) else: tmp = (x * (math.sin(y) / y)) / z_m return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (z_m <= 3.4e-40) tmp = Float64(x / Float64(z_m * Float64(y / sin(y)))); else tmp = Float64(Float64(x * Float64(sin(y) / y)) / z_m); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (z_m <= 3.4e-40) tmp = x / (z_m * (y / sin(y))); else tmp = (x * (sin(y) / y)) / z_m; end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[z$95$m, 3.4e-40], N[(x / N[(z$95$m * N[(y / N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 3.4 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{z\_m \cdot \frac{y}{\sin y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{\sin y}{y}}{z\_m}\\
\end{array}
\end{array}
if z < 3.39999999999999984e-40Initial program 95.1%
associate-/l*95.5%
associate-/l/86.8%
*-commutative86.8%
Simplified86.8%
clear-num86.8%
un-div-inv87.0%
associate-/l*89.0%
Applied egg-rr89.0%
Taylor expanded in y around inf 87.0%
associate-/l*89.0%
Applied egg-rr89.0%
*-commutative89.0%
associate-*l/87.0%
associate-*r/95.8%
Simplified95.8%
if 3.39999999999999984e-40 < z Initial program 99.9%
Final simplification97.1%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= y 5.8e-12)
(/ x z_m)
(if (or (<= y 1.6e+232) (not (<= y 1.65e+257)))
(* (sin y) (/ (/ x y) z_m))
(* x (/ (sin y) (* z_m y)))))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 5.8e-12) {
tmp = x / z_m;
} else if ((y <= 1.6e+232) || !(y <= 1.65e+257)) {
tmp = sin(y) * ((x / y) / z_m);
} else {
tmp = x * (sin(y) / (z_m * y));
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (y <= 5.8d-12) then
tmp = x / z_m
else if ((y <= 1.6d+232) .or. (.not. (y <= 1.65d+257))) then
tmp = sin(y) * ((x / y) / z_m)
else
tmp = x * (sin(y) / (z_m * y))
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 5.8e-12) {
tmp = x / z_m;
} else if ((y <= 1.6e+232) || !(y <= 1.65e+257)) {
tmp = Math.sin(y) * ((x / y) / z_m);
} else {
tmp = x * (Math.sin(y) / (z_m * y));
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if y <= 5.8e-12: tmp = x / z_m elif (y <= 1.6e+232) or not (y <= 1.65e+257): tmp = math.sin(y) * ((x / y) / z_m) else: tmp = x * (math.sin(y) / (z_m * y)) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (y <= 5.8e-12) tmp = Float64(x / z_m); elseif ((y <= 1.6e+232) || !(y <= 1.65e+257)) tmp = Float64(sin(y) * Float64(Float64(x / y) / z_m)); else tmp = Float64(x * Float64(sin(y) / Float64(z_m * y))); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (y <= 5.8e-12) tmp = x / z_m; elseif ((y <= 1.6e+232) || ~((y <= 1.65e+257))) tmp = sin(y) * ((x / y) / z_m); else tmp = x * (sin(y) / (z_m * y)); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[y, 5.8e-12], N[(x / z$95$m), $MachinePrecision], If[Or[LessEqual[y, 1.6e+232], N[Not[LessEqual[y, 1.65e+257]], $MachinePrecision]], N[(N[Sin[y], $MachinePrecision] * N[(N[(x / y), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Sin[y], $MachinePrecision] / N[(z$95$m * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq 5.8 \cdot 10^{-12}:\\
\;\;\;\;\frac{x}{z\_m}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+232} \lor \neg \left(y \leq 1.65 \cdot 10^{+257}\right):\\
\;\;\;\;\sin y \cdot \frac{\frac{x}{y}}{z\_m}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\sin y}{z\_m \cdot y}\\
\end{array}
\end{array}
if y < 5.8000000000000003e-12Initial program 97.7%
associate-/l*97.2%
associate-/l/87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y around 0 74.3%
if 5.8000000000000003e-12 < y < 1.6000000000000001e232 or 1.6500000000000001e257 < y Initial program 96.3%
*-commutative96.3%
associate-*l/96.4%
associate-/l*96.3%
associate-/l*96.3%
Simplified96.3%
if 1.6000000000000001e232 < y < 1.6500000000000001e257Initial program 73.0%
associate-/l*99.1%
associate-/l/99.6%
*-commutative99.6%
Simplified99.6%
Final simplification81.6%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= y 2.3e-8)
(/ x z_m)
(if (<= y 2.4e+233)
(* (/ x y) (/ (sin y) z_m))
(if (<= y 3.7e+255)
(* x (/ (sin y) (* z_m y)))
(* (sin y) (/ (/ x y) z_m)))))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 2.3e-8) {
tmp = x / z_m;
} else if (y <= 2.4e+233) {
tmp = (x / y) * (sin(y) / z_m);
} else if (y <= 3.7e+255) {
tmp = x * (sin(y) / (z_m * y));
} else {
tmp = sin(y) * ((x / y) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (y <= 2.3d-8) then
tmp = x / z_m
else if (y <= 2.4d+233) then
tmp = (x / y) * (sin(y) / z_m)
else if (y <= 3.7d+255) then
tmp = x * (sin(y) / (z_m * y))
else
tmp = sin(y) * ((x / y) / z_m)
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 2.3e-8) {
tmp = x / z_m;
} else if (y <= 2.4e+233) {
tmp = (x / y) * (Math.sin(y) / z_m);
} else if (y <= 3.7e+255) {
tmp = x * (Math.sin(y) / (z_m * y));
} else {
tmp = Math.sin(y) * ((x / y) / z_m);
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if y <= 2.3e-8: tmp = x / z_m elif y <= 2.4e+233: tmp = (x / y) * (math.sin(y) / z_m) elif y <= 3.7e+255: tmp = x * (math.sin(y) / (z_m * y)) else: tmp = math.sin(y) * ((x / y) / z_m) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (y <= 2.3e-8) tmp = Float64(x / z_m); elseif (y <= 2.4e+233) tmp = Float64(Float64(x / y) * Float64(sin(y) / z_m)); elseif (y <= 3.7e+255) tmp = Float64(x * Float64(sin(y) / Float64(z_m * y))); else tmp = Float64(sin(y) * Float64(Float64(x / y) / z_m)); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (y <= 2.3e-8) tmp = x / z_m; elseif (y <= 2.4e+233) tmp = (x / y) * (sin(y) / z_m); elseif (y <= 3.7e+255) tmp = x * (sin(y) / (z_m * y)); else tmp = sin(y) * ((x / y) / z_m); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[y, 2.3e-8], N[(x / z$95$m), $MachinePrecision], If[LessEqual[y, 2.4e+233], N[(N[(x / y), $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+255], N[(x * N[(N[Sin[y], $MachinePrecision] / N[(z$95$m * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[y], $MachinePrecision] * N[(N[(x / y), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq 2.3 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{z\_m}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+233}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{\sin y}{z\_m}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+255}:\\
\;\;\;\;x \cdot \frac{\sin y}{z\_m \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\sin y \cdot \frac{\frac{x}{y}}{z\_m}\\
\end{array}
\end{array}
if y < 2.3000000000000001e-8Initial program 97.8%
associate-/l*97.2%
associate-/l/87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y around 0 74.5%
if 2.3000000000000001e-8 < y < 2.40000000000000003e233Initial program 95.7%
associate-*r/95.7%
associate-/r*87.5%
times-frac95.7%
Applied egg-rr95.7%
if 2.40000000000000003e233 < y < 3.69999999999999989e255Initial program 73.0%
associate-/l*99.1%
associate-/l/99.6%
*-commutative99.6%
Simplified99.6%
if 3.69999999999999989e255 < y Initial program 99.6%
*-commutative99.6%
associate-*l/99.7%
associate-/l*99.9%
associate-/l*99.7%
Simplified99.7%
Final simplification81.6%
z\_m = (fabs.f64 z) z\_s = (copysign.f64 1 z) (FPCore (z_s x y z_m) :precision binary64 (* z_s (if (<= y 1.75e-10) (/ x z_m) (* x (/ (sin y) (* z_m y))))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 1.75e-10) {
tmp = x / z_m;
} else {
tmp = x * (sin(y) / (z_m * y));
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (y <= 1.75d-10) then
tmp = x / z_m
else
tmp = x * (sin(y) / (z_m * y))
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 1.75e-10) {
tmp = x / z_m;
} else {
tmp = x * (Math.sin(y) / (z_m * y));
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if y <= 1.75e-10: tmp = x / z_m else: tmp = x * (math.sin(y) / (z_m * y)) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (y <= 1.75e-10) tmp = Float64(x / z_m); else tmp = Float64(x * Float64(sin(y) / Float64(z_m * y))); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (y <= 1.75e-10) tmp = x / z_m; else tmp = x * (sin(y) / (z_m * y)); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[y, 1.75e-10], N[(x / z$95$m), $MachinePrecision], N[(x * N[(N[Sin[y], $MachinePrecision] / N[(z$95$m * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq 1.75 \cdot 10^{-10}:\\
\;\;\;\;\frac{x}{z\_m}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\sin y}{z\_m \cdot y}\\
\end{array}
\end{array}
if y < 1.7499999999999999e-10Initial program 97.7%
associate-/l*97.2%
associate-/l/87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y around 0 74.3%
if 1.7499999999999999e-10 < y Initial program 94.4%
associate-/l*89.3%
associate-/l/89.2%
*-commutative89.2%
Simplified89.2%
Final simplification79.2%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= z_m 2.1e+212)
(/ x (* z_m (/ y (sin y))))
(* (sin y) (/ (/ x y) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (z_m <= 2.1e+212) {
tmp = x / (z_m * (y / sin(y)));
} else {
tmp = sin(y) * ((x / y) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (z_m <= 2.1d+212) then
tmp = x / (z_m * (y / sin(y)))
else
tmp = sin(y) * ((x / y) / z_m)
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (z_m <= 2.1e+212) {
tmp = x / (z_m * (y / Math.sin(y)));
} else {
tmp = Math.sin(y) * ((x / y) / z_m);
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if z_m <= 2.1e+212: tmp = x / (z_m * (y / math.sin(y))) else: tmp = math.sin(y) * ((x / y) / z_m) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (z_m <= 2.1e+212) tmp = Float64(x / Float64(z_m * Float64(y / sin(y)))); else tmp = Float64(sin(y) * Float64(Float64(x / y) / z_m)); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (z_m <= 2.1e+212) tmp = x / (z_m * (y / sin(y))); else tmp = sin(y) * ((x / y) / z_m); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[z$95$m, 2.1e+212], N[(x / N[(z$95$m * N[(y / N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[y], $MachinePrecision] * N[(N[(x / y), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 2.1 \cdot 10^{+212}:\\
\;\;\;\;\frac{x}{z\_m \cdot \frac{y}{\sin y}}\\
\mathbf{else}:\\
\;\;\;\;\sin y \cdot \frac{\frac{x}{y}}{z\_m}\\
\end{array}
\end{array}
if z < 2.1e212Initial program 96.4%
associate-/l*95.7%
associate-/l/88.5%
*-commutative88.5%
Simplified88.5%
clear-num88.4%
un-div-inv88.6%
associate-/l*88.5%
Applied egg-rr88.5%
Taylor expanded in y around inf 88.6%
associate-/l*88.5%
Applied egg-rr88.5%
*-commutative88.5%
associate-*l/88.6%
associate-*r/95.6%
Simplified95.6%
if 2.1e212 < z Initial program 99.9%
*-commutative99.9%
associate-*l/95.7%
associate-/l*95.1%
associate-/l*95.1%
Simplified95.1%
Final simplification95.5%
z\_m = (fabs.f64 z) z\_s = (copysign.f64 1 z) (FPCore (z_s x y z_m) :precision binary64 (* z_s (if (<= y 5.6e+144) (/ x z_m) (* (/ x y) (/ y z_m)))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 5.6e+144) {
tmp = x / z_m;
} else {
tmp = (x / y) * (y / z_m);
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (y <= 5.6d+144) then
tmp = x / z_m
else
tmp = (x / y) * (y / z_m)
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 5.6e+144) {
tmp = x / z_m;
} else {
tmp = (x / y) * (y / z_m);
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if y <= 5.6e+144: tmp = x / z_m else: tmp = (x / y) * (y / z_m) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (y <= 5.6e+144) tmp = Float64(x / z_m); else tmp = Float64(Float64(x / y) * Float64(y / z_m)); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (y <= 5.6e+144) tmp = x / z_m; else tmp = (x / y) * (y / z_m); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[y, 5.6e+144], N[(x / z$95$m), $MachinePrecision], N[(N[(x / y), $MachinePrecision] * N[(y / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq 5.6 \cdot 10^{+144}:\\
\;\;\;\;\frac{x}{z\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{y}{z\_m}\\
\end{array}
\end{array}
if y < 5.60000000000000013e144Initial program 97.3%
associate-/l*96.7%
associate-/l/88.7%
*-commutative88.7%
Simplified88.7%
Taylor expanded in y around 0 65.1%
if 5.60000000000000013e144 < y Initial program 93.5%
associate-*r/93.6%
associate-/r*84.5%
times-frac93.5%
Applied egg-rr93.5%
Taylor expanded in y around 0 31.5%
Final simplification59.2%
z\_m = (fabs.f64 z) z\_s = (copysign.f64 1 z) (FPCore (z_s x y z_m) :precision binary64 (* z_s (if (<= y 1.12e+55) (/ x z_m) (* y (/ (/ x y) z_m)))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 1.12e+55) {
tmp = x / z_m;
} else {
tmp = y * ((x / y) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (y <= 1.12d+55) then
tmp = x / z_m
else
tmp = y * ((x / y) / z_m)
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 1.12e+55) {
tmp = x / z_m;
} else {
tmp = y * ((x / y) / z_m);
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if y <= 1.12e+55: tmp = x / z_m else: tmp = y * ((x / y) / z_m) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (y <= 1.12e+55) tmp = Float64(x / z_m); else tmp = Float64(y * Float64(Float64(x / y) / z_m)); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (y <= 1.12e+55) tmp = x / z_m; else tmp = y * ((x / y) / z_m); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[y, 1.12e+55], N[(x / z$95$m), $MachinePrecision], N[(y * N[(N[(x / y), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq 1.12 \cdot 10^{+55}:\\
\;\;\;\;\frac{x}{z\_m}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{\frac{x}{y}}{z\_m}\\
\end{array}
\end{array}
if y < 1.12000000000000006e55Initial program 97.9%
associate-/l*97.4%
associate-/l/88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in y around 0 71.2%
if 1.12000000000000006e55 < y Initial program 93.3%
associate-*r/93.4%
associate-/r*87.2%
times-frac93.4%
Applied egg-rr93.4%
Taylor expanded in y around 0 27.3%
clear-num27.3%
frac-times40.7%
*-un-lft-identity40.7%
Applied egg-rr40.7%
clear-num40.7%
associate-/r/40.7%
associate-/r*39.6%
clear-num39.6%
Applied egg-rr39.6%
Final simplification62.6%
z\_m = (fabs.f64 z) z\_s = (copysign.f64 1 z) (FPCore (z_s x y z_m) :precision binary64 (* z_s (if (<= y 200000.0) (/ x z_m) (/ y (* y (/ z_m x))))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 200000.0) {
tmp = x / z_m;
} else {
tmp = y / (y * (z_m / x));
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (y <= 200000.0d0) then
tmp = x / z_m
else
tmp = y / (y * (z_m / x))
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 200000.0) {
tmp = x / z_m;
} else {
tmp = y / (y * (z_m / x));
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if y <= 200000.0: tmp = x / z_m else: tmp = y / (y * (z_m / x)) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (y <= 200000.0) tmp = Float64(x / z_m); else tmp = Float64(y / Float64(y * Float64(z_m / x))); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (y <= 200000.0) tmp = x / z_m; else tmp = y / (y * (z_m / x)); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[y, 200000.0], N[(x / z$95$m), $MachinePrecision], N[(y / N[(y * N[(z$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq 200000:\\
\;\;\;\;\frac{x}{z\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y \cdot \frac{z\_m}{x}}\\
\end{array}
\end{array}
if y < 2e5Initial program 97.8%
associate-/l*97.2%
associate-/l/87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in y around 0 73.9%
if 2e5 < y Initial program 94.1%
associate-*r/94.2%
associate-/r*88.8%
times-frac94.2%
Applied egg-rr94.2%
Taylor expanded in y around 0 26.9%
clear-num26.9%
frac-times38.6%
*-un-lft-identity38.6%
Applied egg-rr38.6%
Taylor expanded in y around 0 38.6%
associate-*r/38.5%
Simplified38.5%
Final simplification62.8%
z\_m = (fabs.f64 z) z\_s = (copysign.f64 1 z) (FPCore (z_s x y z_m) :precision binary64 (* z_s (if (<= y 1.75e-10) (/ x z_m) (/ y (* z_m (/ y x))))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 1.75e-10) {
tmp = x / z_m;
} else {
tmp = y / (z_m * (y / x));
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (y <= 1.75d-10) then
tmp = x / z_m
else
tmp = y / (z_m * (y / x))
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 1.75e-10) {
tmp = x / z_m;
} else {
tmp = y / (z_m * (y / x));
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if y <= 1.75e-10: tmp = x / z_m else: tmp = y / (z_m * (y / x)) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (y <= 1.75e-10) tmp = Float64(x / z_m); else tmp = Float64(y / Float64(z_m * Float64(y / x))); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (y <= 1.75e-10) tmp = x / z_m; else tmp = y / (z_m * (y / x)); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[y, 1.75e-10], N[(x / z$95$m), $MachinePrecision], N[(y / N[(z$95$m * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq 1.75 \cdot 10^{-10}:\\
\;\;\;\;\frac{x}{z\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z\_m \cdot \frac{y}{x}}\\
\end{array}
\end{array}
if y < 1.7499999999999999e-10Initial program 97.7%
associate-/l*97.2%
associate-/l/87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y around 0 74.3%
if 1.7499999999999999e-10 < y Initial program 94.4%
associate-*r/94.4%
associate-/r*89.3%
times-frac94.4%
Applied egg-rr94.4%
Taylor expanded in y around 0 28.3%
clear-num28.3%
frac-times39.5%
*-un-lft-identity39.5%
Applied egg-rr39.5%
Final simplification62.9%
z\_m = (fabs.f64 z) z\_s = (copysign.f64 1 z) (FPCore (z_s x y z_m) :precision binary64 (* z_s (if (<= y 5.8e-12) (/ x z_m) (/ y (/ z_m (/ x y))))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 5.8e-12) {
tmp = x / z_m;
} else {
tmp = y / (z_m / (x / y));
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (y <= 5.8d-12) then
tmp = x / z_m
else
tmp = y / (z_m / (x / y))
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (y <= 5.8e-12) {
tmp = x / z_m;
} else {
tmp = y / (z_m / (x / y));
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if y <= 5.8e-12: tmp = x / z_m else: tmp = y / (z_m / (x / y)) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (y <= 5.8e-12) tmp = Float64(x / z_m); else tmp = Float64(y / Float64(z_m / Float64(x / y))); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (y <= 5.8e-12) tmp = x / z_m; else tmp = y / (z_m / (x / y)); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[y, 5.8e-12], N[(x / z$95$m), $MachinePrecision], N[(y / N[(z$95$m / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq 5.8 \cdot 10^{-12}:\\
\;\;\;\;\frac{x}{z\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{z\_m}{\frac{x}{y}}}\\
\end{array}
\end{array}
if y < 5.8000000000000003e-12Initial program 97.7%
associate-/l*97.2%
associate-/l/87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y around 0 74.3%
if 5.8000000000000003e-12 < y Initial program 94.4%
associate-*r/94.4%
associate-/r*89.3%
times-frac94.4%
Applied egg-rr94.4%
Taylor expanded in y around 0 28.3%
clear-num28.3%
frac-times39.5%
*-un-lft-identity39.5%
Applied egg-rr39.5%
*-commutative39.5%
clear-num39.5%
un-div-inv39.5%
Applied egg-rr39.5%
Final simplification62.9%
z\_m = (fabs.f64 z) z\_s = (copysign.f64 1 z) (FPCore (z_s x y z_m) :precision binary64 (* z_s (/ 1.0 (/ z_m x))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
return z_s * (1.0 / (z_m / x));
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
code = z_s * (1.0d0 / (z_m / x))
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
return z_s * (1.0 / (z_m / x));
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): return z_s * (1.0 / (z_m / x))
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) return Float64(z_s * Float64(1.0 / Float64(z_m / x))) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp = code(z_s, x, y, z_m) tmp = z_s * (1.0 / (z_m / x)); end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * N[(1.0 / N[(z$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \frac{1}{\frac{z\_m}{x}}
\end{array}
Initial program 96.6%
associate-/l*94.6%
associate-/l/87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in y around 0 56.9%
un-div-inv57.0%
clear-num57.1%
Applied egg-rr57.1%
Final simplification57.1%
z\_m = (fabs.f64 z) z\_s = (copysign.f64 1 z) (FPCore (z_s x y z_m) :precision binary64 (* z_s (/ x z_m)))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
return z_s * (x / z_m);
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
code = z_s * (x / z_m)
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
return z_s * (x / z_m);
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): return z_s * (x / z_m)
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) return Float64(z_s * Float64(x / z_m)) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp = code(z_s, x, y, z_m) tmp = z_s * (x / z_m); end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * N[(x / z$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \frac{x}{z\_m}
\end{array}
Initial program 96.6%
associate-/l*94.6%
associate-/l/87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in y around 0 57.0%
Final simplification57.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ y (sin y))) (t_1 (/ (* x (/ 1.0 t_0)) z)))
(if (< z -4.2173720203427147e-29)
t_1
(if (< z 4.446702369113811e+64) (/ x (* z t_0)) t_1))))
double code(double x, double y, double z) {
double t_0 = y / sin(y);
double t_1 = (x * (1.0 / t_0)) / z;
double tmp;
if (z < -4.2173720203427147e-29) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x / (z * t_0);
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_0 = y / sin(y)
t_1 = (x * (1.0d0 / t_0)) / z
if (z < (-4.2173720203427147d-29)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x / (z * t_0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y / Math.sin(y);
double t_1 = (x * (1.0 / t_0)) / z;
double tmp;
if (z < -4.2173720203427147e-29) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x / (z * t_0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = y / math.sin(y) t_1 = (x * (1.0 / t_0)) / z tmp = 0 if z < -4.2173720203427147e-29: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x / (z * t_0) else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(y / sin(y)) t_1 = Float64(Float64(x * Float64(1.0 / t_0)) / z) tmp = 0.0 if (z < -4.2173720203427147e-29) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x / Float64(z * t_0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y / sin(y); t_1 = (x * (1.0 / t_0)) / z; tmp = 0.0; if (z < -4.2173720203427147e-29) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x / (z * t_0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y / N[Sin[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[Less[z, -4.2173720203427147e-29], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x / N[(z * t$95$0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{\sin y}\\
t_1 := \frac{x \cdot \frac{1}{t\_0}}{z}\\
\mathbf{if}\;z < -4.2173720203427147 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;\frac{x}{z \cdot t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024080
(FPCore (x y z)
:name "Linear.Quaternion:$ctanh from linear-1.19.1.3"
:precision binary64
:alt
(if (< z -4.2173720203427147e-29) (/ (* x (/ 1.0 (/ y (sin y)))) z) (if (< z 4.446702369113811e+64) (/ x (* z (/ y (sin y)))) (/ (* x (/ 1.0 (/ y (sin y)))) z)))
(/ (* x (/ (sin y) y)) z))