
(FPCore (x y z t) :precision binary64 (/ (* x 2.0) (- (* y z) (* t z))))
double code(double x, double y, double z, double t) {
return (x * 2.0) / ((y * z) - (t * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * 2.0d0) / ((y * z) - (t * z))
end function
public static double code(double x, double y, double z, double t) {
return (x * 2.0) / ((y * z) - (t * z));
}
def code(x, y, z, t): return (x * 2.0) / ((y * z) - (t * z))
function code(x, y, z, t) return Float64(Float64(x * 2.0) / Float64(Float64(y * z) - Float64(t * z))) end
function tmp = code(x, y, z, t) tmp = (x * 2.0) / ((y * z) - (t * z)); end
code[x_, y_, z_, t_] := N[(N[(x * 2.0), $MachinePrecision] / N[(N[(y * z), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot 2}{y \cdot z - t \cdot z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (* x 2.0) (- (* y z) (* t z))))
double code(double x, double y, double z, double t) {
return (x * 2.0) / ((y * z) - (t * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * 2.0d0) / ((y * z) - (t * z))
end function
public static double code(double x, double y, double z, double t) {
return (x * 2.0) / ((y * z) - (t * z));
}
def code(x, y, z, t): return (x * 2.0) / ((y * z) - (t * z))
function code(x, y, z, t) return Float64(Float64(x * 2.0) / Float64(Float64(y * z) - Float64(t * z))) end
function tmp = code(x, y, z, t) tmp = (x * 2.0) / ((y * z) - (t * z)); end
code[x_, y_, z_, t_] := N[(N[(x * 2.0), $MachinePrecision] / N[(N[(y * z), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot 2}{y \cdot z - t \cdot z}
\end{array}
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= (* x_m 2.0) 5e-88)
(/ (* x_m -2.0) (* z (- t y)))
(/ (/ (* x_m -2.0) (- t y)) z))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((x_m * 2.0) <= 5e-88) {
tmp = (x_m * -2.0) / (z * (t - y));
} else {
tmp = ((x_m * -2.0) / (t - y)) / z;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x_m * 2.0d0) <= 5d-88) then
tmp = (x_m * (-2.0d0)) / (z * (t - y))
else
tmp = ((x_m * (-2.0d0)) / (t - y)) / z
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((x_m * 2.0) <= 5e-88) {
tmp = (x_m * -2.0) / (z * (t - y));
} else {
tmp = ((x_m * -2.0) / (t - y)) / z;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (x_m * 2.0) <= 5e-88: tmp = (x_m * -2.0) / (z * (t - y)) else: tmp = ((x_m * -2.0) / (t - y)) / z return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (Float64(x_m * 2.0) <= 5e-88) tmp = Float64(Float64(x_m * -2.0) / Float64(z * Float64(t - y))); else tmp = Float64(Float64(Float64(x_m * -2.0) / Float64(t - y)) / z); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((x_m * 2.0) <= 5e-88) tmp = (x_m * -2.0) / (z * (t - y)); else tmp = ((x_m * -2.0) / (t - y)) / z; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[N[(x$95$m * 2.0), $MachinePrecision], 5e-88], N[(N[(x$95$m * -2.0), $MachinePrecision] / N[(z * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$95$m * -2.0), $MachinePrecision] / N[(t - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \cdot 2 \leq 5 \cdot 10^{-88}:\\
\;\;\;\;\frac{x\_m \cdot -2}{z \cdot \left(t - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m \cdot -2}{t - y}}{z}\\
\end{array}
\end{array}
if (*.f64 x #s(literal 2 binary64)) < 5.00000000000000009e-88Initial program 88.6%
remove-double-neg88.6%
distribute-rgt-out--89.8%
distribute-lft-neg-in89.8%
distribute-rgt-out--88.6%
remove-double-neg88.6%
distribute-lft-neg-out88.6%
distribute-rgt-neg-in88.6%
neg-mul-188.6%
times-frac88.5%
associate-*r/88.6%
distribute-frac-neg88.6%
distribute-neg-frac288.6%
metadata-eval88.6%
/-rgt-identity88.6%
metadata-eval88.6%
distribute-rgt-neg-out88.6%
distribute-lft-neg-out88.6%
*-commutative88.6%
cancel-sign-sub88.6%
*-commutative88.6%
Simplified89.8%
if 5.00000000000000009e-88 < (*.f64 x #s(literal 2 binary64)) Initial program 90.1%
remove-double-neg90.1%
distribute-rgt-out--91.5%
distribute-lft-neg-in91.5%
distribute-rgt-out--87.1%
remove-double-neg87.1%
distribute-lft-neg-out87.1%
distribute-rgt-neg-in87.1%
neg-mul-187.1%
times-frac86.5%
associate-*r/87.1%
distribute-frac-neg87.1%
distribute-neg-frac287.1%
metadata-eval87.1%
/-rgt-identity87.1%
metadata-eval87.1%
distribute-rgt-neg-out87.1%
distribute-lft-neg-out87.1%
*-commutative87.1%
cancel-sign-sub87.1%
*-commutative87.1%
Simplified91.5%
*-commutative91.5%
associate-/r*98.6%
Applied egg-rr98.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (/ (/ (* x_m -2.0) z) t)))
(*
x_s
(if (<= y -1.25e+101)
(* 2.0 (/ (/ x_m z) y))
(if (<= y -1.1e+52)
t_1
(if (<= y -1.05e-31)
(/ 2.0 (* y (/ z x_m)))
(if (<= y 4.2e-55)
(/ (/ (* x_m -2.0) t) z)
(if (<= y 4.0)
(/ 2.0 (* z (/ y x_m)))
(if (<= y 1e+79) t_1 (* (/ 2.0 z) (/ x_m y)))))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = ((x_m * -2.0) / z) / t;
double tmp;
if (y <= -1.25e+101) {
tmp = 2.0 * ((x_m / z) / y);
} else if (y <= -1.1e+52) {
tmp = t_1;
} else if (y <= -1.05e-31) {
tmp = 2.0 / (y * (z / x_m));
} else if (y <= 4.2e-55) {
tmp = ((x_m * -2.0) / t) / z;
} else if (y <= 4.0) {
tmp = 2.0 / (z * (y / x_m));
} else if (y <= 1e+79) {
tmp = t_1;
} else {
tmp = (2.0 / z) * (x_m / y);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = ((x_m * (-2.0d0)) / z) / t
if (y <= (-1.25d+101)) then
tmp = 2.0d0 * ((x_m / z) / y)
else if (y <= (-1.1d+52)) then
tmp = t_1
else if (y <= (-1.05d-31)) then
tmp = 2.0d0 / (y * (z / x_m))
else if (y <= 4.2d-55) then
tmp = ((x_m * (-2.0d0)) / t) / z
else if (y <= 4.0d0) then
tmp = 2.0d0 / (z * (y / x_m))
else if (y <= 1d+79) then
tmp = t_1
else
tmp = (2.0d0 / z) * (x_m / y)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = ((x_m * -2.0) / z) / t;
double tmp;
if (y <= -1.25e+101) {
tmp = 2.0 * ((x_m / z) / y);
} else if (y <= -1.1e+52) {
tmp = t_1;
} else if (y <= -1.05e-31) {
tmp = 2.0 / (y * (z / x_m));
} else if (y <= 4.2e-55) {
tmp = ((x_m * -2.0) / t) / z;
} else if (y <= 4.0) {
tmp = 2.0 / (z * (y / x_m));
} else if (y <= 1e+79) {
tmp = t_1;
} else {
tmp = (2.0 / z) * (x_m / y);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = ((x_m * -2.0) / z) / t tmp = 0 if y <= -1.25e+101: tmp = 2.0 * ((x_m / z) / y) elif y <= -1.1e+52: tmp = t_1 elif y <= -1.05e-31: tmp = 2.0 / (y * (z / x_m)) elif y <= 4.2e-55: tmp = ((x_m * -2.0) / t) / z elif y <= 4.0: tmp = 2.0 / (z * (y / x_m)) elif y <= 1e+79: tmp = t_1 else: tmp = (2.0 / z) * (x_m / y) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(Float64(x_m * -2.0) / z) / t) tmp = 0.0 if (y <= -1.25e+101) tmp = Float64(2.0 * Float64(Float64(x_m / z) / y)); elseif (y <= -1.1e+52) tmp = t_1; elseif (y <= -1.05e-31) tmp = Float64(2.0 / Float64(y * Float64(z / x_m))); elseif (y <= 4.2e-55) tmp = Float64(Float64(Float64(x_m * -2.0) / t) / z); elseif (y <= 4.0) tmp = Float64(2.0 / Float64(z * Float64(y / x_m))); elseif (y <= 1e+79) tmp = t_1; else tmp = Float64(Float64(2.0 / z) * Float64(x_m / y)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = ((x_m * -2.0) / z) / t; tmp = 0.0; if (y <= -1.25e+101) tmp = 2.0 * ((x_m / z) / y); elseif (y <= -1.1e+52) tmp = t_1; elseif (y <= -1.05e-31) tmp = 2.0 / (y * (z / x_m)); elseif (y <= 4.2e-55) tmp = ((x_m * -2.0) / t) / z; elseif (y <= 4.0) tmp = 2.0 / (z * (y / x_m)); elseif (y <= 1e+79) tmp = t_1; else tmp = (2.0 / z) * (x_m / y); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x$95$m * -2.0), $MachinePrecision] / z), $MachinePrecision] / t), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -1.25e+101], N[(2.0 * N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.1e+52], t$95$1, If[LessEqual[y, -1.05e-31], N[(2.0 / N[(y * N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e-55], N[(N[(N[(x$95$m * -2.0), $MachinePrecision] / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 4.0], N[(2.0 / N[(z * N[(y / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+79], t$95$1, N[(N[(2.0 / z), $MachinePrecision] * N[(x$95$m / y), $MachinePrecision]), $MachinePrecision]]]]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{\frac{x\_m \cdot -2}{z}}{t}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+101}:\\
\;\;\;\;2 \cdot \frac{\frac{x\_m}{z}}{y}\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.05 \cdot 10^{-31}:\\
\;\;\;\;\frac{2}{y \cdot \frac{z}{x\_m}}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-55}:\\
\;\;\;\;\frac{\frac{x\_m \cdot -2}{t}}{z}\\
\mathbf{elif}\;y \leq 4:\\
\;\;\;\;\frac{2}{z \cdot \frac{y}{x\_m}}\\
\mathbf{elif}\;y \leq 10^{+79}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{z} \cdot \frac{x\_m}{y}\\
\end{array}
\end{array}
\end{array}
if y < -1.24999999999999997e101Initial program 80.6%
remove-double-neg80.6%
distribute-rgt-out--82.6%
distribute-lft-neg-in82.6%
distribute-rgt-out--80.6%
remove-double-neg80.6%
distribute-lft-neg-out80.6%
distribute-rgt-neg-in80.6%
neg-mul-180.6%
times-frac80.5%
associate-*r/80.6%
distribute-frac-neg80.6%
distribute-neg-frac280.6%
metadata-eval80.6%
/-rgt-identity80.6%
metadata-eval80.6%
distribute-rgt-neg-out80.6%
distribute-lft-neg-out80.6%
*-commutative80.6%
cancel-sign-sub80.6%
*-commutative80.6%
Simplified82.6%
associate-/r*95.8%
Applied egg-rr95.8%
Taylor expanded in t around 0 76.0%
*-commutative76.0%
associate-/r*87.6%
Simplified87.6%
if -1.24999999999999997e101 < y < -1.1e52 or 4 < y < 9.99999999999999967e78Initial program 84.9%
remove-double-neg84.9%
distribute-rgt-out--88.8%
distribute-lft-neg-in88.8%
distribute-rgt-out--84.9%
remove-double-neg84.9%
distribute-lft-neg-out84.9%
distribute-rgt-neg-in84.9%
neg-mul-184.9%
times-frac84.7%
associate-*r/84.9%
distribute-frac-neg84.9%
distribute-neg-frac284.9%
metadata-eval84.9%
/-rgt-identity84.9%
metadata-eval84.9%
distribute-rgt-neg-out84.9%
distribute-lft-neg-out84.9%
*-commutative84.9%
cancel-sign-sub84.9%
*-commutative84.9%
Simplified88.8%
associate-/r*95.9%
Applied egg-rr95.9%
Taylor expanded in t around inf 70.4%
associate-*r/70.4%
*-commutative70.4%
*-commutative70.4%
times-frac80.9%
associate-*r/81.2%
*-commutative81.2%
associate-*r/81.2%
Simplified81.2%
if -1.1e52 < y < -1.04999999999999996e-31Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-out--99.8%
distribute-lft-neg-in99.8%
distribute-rgt-out--99.8%
remove-double-neg99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
neg-mul-199.8%
times-frac99.7%
associate-*r/99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
metadata-eval99.8%
/-rgt-identity99.8%
metadata-eval99.8%
distribute-rgt-neg-out99.8%
distribute-lft-neg-out99.8%
*-commutative99.8%
cancel-sign-sub99.8%
*-commutative99.8%
Simplified99.8%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 87.7%
*-commutative87.7%
associate-/r*87.8%
Simplified87.8%
*-commutative87.8%
associate-*l/87.8%
associate-*r/87.7%
clear-num87.5%
frac-times87.8%
metadata-eval87.8%
Applied egg-rr87.8%
if -1.04999999999999996e-31 < y < 4.2000000000000003e-55Initial program 94.1%
remove-double-neg94.1%
distribute-rgt-out--95.1%
distribute-lft-neg-in95.1%
distribute-rgt-out--92.4%
remove-double-neg92.4%
distribute-lft-neg-out92.4%
distribute-rgt-neg-in92.4%
neg-mul-192.4%
times-frac91.9%
associate-*r/92.4%
distribute-frac-neg92.4%
distribute-neg-frac292.4%
metadata-eval92.4%
/-rgt-identity92.4%
metadata-eval92.4%
distribute-rgt-neg-out92.4%
distribute-lft-neg-out92.4%
*-commutative92.4%
cancel-sign-sub92.4%
*-commutative92.4%
Simplified95.1%
Taylor expanded in t around inf 80.8%
associate-*r/80.8%
*-commutative80.8%
*-commutative80.8%
associate-/l*80.4%
Simplified80.4%
associate-*r/80.8%
*-commutative80.8%
associate-/r*81.4%
Applied egg-rr81.4%
if 4.2000000000000003e-55 < y < 4Initial program 89.7%
remove-double-neg89.7%
distribute-rgt-out--89.7%
distribute-lft-neg-in89.7%
distribute-rgt-out--78.6%
remove-double-neg78.6%
distribute-lft-neg-out78.6%
distribute-rgt-neg-in78.6%
neg-mul-178.6%
times-frac78.4%
associate-*r/78.6%
distribute-frac-neg78.6%
distribute-neg-frac278.6%
metadata-eval78.6%
/-rgt-identity78.6%
metadata-eval78.6%
distribute-rgt-neg-out78.6%
distribute-lft-neg-out78.6%
*-commutative78.6%
cancel-sign-sub78.6%
*-commutative78.6%
Simplified89.7%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 89.2%
*-commutative89.2%
associate-/r*89.0%
Simplified89.0%
clear-num89.2%
un-div-inv89.2%
associate-/r/89.2%
Applied egg-rr89.2%
if 9.99999999999999967e78 < y Initial program 85.0%
remove-double-neg85.0%
distribute-rgt-out--85.3%
distribute-lft-neg-in85.3%
distribute-rgt-out--85.0%
remove-double-neg85.0%
distribute-lft-neg-out85.0%
distribute-rgt-neg-in85.0%
neg-mul-185.0%
times-frac84.8%
associate-*r/85.0%
distribute-frac-neg85.0%
distribute-neg-frac285.0%
metadata-eval85.0%
/-rgt-identity85.0%
metadata-eval85.0%
distribute-rgt-neg-out85.0%
distribute-lft-neg-out85.0%
*-commutative85.0%
cancel-sign-sub85.0%
*-commutative85.0%
Simplified85.3%
Taylor expanded in t around 0 73.4%
associate-*r/73.4%
*-commutative73.4%
times-frac77.6%
Simplified77.6%
Final simplification82.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (/ (/ (* x_m -2.0) z) t)))
(*
x_s
(if (<= y -1.16e+100)
(* 2.0 (/ (/ x_m z) y))
(if (<= y -2.8e+51)
t_1
(if (<= y -1.35e-33)
(/ 2.0 (* y (/ z x_m)))
(if (<= y 3.7e-55)
(* (/ -2.0 z) (/ x_m t))
(if (<= y 1.75e-6)
(/ 2.0 (* z (/ y x_m)))
(if (<= y 1.1e+81) t_1 (* (/ 2.0 z) (/ x_m y)))))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = ((x_m * -2.0) / z) / t;
double tmp;
if (y <= -1.16e+100) {
tmp = 2.0 * ((x_m / z) / y);
} else if (y <= -2.8e+51) {
tmp = t_1;
} else if (y <= -1.35e-33) {
tmp = 2.0 / (y * (z / x_m));
} else if (y <= 3.7e-55) {
tmp = (-2.0 / z) * (x_m / t);
} else if (y <= 1.75e-6) {
tmp = 2.0 / (z * (y / x_m));
} else if (y <= 1.1e+81) {
tmp = t_1;
} else {
tmp = (2.0 / z) * (x_m / y);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = ((x_m * (-2.0d0)) / z) / t
if (y <= (-1.16d+100)) then
tmp = 2.0d0 * ((x_m / z) / y)
else if (y <= (-2.8d+51)) then
tmp = t_1
else if (y <= (-1.35d-33)) then
tmp = 2.0d0 / (y * (z / x_m))
else if (y <= 3.7d-55) then
tmp = ((-2.0d0) / z) * (x_m / t)
else if (y <= 1.75d-6) then
tmp = 2.0d0 / (z * (y / x_m))
else if (y <= 1.1d+81) then
tmp = t_1
else
tmp = (2.0d0 / z) * (x_m / y)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = ((x_m * -2.0) / z) / t;
double tmp;
if (y <= -1.16e+100) {
tmp = 2.0 * ((x_m / z) / y);
} else if (y <= -2.8e+51) {
tmp = t_1;
} else if (y <= -1.35e-33) {
tmp = 2.0 / (y * (z / x_m));
} else if (y <= 3.7e-55) {
tmp = (-2.0 / z) * (x_m / t);
} else if (y <= 1.75e-6) {
tmp = 2.0 / (z * (y / x_m));
} else if (y <= 1.1e+81) {
tmp = t_1;
} else {
tmp = (2.0 / z) * (x_m / y);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = ((x_m * -2.0) / z) / t tmp = 0 if y <= -1.16e+100: tmp = 2.0 * ((x_m / z) / y) elif y <= -2.8e+51: tmp = t_1 elif y <= -1.35e-33: tmp = 2.0 / (y * (z / x_m)) elif y <= 3.7e-55: tmp = (-2.0 / z) * (x_m / t) elif y <= 1.75e-6: tmp = 2.0 / (z * (y / x_m)) elif y <= 1.1e+81: tmp = t_1 else: tmp = (2.0 / z) * (x_m / y) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(Float64(x_m * -2.0) / z) / t) tmp = 0.0 if (y <= -1.16e+100) tmp = Float64(2.0 * Float64(Float64(x_m / z) / y)); elseif (y <= -2.8e+51) tmp = t_1; elseif (y <= -1.35e-33) tmp = Float64(2.0 / Float64(y * Float64(z / x_m))); elseif (y <= 3.7e-55) tmp = Float64(Float64(-2.0 / z) * Float64(x_m / t)); elseif (y <= 1.75e-6) tmp = Float64(2.0 / Float64(z * Float64(y / x_m))); elseif (y <= 1.1e+81) tmp = t_1; else tmp = Float64(Float64(2.0 / z) * Float64(x_m / y)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = ((x_m * -2.0) / z) / t; tmp = 0.0; if (y <= -1.16e+100) tmp = 2.0 * ((x_m / z) / y); elseif (y <= -2.8e+51) tmp = t_1; elseif (y <= -1.35e-33) tmp = 2.0 / (y * (z / x_m)); elseif (y <= 3.7e-55) tmp = (-2.0 / z) * (x_m / t); elseif (y <= 1.75e-6) tmp = 2.0 / (z * (y / x_m)); elseif (y <= 1.1e+81) tmp = t_1; else tmp = (2.0 / z) * (x_m / y); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x$95$m * -2.0), $MachinePrecision] / z), $MachinePrecision] / t), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -1.16e+100], N[(2.0 * N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.8e+51], t$95$1, If[LessEqual[y, -1.35e-33], N[(2.0 / N[(y * N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e-55], N[(N[(-2.0 / z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-6], N[(2.0 / N[(z * N[(y / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+81], t$95$1, N[(N[(2.0 / z), $MachinePrecision] * N[(x$95$m / y), $MachinePrecision]), $MachinePrecision]]]]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{\frac{x\_m \cdot -2}{z}}{t}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.16 \cdot 10^{+100}:\\
\;\;\;\;2 \cdot \frac{\frac{x\_m}{z}}{y}\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-33}:\\
\;\;\;\;\frac{2}{y \cdot \frac{z}{x\_m}}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-55}:\\
\;\;\;\;\frac{-2}{z} \cdot \frac{x\_m}{t}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-6}:\\
\;\;\;\;\frac{2}{z \cdot \frac{y}{x\_m}}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{z} \cdot \frac{x\_m}{y}\\
\end{array}
\end{array}
\end{array}
if y < -1.1600000000000001e100Initial program 80.6%
remove-double-neg80.6%
distribute-rgt-out--82.6%
distribute-lft-neg-in82.6%
distribute-rgt-out--80.6%
remove-double-neg80.6%
distribute-lft-neg-out80.6%
distribute-rgt-neg-in80.6%
neg-mul-180.6%
times-frac80.5%
associate-*r/80.6%
distribute-frac-neg80.6%
distribute-neg-frac280.6%
metadata-eval80.6%
/-rgt-identity80.6%
metadata-eval80.6%
distribute-rgt-neg-out80.6%
distribute-lft-neg-out80.6%
*-commutative80.6%
cancel-sign-sub80.6%
*-commutative80.6%
Simplified82.6%
associate-/r*95.8%
Applied egg-rr95.8%
Taylor expanded in t around 0 76.0%
*-commutative76.0%
associate-/r*87.6%
Simplified87.6%
if -1.1600000000000001e100 < y < -2.80000000000000005e51 or 1.74999999999999997e-6 < y < 1.09999999999999993e81Initial program 84.9%
remove-double-neg84.9%
distribute-rgt-out--88.8%
distribute-lft-neg-in88.8%
distribute-rgt-out--84.9%
remove-double-neg84.9%
distribute-lft-neg-out84.9%
distribute-rgt-neg-in84.9%
neg-mul-184.9%
times-frac84.7%
associate-*r/84.9%
distribute-frac-neg84.9%
distribute-neg-frac284.9%
metadata-eval84.9%
/-rgt-identity84.9%
metadata-eval84.9%
distribute-rgt-neg-out84.9%
distribute-lft-neg-out84.9%
*-commutative84.9%
cancel-sign-sub84.9%
*-commutative84.9%
Simplified88.8%
associate-/r*95.9%
Applied egg-rr95.9%
Taylor expanded in t around inf 70.4%
associate-*r/70.4%
*-commutative70.4%
*-commutative70.4%
times-frac80.9%
associate-*r/81.2%
*-commutative81.2%
associate-*r/81.2%
Simplified81.2%
if -2.80000000000000005e51 < y < -1.35e-33Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-out--99.8%
distribute-lft-neg-in99.8%
distribute-rgt-out--99.8%
remove-double-neg99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
neg-mul-199.8%
times-frac99.7%
associate-*r/99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
metadata-eval99.8%
/-rgt-identity99.8%
metadata-eval99.8%
distribute-rgt-neg-out99.8%
distribute-lft-neg-out99.8%
*-commutative99.8%
cancel-sign-sub99.8%
*-commutative99.8%
Simplified99.8%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 87.7%
*-commutative87.7%
associate-/r*87.8%
Simplified87.8%
*-commutative87.8%
associate-*l/87.8%
associate-*r/87.7%
clear-num87.5%
frac-times87.8%
metadata-eval87.8%
Applied egg-rr87.8%
if -1.35e-33 < y < 3.69999999999999985e-55Initial program 94.1%
remove-double-neg94.1%
distribute-rgt-out--95.1%
distribute-lft-neg-in95.1%
distribute-rgt-out--92.4%
remove-double-neg92.4%
distribute-lft-neg-out92.4%
distribute-rgt-neg-in92.4%
neg-mul-192.4%
times-frac91.9%
associate-*r/92.4%
distribute-frac-neg92.4%
distribute-neg-frac292.4%
metadata-eval92.4%
/-rgt-identity92.4%
metadata-eval92.4%
distribute-rgt-neg-out92.4%
distribute-lft-neg-out92.4%
*-commutative92.4%
cancel-sign-sub92.4%
*-commutative92.4%
Simplified95.1%
associate-/r*92.3%
Applied egg-rr92.3%
Taylor expanded in t around inf 80.8%
associate-*r/80.8%
*-commutative80.8%
*-commutative80.8%
times-frac81.0%
associate-*r/81.0%
*-commutative81.0%
associate-*r/81.0%
Simplified81.0%
associate-/l/80.8%
*-commutative80.8%
times-frac81.4%
Applied egg-rr81.4%
if 3.69999999999999985e-55 < y < 1.74999999999999997e-6Initial program 89.7%
remove-double-neg89.7%
distribute-rgt-out--89.7%
distribute-lft-neg-in89.7%
distribute-rgt-out--78.6%
remove-double-neg78.6%
distribute-lft-neg-out78.6%
distribute-rgt-neg-in78.6%
neg-mul-178.6%
times-frac78.4%
associate-*r/78.6%
distribute-frac-neg78.6%
distribute-neg-frac278.6%
metadata-eval78.6%
/-rgt-identity78.6%
metadata-eval78.6%
distribute-rgt-neg-out78.6%
distribute-lft-neg-out78.6%
*-commutative78.6%
cancel-sign-sub78.6%
*-commutative78.6%
Simplified89.7%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 89.2%
*-commutative89.2%
associate-/r*89.0%
Simplified89.0%
clear-num89.2%
un-div-inv89.2%
associate-/r/89.2%
Applied egg-rr89.2%
if 1.09999999999999993e81 < y Initial program 85.0%
remove-double-neg85.0%
distribute-rgt-out--85.3%
distribute-lft-neg-in85.3%
distribute-rgt-out--85.0%
remove-double-neg85.0%
distribute-lft-neg-out85.0%
distribute-rgt-neg-in85.0%
neg-mul-185.0%
times-frac84.8%
associate-*r/85.0%
distribute-frac-neg85.0%
distribute-neg-frac285.0%
metadata-eval85.0%
/-rgt-identity85.0%
metadata-eval85.0%
distribute-rgt-neg-out85.0%
distribute-lft-neg-out85.0%
*-commutative85.0%
cancel-sign-sub85.0%
*-commutative85.0%
Simplified85.3%
Taylor expanded in t around 0 73.4%
associate-*r/73.4%
*-commutative73.4%
times-frac77.6%
Simplified77.6%
Final simplification82.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* 2.0 (/ (/ x_m z) y))))
(*
x_s
(if (<= y -7.4e+99)
t_1
(if (<= y -9e+51)
(* x_m (/ (/ -2.0 z) t))
(if (<= y -7.6e-33)
t_1
(if (<= y 2.8e-55)
(* (/ -2.0 z) (/ x_m t))
(if (<= y 0.00016)
(/ 2.0 (* z (/ y x_m)))
(if (<= y 7.8e+78)
(/ -2.0 (/ (* z t) x_m))
(* (/ 2.0 z) (/ x_m y)))))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = 2.0 * ((x_m / z) / y);
double tmp;
if (y <= -7.4e+99) {
tmp = t_1;
} else if (y <= -9e+51) {
tmp = x_m * ((-2.0 / z) / t);
} else if (y <= -7.6e-33) {
tmp = t_1;
} else if (y <= 2.8e-55) {
tmp = (-2.0 / z) * (x_m / t);
} else if (y <= 0.00016) {
tmp = 2.0 / (z * (y / x_m));
} else if (y <= 7.8e+78) {
tmp = -2.0 / ((z * t) / x_m);
} else {
tmp = (2.0 / z) * (x_m / y);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * ((x_m / z) / y)
if (y <= (-7.4d+99)) then
tmp = t_1
else if (y <= (-9d+51)) then
tmp = x_m * (((-2.0d0) / z) / t)
else if (y <= (-7.6d-33)) then
tmp = t_1
else if (y <= 2.8d-55) then
tmp = ((-2.0d0) / z) * (x_m / t)
else if (y <= 0.00016d0) then
tmp = 2.0d0 / (z * (y / x_m))
else if (y <= 7.8d+78) then
tmp = (-2.0d0) / ((z * t) / x_m)
else
tmp = (2.0d0 / z) * (x_m / y)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = 2.0 * ((x_m / z) / y);
double tmp;
if (y <= -7.4e+99) {
tmp = t_1;
} else if (y <= -9e+51) {
tmp = x_m * ((-2.0 / z) / t);
} else if (y <= -7.6e-33) {
tmp = t_1;
} else if (y <= 2.8e-55) {
tmp = (-2.0 / z) * (x_m / t);
} else if (y <= 0.00016) {
tmp = 2.0 / (z * (y / x_m));
} else if (y <= 7.8e+78) {
tmp = -2.0 / ((z * t) / x_m);
} else {
tmp = (2.0 / z) * (x_m / y);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = 2.0 * ((x_m / z) / y) tmp = 0 if y <= -7.4e+99: tmp = t_1 elif y <= -9e+51: tmp = x_m * ((-2.0 / z) / t) elif y <= -7.6e-33: tmp = t_1 elif y <= 2.8e-55: tmp = (-2.0 / z) * (x_m / t) elif y <= 0.00016: tmp = 2.0 / (z * (y / x_m)) elif y <= 7.8e+78: tmp = -2.0 / ((z * t) / x_m) else: tmp = (2.0 / z) * (x_m / y) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(2.0 * Float64(Float64(x_m / z) / y)) tmp = 0.0 if (y <= -7.4e+99) tmp = t_1; elseif (y <= -9e+51) tmp = Float64(x_m * Float64(Float64(-2.0 / z) / t)); elseif (y <= -7.6e-33) tmp = t_1; elseif (y <= 2.8e-55) tmp = Float64(Float64(-2.0 / z) * Float64(x_m / t)); elseif (y <= 0.00016) tmp = Float64(2.0 / Float64(z * Float64(y / x_m))); elseif (y <= 7.8e+78) tmp = Float64(-2.0 / Float64(Float64(z * t) / x_m)); else tmp = Float64(Float64(2.0 / z) * Float64(x_m / y)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = 2.0 * ((x_m / z) / y); tmp = 0.0; if (y <= -7.4e+99) tmp = t_1; elseif (y <= -9e+51) tmp = x_m * ((-2.0 / z) / t); elseif (y <= -7.6e-33) tmp = t_1; elseif (y <= 2.8e-55) tmp = (-2.0 / z) * (x_m / t); elseif (y <= 0.00016) tmp = 2.0 / (z * (y / x_m)); elseif (y <= 7.8e+78) tmp = -2.0 / ((z * t) / x_m); else tmp = (2.0 / z) * (x_m / y); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -7.4e+99], t$95$1, If[LessEqual[y, -9e+51], N[(x$95$m * N[(N[(-2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.6e-33], t$95$1, If[LessEqual[y, 2.8e-55], N[(N[(-2.0 / z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00016], N[(2.0 / N[(z * N[(y / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.8e+78], N[(-2.0 / N[(N[(z * t), $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / z), $MachinePrecision] * N[(x$95$m / y), $MachinePrecision]), $MachinePrecision]]]]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := 2 \cdot \frac{\frac{x\_m}{z}}{y}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9 \cdot 10^{+51}:\\
\;\;\;\;x\_m \cdot \frac{\frac{-2}{z}}{t}\\
\mathbf{elif}\;y \leq -7.6 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-55}:\\
\;\;\;\;\frac{-2}{z} \cdot \frac{x\_m}{t}\\
\mathbf{elif}\;y \leq 0.00016:\\
\;\;\;\;\frac{2}{z \cdot \frac{y}{x\_m}}\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+78}:\\
\;\;\;\;\frac{-2}{\frac{z \cdot t}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{z} \cdot \frac{x\_m}{y}\\
\end{array}
\end{array}
\end{array}
if y < -7.4000000000000002e99 or -8.9999999999999999e51 < y < -7.59999999999999988e-33Initial program 85.3%
remove-double-neg85.3%
distribute-rgt-out--86.9%
distribute-lft-neg-in86.9%
distribute-rgt-out--85.3%
remove-double-neg85.3%
distribute-lft-neg-out85.3%
distribute-rgt-neg-in85.3%
neg-mul-185.3%
times-frac85.2%
associate-*r/85.3%
distribute-frac-neg85.3%
distribute-neg-frac285.3%
metadata-eval85.3%
/-rgt-identity85.3%
metadata-eval85.3%
distribute-rgt-neg-out85.3%
distribute-lft-neg-out85.3%
*-commutative85.3%
cancel-sign-sub85.3%
*-commutative85.3%
Simplified86.9%
associate-/r*96.8%
Applied egg-rr96.8%
Taylor expanded in t around 0 78.9%
*-commutative78.9%
associate-/r*87.7%
Simplified87.7%
if -7.4000000000000002e99 < y < -8.9999999999999999e51Initial program 91.2%
remove-double-neg91.2%
distribute-rgt-out--91.2%
distribute-lft-neg-in91.2%
distribute-rgt-out--91.2%
remove-double-neg91.2%
distribute-lft-neg-out91.2%
distribute-rgt-neg-in91.2%
neg-mul-191.2%
times-frac91.1%
associate-*r/91.2%
distribute-frac-neg91.2%
distribute-neg-frac291.2%
metadata-eval91.2%
/-rgt-identity91.2%
metadata-eval91.2%
distribute-rgt-neg-out91.2%
distribute-lft-neg-out91.2%
*-commutative91.2%
cancel-sign-sub91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in t around inf 74.1%
associate-*r/74.1%
*-commutative74.1%
*-commutative74.1%
associate-/l*73.9%
Simplified73.9%
associate-/r*74.1%
Applied egg-rr74.1%
if -7.59999999999999988e-33 < y < 2.79999999999999984e-55Initial program 94.1%
remove-double-neg94.1%
distribute-rgt-out--95.1%
distribute-lft-neg-in95.1%
distribute-rgt-out--92.4%
remove-double-neg92.4%
distribute-lft-neg-out92.4%
distribute-rgt-neg-in92.4%
neg-mul-192.4%
times-frac91.9%
associate-*r/92.4%
distribute-frac-neg92.4%
distribute-neg-frac292.4%
metadata-eval92.4%
/-rgt-identity92.4%
metadata-eval92.4%
distribute-rgt-neg-out92.4%
distribute-lft-neg-out92.4%
*-commutative92.4%
cancel-sign-sub92.4%
*-commutative92.4%
Simplified95.1%
associate-/r*92.3%
Applied egg-rr92.3%
Taylor expanded in t around inf 80.8%
associate-*r/80.8%
*-commutative80.8%
*-commutative80.8%
times-frac81.0%
associate-*r/81.0%
*-commutative81.0%
associate-*r/81.0%
Simplified81.0%
associate-/l/80.8%
*-commutative80.8%
times-frac81.4%
Applied egg-rr81.4%
if 2.79999999999999984e-55 < y < 1.60000000000000013e-4Initial program 89.7%
remove-double-neg89.7%
distribute-rgt-out--89.7%
distribute-lft-neg-in89.7%
distribute-rgt-out--78.6%
remove-double-neg78.6%
distribute-lft-neg-out78.6%
distribute-rgt-neg-in78.6%
neg-mul-178.6%
times-frac78.4%
associate-*r/78.6%
distribute-frac-neg78.6%
distribute-neg-frac278.6%
metadata-eval78.6%
/-rgt-identity78.6%
metadata-eval78.6%
distribute-rgt-neg-out78.6%
distribute-lft-neg-out78.6%
*-commutative78.6%
cancel-sign-sub78.6%
*-commutative78.6%
Simplified89.7%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 89.2%
*-commutative89.2%
associate-/r*89.0%
Simplified89.0%
clear-num89.2%
un-div-inv89.2%
associate-/r/89.2%
Applied egg-rr89.2%
if 1.60000000000000013e-4 < y < 7.8000000000000008e78Initial program 80.3%
remove-double-neg80.3%
distribute-rgt-out--87.1%
distribute-lft-neg-in87.1%
distribute-rgt-out--80.3%
remove-double-neg80.3%
distribute-lft-neg-out80.3%
distribute-rgt-neg-in80.3%
neg-mul-180.3%
times-frac80.0%
associate-*r/80.3%
distribute-frac-neg80.3%
distribute-neg-frac280.3%
metadata-eval80.3%
/-rgt-identity80.3%
metadata-eval80.3%
distribute-rgt-neg-out80.3%
distribute-lft-neg-out80.3%
*-commutative80.3%
cancel-sign-sub80.3%
*-commutative80.3%
Simplified87.1%
associate-/r*99.4%
Applied egg-rr99.4%
associate-/l/87.1%
frac-times80.7%
clear-num80.5%
frac-times80.7%
metadata-eval80.7%
Applied egg-rr80.7%
Taylor expanded in t around inf 67.9%
if 7.8000000000000008e78 < y Initial program 85.0%
remove-double-neg85.0%
distribute-rgt-out--85.3%
distribute-lft-neg-in85.3%
distribute-rgt-out--85.0%
remove-double-neg85.0%
distribute-lft-neg-out85.0%
distribute-rgt-neg-in85.0%
neg-mul-185.0%
times-frac84.8%
associate-*r/85.0%
distribute-frac-neg85.0%
distribute-neg-frac285.0%
metadata-eval85.0%
/-rgt-identity85.0%
metadata-eval85.0%
distribute-rgt-neg-out85.0%
distribute-lft-neg-out85.0%
*-commutative85.0%
cancel-sign-sub85.0%
*-commutative85.0%
Simplified85.3%
Taylor expanded in t around 0 73.4%
associate-*r/73.4%
*-commutative73.4%
times-frac77.6%
Simplified77.6%
Final simplification81.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* 2.0 (/ (/ x_m z) y))))
(*
x_s
(if (<= y -4.8e+99)
t_1
(if (<= y -9e+51)
(* x_m (/ (/ -2.0 z) t))
(if (<= y -7.5e-33)
t_1
(if (<= y 7e-56)
(* (/ -2.0 z) (/ x_m t))
(if (<= y 0.0045)
t_1
(if (<= y 7.8e+78)
(/ -2.0 (/ (* z t) x_m))
(* (/ 2.0 z) (/ x_m y)))))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = 2.0 * ((x_m / z) / y);
double tmp;
if (y <= -4.8e+99) {
tmp = t_1;
} else if (y <= -9e+51) {
tmp = x_m * ((-2.0 / z) / t);
} else if (y <= -7.5e-33) {
tmp = t_1;
} else if (y <= 7e-56) {
tmp = (-2.0 / z) * (x_m / t);
} else if (y <= 0.0045) {
tmp = t_1;
} else if (y <= 7.8e+78) {
tmp = -2.0 / ((z * t) / x_m);
} else {
tmp = (2.0 / z) * (x_m / y);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * ((x_m / z) / y)
if (y <= (-4.8d+99)) then
tmp = t_1
else if (y <= (-9d+51)) then
tmp = x_m * (((-2.0d0) / z) / t)
else if (y <= (-7.5d-33)) then
tmp = t_1
else if (y <= 7d-56) then
tmp = ((-2.0d0) / z) * (x_m / t)
else if (y <= 0.0045d0) then
tmp = t_1
else if (y <= 7.8d+78) then
tmp = (-2.0d0) / ((z * t) / x_m)
else
tmp = (2.0d0 / z) * (x_m / y)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = 2.0 * ((x_m / z) / y);
double tmp;
if (y <= -4.8e+99) {
tmp = t_1;
} else if (y <= -9e+51) {
tmp = x_m * ((-2.0 / z) / t);
} else if (y <= -7.5e-33) {
tmp = t_1;
} else if (y <= 7e-56) {
tmp = (-2.0 / z) * (x_m / t);
} else if (y <= 0.0045) {
tmp = t_1;
} else if (y <= 7.8e+78) {
tmp = -2.0 / ((z * t) / x_m);
} else {
tmp = (2.0 / z) * (x_m / y);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = 2.0 * ((x_m / z) / y) tmp = 0 if y <= -4.8e+99: tmp = t_1 elif y <= -9e+51: tmp = x_m * ((-2.0 / z) / t) elif y <= -7.5e-33: tmp = t_1 elif y <= 7e-56: tmp = (-2.0 / z) * (x_m / t) elif y <= 0.0045: tmp = t_1 elif y <= 7.8e+78: tmp = -2.0 / ((z * t) / x_m) else: tmp = (2.0 / z) * (x_m / y) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(2.0 * Float64(Float64(x_m / z) / y)) tmp = 0.0 if (y <= -4.8e+99) tmp = t_1; elseif (y <= -9e+51) tmp = Float64(x_m * Float64(Float64(-2.0 / z) / t)); elseif (y <= -7.5e-33) tmp = t_1; elseif (y <= 7e-56) tmp = Float64(Float64(-2.0 / z) * Float64(x_m / t)); elseif (y <= 0.0045) tmp = t_1; elseif (y <= 7.8e+78) tmp = Float64(-2.0 / Float64(Float64(z * t) / x_m)); else tmp = Float64(Float64(2.0 / z) * Float64(x_m / y)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = 2.0 * ((x_m / z) / y); tmp = 0.0; if (y <= -4.8e+99) tmp = t_1; elseif (y <= -9e+51) tmp = x_m * ((-2.0 / z) / t); elseif (y <= -7.5e-33) tmp = t_1; elseif (y <= 7e-56) tmp = (-2.0 / z) * (x_m / t); elseif (y <= 0.0045) tmp = t_1; elseif (y <= 7.8e+78) tmp = -2.0 / ((z * t) / x_m); else tmp = (2.0 / z) * (x_m / y); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -4.8e+99], t$95$1, If[LessEqual[y, -9e+51], N[(x$95$m * N[(N[(-2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.5e-33], t$95$1, If[LessEqual[y, 7e-56], N[(N[(-2.0 / z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0045], t$95$1, If[LessEqual[y, 7.8e+78], N[(-2.0 / N[(N[(z * t), $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / z), $MachinePrecision] * N[(x$95$m / y), $MachinePrecision]), $MachinePrecision]]]]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := 2 \cdot \frac{\frac{x\_m}{z}}{y}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9 \cdot 10^{+51}:\\
\;\;\;\;x\_m \cdot \frac{\frac{-2}{z}}{t}\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-56}:\\
\;\;\;\;\frac{-2}{z} \cdot \frac{x\_m}{t}\\
\mathbf{elif}\;y \leq 0.0045:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+78}:\\
\;\;\;\;\frac{-2}{\frac{z \cdot t}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{z} \cdot \frac{x\_m}{y}\\
\end{array}
\end{array}
\end{array}
if y < -4.8000000000000002e99 or -8.9999999999999999e51 < y < -7.5000000000000001e-33 or 6.9999999999999996e-56 < y < 0.00449999999999999966Initial program 85.9%
remove-double-neg85.9%
distribute-rgt-out--87.2%
distribute-lft-neg-in87.2%
distribute-rgt-out--84.5%
remove-double-neg84.5%
distribute-lft-neg-out84.5%
distribute-rgt-neg-in84.5%
neg-mul-184.5%
times-frac84.4%
associate-*r/84.5%
distribute-frac-neg84.5%
distribute-neg-frac284.5%
metadata-eval84.5%
/-rgt-identity84.5%
metadata-eval84.5%
distribute-rgt-neg-out84.5%
distribute-lft-neg-out84.5%
*-commutative84.5%
cancel-sign-sub84.5%
*-commutative84.5%
Simplified87.2%
associate-/r*97.2%
Applied egg-rr97.2%
Taylor expanded in t around 0 80.2%
*-commutative80.2%
associate-/r*87.8%
Simplified87.8%
if -4.8000000000000002e99 < y < -8.9999999999999999e51Initial program 91.2%
remove-double-neg91.2%
distribute-rgt-out--91.2%
distribute-lft-neg-in91.2%
distribute-rgt-out--91.2%
remove-double-neg91.2%
distribute-lft-neg-out91.2%
distribute-rgt-neg-in91.2%
neg-mul-191.2%
times-frac91.1%
associate-*r/91.2%
distribute-frac-neg91.2%
distribute-neg-frac291.2%
metadata-eval91.2%
/-rgt-identity91.2%
metadata-eval91.2%
distribute-rgt-neg-out91.2%
distribute-lft-neg-out91.2%
*-commutative91.2%
cancel-sign-sub91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in t around inf 74.1%
associate-*r/74.1%
*-commutative74.1%
*-commutative74.1%
associate-/l*73.9%
Simplified73.9%
associate-/r*74.1%
Applied egg-rr74.1%
if -7.5000000000000001e-33 < y < 6.9999999999999996e-56Initial program 94.1%
remove-double-neg94.1%
distribute-rgt-out--95.1%
distribute-lft-neg-in95.1%
distribute-rgt-out--92.4%
remove-double-neg92.4%
distribute-lft-neg-out92.4%
distribute-rgt-neg-in92.4%
neg-mul-192.4%
times-frac91.9%
associate-*r/92.4%
distribute-frac-neg92.4%
distribute-neg-frac292.4%
metadata-eval92.4%
/-rgt-identity92.4%
metadata-eval92.4%
distribute-rgt-neg-out92.4%
distribute-lft-neg-out92.4%
*-commutative92.4%
cancel-sign-sub92.4%
*-commutative92.4%
Simplified95.1%
associate-/r*92.3%
Applied egg-rr92.3%
Taylor expanded in t around inf 80.8%
associate-*r/80.8%
*-commutative80.8%
*-commutative80.8%
times-frac81.0%
associate-*r/81.0%
*-commutative81.0%
associate-*r/81.0%
Simplified81.0%
associate-/l/80.8%
*-commutative80.8%
times-frac81.4%
Applied egg-rr81.4%
if 0.00449999999999999966 < y < 7.8000000000000008e78Initial program 80.3%
remove-double-neg80.3%
distribute-rgt-out--87.1%
distribute-lft-neg-in87.1%
distribute-rgt-out--80.3%
remove-double-neg80.3%
distribute-lft-neg-out80.3%
distribute-rgt-neg-in80.3%
neg-mul-180.3%
times-frac80.0%
associate-*r/80.3%
distribute-frac-neg80.3%
distribute-neg-frac280.3%
metadata-eval80.3%
/-rgt-identity80.3%
metadata-eval80.3%
distribute-rgt-neg-out80.3%
distribute-lft-neg-out80.3%
*-commutative80.3%
cancel-sign-sub80.3%
*-commutative80.3%
Simplified87.1%
associate-/r*99.4%
Applied egg-rr99.4%
associate-/l/87.1%
frac-times80.7%
clear-num80.5%
frac-times80.7%
metadata-eval80.7%
Applied egg-rr80.7%
Taylor expanded in t around inf 67.9%
if 7.8000000000000008e78 < y Initial program 85.0%
remove-double-neg85.0%
distribute-rgt-out--85.3%
distribute-lft-neg-in85.3%
distribute-rgt-out--85.0%
remove-double-neg85.0%
distribute-lft-neg-out85.0%
distribute-rgt-neg-in85.0%
neg-mul-185.0%
times-frac84.8%
associate-*r/85.0%
distribute-frac-neg85.0%
distribute-neg-frac285.0%
metadata-eval85.0%
/-rgt-identity85.0%
metadata-eval85.0%
distribute-rgt-neg-out85.0%
distribute-lft-neg-out85.0%
*-commutative85.0%
cancel-sign-sub85.0%
*-commutative85.0%
Simplified85.3%
Taylor expanded in t around 0 73.4%
associate-*r/73.4%
*-commutative73.4%
times-frac77.6%
Simplified77.6%
Final simplification81.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* 2.0 (/ (/ x_m z) y))) (t_2 (* (/ -2.0 z) (/ x_m t))))
(*
x_s
(if (<= y -4.8e+99)
t_1
(if (<= y -2.1e+51)
(* x_m (/ (/ -2.0 z) t))
(if (<= y -1.4e-33)
t_1
(if (<= y 3.25e-55)
t_2
(if (<= y 0.08)
t_1
(if (<= y 1.6e+79) t_2 (* (/ 2.0 z) (/ x_m y)))))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = 2.0 * ((x_m / z) / y);
double t_2 = (-2.0 / z) * (x_m / t);
double tmp;
if (y <= -4.8e+99) {
tmp = t_1;
} else if (y <= -2.1e+51) {
tmp = x_m * ((-2.0 / z) / t);
} else if (y <= -1.4e-33) {
tmp = t_1;
} else if (y <= 3.25e-55) {
tmp = t_2;
} else if (y <= 0.08) {
tmp = t_1;
} else if (y <= 1.6e+79) {
tmp = t_2;
} else {
tmp = (2.0 / z) * (x_m / y);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x_m / z) / y)
t_2 = ((-2.0d0) / z) * (x_m / t)
if (y <= (-4.8d+99)) then
tmp = t_1
else if (y <= (-2.1d+51)) then
tmp = x_m * (((-2.0d0) / z) / t)
else if (y <= (-1.4d-33)) then
tmp = t_1
else if (y <= 3.25d-55) then
tmp = t_2
else if (y <= 0.08d0) then
tmp = t_1
else if (y <= 1.6d+79) then
tmp = t_2
else
tmp = (2.0d0 / z) * (x_m / y)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = 2.0 * ((x_m / z) / y);
double t_2 = (-2.0 / z) * (x_m / t);
double tmp;
if (y <= -4.8e+99) {
tmp = t_1;
} else if (y <= -2.1e+51) {
tmp = x_m * ((-2.0 / z) / t);
} else if (y <= -1.4e-33) {
tmp = t_1;
} else if (y <= 3.25e-55) {
tmp = t_2;
} else if (y <= 0.08) {
tmp = t_1;
} else if (y <= 1.6e+79) {
tmp = t_2;
} else {
tmp = (2.0 / z) * (x_m / y);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = 2.0 * ((x_m / z) / y) t_2 = (-2.0 / z) * (x_m / t) tmp = 0 if y <= -4.8e+99: tmp = t_1 elif y <= -2.1e+51: tmp = x_m * ((-2.0 / z) / t) elif y <= -1.4e-33: tmp = t_1 elif y <= 3.25e-55: tmp = t_2 elif y <= 0.08: tmp = t_1 elif y <= 1.6e+79: tmp = t_2 else: tmp = (2.0 / z) * (x_m / y) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(2.0 * Float64(Float64(x_m / z) / y)) t_2 = Float64(Float64(-2.0 / z) * Float64(x_m / t)) tmp = 0.0 if (y <= -4.8e+99) tmp = t_1; elseif (y <= -2.1e+51) tmp = Float64(x_m * Float64(Float64(-2.0 / z) / t)); elseif (y <= -1.4e-33) tmp = t_1; elseif (y <= 3.25e-55) tmp = t_2; elseif (y <= 0.08) tmp = t_1; elseif (y <= 1.6e+79) tmp = t_2; else tmp = Float64(Float64(2.0 / z) * Float64(x_m / y)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = 2.0 * ((x_m / z) / y); t_2 = (-2.0 / z) * (x_m / t); tmp = 0.0; if (y <= -4.8e+99) tmp = t_1; elseif (y <= -2.1e+51) tmp = x_m * ((-2.0 / z) / t); elseif (y <= -1.4e-33) tmp = t_1; elseif (y <= 3.25e-55) tmp = t_2; elseif (y <= 0.08) tmp = t_1; elseif (y <= 1.6e+79) tmp = t_2; else tmp = (2.0 / z) * (x_m / y); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-2.0 / z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -4.8e+99], t$95$1, If[LessEqual[y, -2.1e+51], N[(x$95$m * N[(N[(-2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.4e-33], t$95$1, If[LessEqual[y, 3.25e-55], t$95$2, If[LessEqual[y, 0.08], t$95$1, If[LessEqual[y, 1.6e+79], t$95$2, N[(N[(2.0 / z), $MachinePrecision] * N[(x$95$m / y), $MachinePrecision]), $MachinePrecision]]]]]]]), $MachinePrecision]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := 2 \cdot \frac{\frac{x\_m}{z}}{y}\\
t_2 := \frac{-2}{z} \cdot \frac{x\_m}{t}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{+51}:\\
\;\;\;\;x\_m \cdot \frac{\frac{-2}{z}}{t}\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.25 \cdot 10^{-55}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 0.08:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+79}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{z} \cdot \frac{x\_m}{y}\\
\end{array}
\end{array}
\end{array}
if y < -4.8000000000000002e99 or -2.1000000000000001e51 < y < -1.4e-33 or 3.25000000000000003e-55 < y < 0.0800000000000000017Initial program 85.9%
remove-double-neg85.9%
distribute-rgt-out--87.2%
distribute-lft-neg-in87.2%
distribute-rgt-out--84.5%
remove-double-neg84.5%
distribute-lft-neg-out84.5%
distribute-rgt-neg-in84.5%
neg-mul-184.5%
times-frac84.4%
associate-*r/84.5%
distribute-frac-neg84.5%
distribute-neg-frac284.5%
metadata-eval84.5%
/-rgt-identity84.5%
metadata-eval84.5%
distribute-rgt-neg-out84.5%
distribute-lft-neg-out84.5%
*-commutative84.5%
cancel-sign-sub84.5%
*-commutative84.5%
Simplified87.2%
associate-/r*97.2%
Applied egg-rr97.2%
Taylor expanded in t around 0 80.2%
*-commutative80.2%
associate-/r*87.8%
Simplified87.8%
if -4.8000000000000002e99 < y < -2.1000000000000001e51Initial program 91.2%
remove-double-neg91.2%
distribute-rgt-out--91.2%
distribute-lft-neg-in91.2%
distribute-rgt-out--91.2%
remove-double-neg91.2%
distribute-lft-neg-out91.2%
distribute-rgt-neg-in91.2%
neg-mul-191.2%
times-frac91.1%
associate-*r/91.2%
distribute-frac-neg91.2%
distribute-neg-frac291.2%
metadata-eval91.2%
/-rgt-identity91.2%
metadata-eval91.2%
distribute-rgt-neg-out91.2%
distribute-lft-neg-out91.2%
*-commutative91.2%
cancel-sign-sub91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in t around inf 74.1%
associate-*r/74.1%
*-commutative74.1%
*-commutative74.1%
associate-/l*73.9%
Simplified73.9%
associate-/r*74.1%
Applied egg-rr74.1%
if -1.4e-33 < y < 3.25000000000000003e-55 or 0.0800000000000000017 < y < 1.60000000000000001e79Initial program 92.4%
remove-double-neg92.4%
distribute-rgt-out--94.1%
distribute-lft-neg-in94.1%
distribute-rgt-out--91.0%
remove-double-neg91.0%
distribute-lft-neg-out91.0%
distribute-rgt-neg-in91.0%
neg-mul-191.0%
times-frac90.5%
associate-*r/91.0%
distribute-frac-neg91.0%
distribute-neg-frac291.0%
metadata-eval91.0%
/-rgt-identity91.0%
metadata-eval91.0%
distribute-rgt-neg-out91.0%
distribute-lft-neg-out91.0%
*-commutative91.0%
cancel-sign-sub91.0%
*-commutative91.0%
Simplified94.1%
associate-/r*93.2%
Applied egg-rr93.2%
Taylor expanded in t around inf 79.2%
associate-*r/79.2%
*-commutative79.2%
*-commutative79.2%
times-frac80.8%
associate-*r/80.9%
*-commutative80.9%
associate-*r/80.9%
Simplified80.9%
associate-/l/79.2%
*-commutative79.2%
times-frac79.8%
Applied egg-rr79.8%
if 1.60000000000000001e79 < y Initial program 85.0%
remove-double-neg85.0%
distribute-rgt-out--85.3%
distribute-lft-neg-in85.3%
distribute-rgt-out--85.0%
remove-double-neg85.0%
distribute-lft-neg-out85.0%
distribute-rgt-neg-in85.0%
neg-mul-185.0%
times-frac84.8%
associate-*r/85.0%
distribute-frac-neg85.0%
distribute-neg-frac285.0%
metadata-eval85.0%
/-rgt-identity85.0%
metadata-eval85.0%
distribute-rgt-neg-out85.0%
distribute-lft-neg-out85.0%
*-commutative85.0%
cancel-sign-sub85.0%
*-commutative85.0%
Simplified85.3%
Taylor expanded in t around 0 73.4%
associate-*r/73.4%
*-commutative73.4%
times-frac77.6%
Simplified77.6%
Final simplification81.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= y -4.8e+99)
(not
(or (<= y -2.7e+51) (and (not (<= y -1.1e-31)) (<= y 4.6e-56)))))
(* 2.0 (/ (/ x_m z) y))
(* x_m (/ (/ -2.0 z) t)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((y <= -4.8e+99) || !((y <= -2.7e+51) || (!(y <= -1.1e-31) && (y <= 4.6e-56)))) {
tmp = 2.0 * ((x_m / z) / y);
} else {
tmp = x_m * ((-2.0 / z) / t);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-4.8d+99)) .or. (.not. (y <= (-2.7d+51)) .or. (.not. (y <= (-1.1d-31))) .and. (y <= 4.6d-56))) then
tmp = 2.0d0 * ((x_m / z) / y)
else
tmp = x_m * (((-2.0d0) / z) / t)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((y <= -4.8e+99) || !((y <= -2.7e+51) || (!(y <= -1.1e-31) && (y <= 4.6e-56)))) {
tmp = 2.0 * ((x_m / z) / y);
} else {
tmp = x_m * ((-2.0 / z) / t);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (y <= -4.8e+99) or not ((y <= -2.7e+51) or (not (y <= -1.1e-31) and (y <= 4.6e-56))): tmp = 2.0 * ((x_m / z) / y) else: tmp = x_m * ((-2.0 / z) / t) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((y <= -4.8e+99) || !((y <= -2.7e+51) || (!(y <= -1.1e-31) && (y <= 4.6e-56)))) tmp = Float64(2.0 * Float64(Float64(x_m / z) / y)); else tmp = Float64(x_m * Float64(Float64(-2.0 / z) / t)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((y <= -4.8e+99) || ~(((y <= -2.7e+51) || (~((y <= -1.1e-31)) && (y <= 4.6e-56))))) tmp = 2.0 * ((x_m / z) / y); else tmp = x_m * ((-2.0 / z) / t); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[y, -4.8e+99], N[Not[Or[LessEqual[y, -2.7e+51], And[N[Not[LessEqual[y, -1.1e-31]], $MachinePrecision], LessEqual[y, 4.6e-56]]]], $MachinePrecision]], N[(2.0 * N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(N[(-2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+99} \lor \neg \left(y \leq -2.7 \cdot 10^{+51} \lor \neg \left(y \leq -1.1 \cdot 10^{-31}\right) \land y \leq 4.6 \cdot 10^{-56}\right):\\
\;\;\;\;2 \cdot \frac{\frac{x\_m}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{\frac{-2}{z}}{t}\\
\end{array}
\end{array}
if y < -4.8000000000000002e99 or -2.69999999999999992e51 < y < -1.10000000000000005e-31 or 4.60000000000000005e-56 < y Initial program 84.9%
remove-double-neg84.9%
distribute-rgt-out--86.6%
distribute-lft-neg-in86.6%
distribute-rgt-out--84.2%
remove-double-neg84.2%
distribute-lft-neg-out84.2%
distribute-rgt-neg-in84.2%
neg-mul-184.2%
times-frac84.1%
associate-*r/84.2%
distribute-frac-neg84.2%
distribute-neg-frac284.2%
metadata-eval84.2%
/-rgt-identity84.2%
metadata-eval84.2%
distribute-rgt-neg-out84.2%
distribute-lft-neg-out84.2%
*-commutative84.2%
cancel-sign-sub84.2%
*-commutative84.2%
Simplified86.6%
associate-/r*95.4%
Applied egg-rr95.4%
Taylor expanded in t around 0 72.3%
*-commutative72.3%
associate-/r*77.2%
Simplified77.2%
if -4.8000000000000002e99 < y < -2.69999999999999992e51 or -1.10000000000000005e-31 < y < 4.60000000000000005e-56Initial program 93.8%
remove-double-neg93.8%
distribute-rgt-out--94.7%
distribute-lft-neg-in94.7%
distribute-rgt-out--92.3%
remove-double-neg92.3%
distribute-lft-neg-out92.3%
distribute-rgt-neg-in92.3%
neg-mul-192.3%
times-frac91.8%
associate-*r/92.3%
distribute-frac-neg92.3%
distribute-neg-frac292.3%
metadata-eval92.3%
/-rgt-identity92.3%
metadata-eval92.3%
distribute-rgt-neg-out92.3%
distribute-lft-neg-out92.3%
*-commutative92.3%
cancel-sign-sub92.3%
*-commutative92.3%
Simplified94.7%
Taylor expanded in t around inf 80.2%
associate-*r/80.2%
*-commutative80.2%
*-commutative80.2%
associate-/l*79.8%
Simplified79.8%
associate-/r*80.1%
Applied egg-rr80.1%
Final simplification78.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= y -1.25e+101)
(not (or (<= y -1e+52) (and (not (<= y -5.2e-32)) (<= y 1.05e-55)))))
(* 2.0 (/ (/ x_m z) y))
(* x_m (/ -2.0 (* z t))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((y <= -1.25e+101) || !((y <= -1e+52) || (!(y <= -5.2e-32) && (y <= 1.05e-55)))) {
tmp = 2.0 * ((x_m / z) / y);
} else {
tmp = x_m * (-2.0 / (z * t));
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.25d+101)) .or. (.not. (y <= (-1d+52)) .or. (.not. (y <= (-5.2d-32))) .and. (y <= 1.05d-55))) then
tmp = 2.0d0 * ((x_m / z) / y)
else
tmp = x_m * ((-2.0d0) / (z * t))
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((y <= -1.25e+101) || !((y <= -1e+52) || (!(y <= -5.2e-32) && (y <= 1.05e-55)))) {
tmp = 2.0 * ((x_m / z) / y);
} else {
tmp = x_m * (-2.0 / (z * t));
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (y <= -1.25e+101) or not ((y <= -1e+52) or (not (y <= -5.2e-32) and (y <= 1.05e-55))): tmp = 2.0 * ((x_m / z) / y) else: tmp = x_m * (-2.0 / (z * t)) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((y <= -1.25e+101) || !((y <= -1e+52) || (!(y <= -5.2e-32) && (y <= 1.05e-55)))) tmp = Float64(2.0 * Float64(Float64(x_m / z) / y)); else tmp = Float64(x_m * Float64(-2.0 / Float64(z * t))); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((y <= -1.25e+101) || ~(((y <= -1e+52) || (~((y <= -5.2e-32)) && (y <= 1.05e-55))))) tmp = 2.0 * ((x_m / z) / y); else tmp = x_m * (-2.0 / (z * t)); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[y, -1.25e+101], N[Not[Or[LessEqual[y, -1e+52], And[N[Not[LessEqual[y, -5.2e-32]], $MachinePrecision], LessEqual[y, 1.05e-55]]]], $MachinePrecision]], N[(2.0 * N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(-2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+101} \lor \neg \left(y \leq -1 \cdot 10^{+52} \lor \neg \left(y \leq -5.2 \cdot 10^{-32}\right) \land y \leq 1.05 \cdot 10^{-55}\right):\\
\;\;\;\;2 \cdot \frac{\frac{x\_m}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{-2}{z \cdot t}\\
\end{array}
\end{array}
if y < -1.24999999999999997e101 or -9.9999999999999999e51 < y < -5.1999999999999995e-32 or 1.0500000000000001e-55 < y Initial program 84.9%
remove-double-neg84.9%
distribute-rgt-out--86.6%
distribute-lft-neg-in86.6%
distribute-rgt-out--84.2%
remove-double-neg84.2%
distribute-lft-neg-out84.2%
distribute-rgt-neg-in84.2%
neg-mul-184.2%
times-frac84.1%
associate-*r/84.2%
distribute-frac-neg84.2%
distribute-neg-frac284.2%
metadata-eval84.2%
/-rgt-identity84.2%
metadata-eval84.2%
distribute-rgt-neg-out84.2%
distribute-lft-neg-out84.2%
*-commutative84.2%
cancel-sign-sub84.2%
*-commutative84.2%
Simplified86.6%
associate-/r*95.4%
Applied egg-rr95.4%
Taylor expanded in t around 0 72.3%
*-commutative72.3%
associate-/r*77.2%
Simplified77.2%
if -1.24999999999999997e101 < y < -9.9999999999999999e51 or -5.1999999999999995e-32 < y < 1.0500000000000001e-55Initial program 93.8%
remove-double-neg93.8%
distribute-rgt-out--94.7%
distribute-lft-neg-in94.7%
distribute-rgt-out--92.3%
remove-double-neg92.3%
distribute-lft-neg-out92.3%
distribute-rgt-neg-in92.3%
neg-mul-192.3%
times-frac91.8%
associate-*r/92.3%
distribute-frac-neg92.3%
distribute-neg-frac292.3%
metadata-eval92.3%
/-rgt-identity92.3%
metadata-eval92.3%
distribute-rgt-neg-out92.3%
distribute-lft-neg-out92.3%
*-commutative92.3%
cancel-sign-sub92.3%
*-commutative92.3%
Simplified94.7%
Taylor expanded in t around inf 80.2%
associate-*r/80.2%
*-commutative80.2%
*-commutative80.2%
associate-/l*79.8%
Simplified79.8%
Final simplification78.4%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* (/ -2.0 z) (/ x_m t))))
(*
x_s
(if (<= t -3.35e+84)
t_1
(if (<= t -3.8e-94)
(* 2.0 (/ (/ x_m z) y))
(if (or (<= t -3.5e-133) (not (<= t 1.4e+75)))
t_1
(/ 2.0 (* y (/ z x_m)))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (-2.0 / z) * (x_m / t);
double tmp;
if (t <= -3.35e+84) {
tmp = t_1;
} else if (t <= -3.8e-94) {
tmp = 2.0 * ((x_m / z) / y);
} else if ((t <= -3.5e-133) || !(t <= 1.4e+75)) {
tmp = t_1;
} else {
tmp = 2.0 / (y * (z / x_m));
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = ((-2.0d0) / z) * (x_m / t)
if (t <= (-3.35d+84)) then
tmp = t_1
else if (t <= (-3.8d-94)) then
tmp = 2.0d0 * ((x_m / z) / y)
else if ((t <= (-3.5d-133)) .or. (.not. (t <= 1.4d+75))) then
tmp = t_1
else
tmp = 2.0d0 / (y * (z / x_m))
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (-2.0 / z) * (x_m / t);
double tmp;
if (t <= -3.35e+84) {
tmp = t_1;
} else if (t <= -3.8e-94) {
tmp = 2.0 * ((x_m / z) / y);
} else if ((t <= -3.5e-133) || !(t <= 1.4e+75)) {
tmp = t_1;
} else {
tmp = 2.0 / (y * (z / x_m));
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = (-2.0 / z) * (x_m / t) tmp = 0 if t <= -3.35e+84: tmp = t_1 elif t <= -3.8e-94: tmp = 2.0 * ((x_m / z) / y) elif (t <= -3.5e-133) or not (t <= 1.4e+75): tmp = t_1 else: tmp = 2.0 / (y * (z / x_m)) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(-2.0 / z) * Float64(x_m / t)) tmp = 0.0 if (t <= -3.35e+84) tmp = t_1; elseif (t <= -3.8e-94) tmp = Float64(2.0 * Float64(Float64(x_m / z) / y)); elseif ((t <= -3.5e-133) || !(t <= 1.4e+75)) tmp = t_1; else tmp = Float64(2.0 / Float64(y * Float64(z / x_m))); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = (-2.0 / z) * (x_m / t); tmp = 0.0; if (t <= -3.35e+84) tmp = t_1; elseif (t <= -3.8e-94) tmp = 2.0 * ((x_m / z) / y); elseif ((t <= -3.5e-133) || ~((t <= 1.4e+75))) tmp = t_1; else tmp = 2.0 / (y * (z / x_m)); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(-2.0 / z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t, -3.35e+84], t$95$1, If[LessEqual[t, -3.8e-94], N[(2.0 * N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -3.5e-133], N[Not[LessEqual[t, 1.4e+75]], $MachinePrecision]], t$95$1, N[(2.0 / N[(y * N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{-2}{z} \cdot \frac{x\_m}{t}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -3.35 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-94}:\\
\;\;\;\;2 \cdot \frac{\frac{x\_m}{z}}{y}\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-133} \lor \neg \left(t \leq 1.4 \cdot 10^{+75}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{y \cdot \frac{z}{x\_m}}\\
\end{array}
\end{array}
\end{array}
if t < -3.3500000000000002e84 or -3.79999999999999999e-94 < t < -3.50000000000000003e-133 or 1.40000000000000006e75 < t Initial program 85.3%
remove-double-neg85.3%
distribute-rgt-out--88.4%
distribute-lft-neg-in88.4%
distribute-rgt-out--85.4%
remove-double-neg85.4%
distribute-lft-neg-out85.4%
distribute-rgt-neg-in85.4%
neg-mul-185.4%
times-frac85.4%
associate-*r/85.4%
distribute-frac-neg85.4%
distribute-neg-frac285.4%
metadata-eval85.4%
/-rgt-identity85.4%
metadata-eval85.4%
distribute-rgt-neg-out85.4%
distribute-lft-neg-out85.4%
*-commutative85.4%
cancel-sign-sub85.4%
*-commutative85.4%
Simplified88.4%
associate-/r*95.2%
Applied egg-rr95.2%
Taylor expanded in t around inf 79.9%
associate-*r/79.9%
*-commutative79.9%
*-commutative79.9%
times-frac85.2%
associate-*r/85.3%
*-commutative85.3%
associate-*r/85.3%
Simplified85.3%
associate-/l/79.9%
*-commutative79.9%
times-frac83.5%
Applied egg-rr83.5%
if -3.3500000000000002e84 < t < -3.79999999999999999e-94Initial program 94.2%
remove-double-neg94.2%
distribute-rgt-out--94.2%
distribute-lft-neg-in94.2%
distribute-rgt-out--94.2%
remove-double-neg94.2%
distribute-lft-neg-out94.2%
distribute-rgt-neg-in94.2%
neg-mul-194.2%
times-frac94.1%
associate-*r/94.2%
distribute-frac-neg94.2%
distribute-neg-frac294.2%
metadata-eval94.2%
/-rgt-identity94.2%
metadata-eval94.2%
distribute-rgt-neg-out94.2%
distribute-lft-neg-out94.2%
*-commutative94.2%
cancel-sign-sub94.2%
*-commutative94.2%
Simplified94.2%
associate-/r*95.8%
Applied egg-rr95.8%
Taylor expanded in t around 0 65.8%
*-commutative65.8%
associate-/r*70.3%
Simplified70.3%
if -3.50000000000000003e-133 < t < 1.40000000000000006e75Initial program 91.2%
remove-double-neg91.2%
distribute-rgt-out--91.3%
distribute-lft-neg-in91.3%
distribute-rgt-out--88.7%
remove-double-neg88.7%
distribute-lft-neg-out88.7%
distribute-rgt-neg-in88.7%
neg-mul-188.7%
times-frac88.1%
associate-*r/88.7%
distribute-frac-neg88.7%
distribute-neg-frac288.7%
metadata-eval88.7%
/-rgt-identity88.7%
metadata-eval88.7%
distribute-rgt-neg-out88.7%
distribute-lft-neg-out88.7%
*-commutative88.7%
cancel-sign-sub88.7%
*-commutative88.7%
Simplified91.3%
associate-/r*92.1%
Applied egg-rr92.1%
Taylor expanded in t around 0 72.1%
*-commutative72.1%
associate-/r*75.6%
Simplified75.6%
*-commutative75.6%
associate-*l/75.6%
associate-*r/75.5%
clear-num75.0%
frac-times76.2%
metadata-eval76.2%
Applied egg-rr76.2%
Final simplification78.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* (/ -2.0 z) (/ x_m t))))
(*
x_s
(if (<= t -1.1e+92)
t_1
(if (<= t -1.8e-95)
(/ (/ 2.0 y) (/ z x_m))
(if (<= t -1.75e-126)
t_1
(if (<= t 1.3e+75)
(/ 2.0 (* y (/ z x_m)))
(/ (/ -2.0 z) (/ t x_m)))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (-2.0 / z) * (x_m / t);
double tmp;
if (t <= -1.1e+92) {
tmp = t_1;
} else if (t <= -1.8e-95) {
tmp = (2.0 / y) / (z / x_m);
} else if (t <= -1.75e-126) {
tmp = t_1;
} else if (t <= 1.3e+75) {
tmp = 2.0 / (y * (z / x_m));
} else {
tmp = (-2.0 / z) / (t / x_m);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = ((-2.0d0) / z) * (x_m / t)
if (t <= (-1.1d+92)) then
tmp = t_1
else if (t <= (-1.8d-95)) then
tmp = (2.0d0 / y) / (z / x_m)
else if (t <= (-1.75d-126)) then
tmp = t_1
else if (t <= 1.3d+75) then
tmp = 2.0d0 / (y * (z / x_m))
else
tmp = ((-2.0d0) / z) / (t / x_m)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (-2.0 / z) * (x_m / t);
double tmp;
if (t <= -1.1e+92) {
tmp = t_1;
} else if (t <= -1.8e-95) {
tmp = (2.0 / y) / (z / x_m);
} else if (t <= -1.75e-126) {
tmp = t_1;
} else if (t <= 1.3e+75) {
tmp = 2.0 / (y * (z / x_m));
} else {
tmp = (-2.0 / z) / (t / x_m);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = (-2.0 / z) * (x_m / t) tmp = 0 if t <= -1.1e+92: tmp = t_1 elif t <= -1.8e-95: tmp = (2.0 / y) / (z / x_m) elif t <= -1.75e-126: tmp = t_1 elif t <= 1.3e+75: tmp = 2.0 / (y * (z / x_m)) else: tmp = (-2.0 / z) / (t / x_m) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(-2.0 / z) * Float64(x_m / t)) tmp = 0.0 if (t <= -1.1e+92) tmp = t_1; elseif (t <= -1.8e-95) tmp = Float64(Float64(2.0 / y) / Float64(z / x_m)); elseif (t <= -1.75e-126) tmp = t_1; elseif (t <= 1.3e+75) tmp = Float64(2.0 / Float64(y * Float64(z / x_m))); else tmp = Float64(Float64(-2.0 / z) / Float64(t / x_m)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = (-2.0 / z) * (x_m / t); tmp = 0.0; if (t <= -1.1e+92) tmp = t_1; elseif (t <= -1.8e-95) tmp = (2.0 / y) / (z / x_m); elseif (t <= -1.75e-126) tmp = t_1; elseif (t <= 1.3e+75) tmp = 2.0 / (y * (z / x_m)); else tmp = (-2.0 / z) / (t / x_m); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(-2.0 / z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t, -1.1e+92], t$95$1, If[LessEqual[t, -1.8e-95], N[(N[(2.0 / y), $MachinePrecision] / N[(z / x$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.75e-126], t$95$1, If[LessEqual[t, 1.3e+75], N[(2.0 / N[(y * N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 / z), $MachinePrecision] / N[(t / x$95$m), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{-2}{z} \cdot \frac{x\_m}{t}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{-95}:\\
\;\;\;\;\frac{\frac{2}{y}}{\frac{z}{x\_m}}\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+75}:\\
\;\;\;\;\frac{2}{y \cdot \frac{z}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-2}{z}}{\frac{t}{x\_m}}\\
\end{array}
\end{array}
\end{array}
if t < -1.09999999999999996e92 or -1.8e-95 < t < -1.75e-126Initial program 87.0%
remove-double-neg87.0%
distribute-rgt-out--89.4%
distribute-lft-neg-in89.4%
distribute-rgt-out--87.2%
remove-double-neg87.2%
distribute-lft-neg-out87.2%
distribute-rgt-neg-in87.2%
neg-mul-187.2%
times-frac87.1%
associate-*r/87.2%
distribute-frac-neg87.2%
distribute-neg-frac287.2%
metadata-eval87.2%
/-rgt-identity87.2%
metadata-eval87.2%
distribute-rgt-neg-out87.2%
distribute-lft-neg-out87.2%
*-commutative87.2%
cancel-sign-sub87.2%
*-commutative87.2%
Simplified89.4%
associate-/r*95.4%
Applied egg-rr95.4%
Taylor expanded in t around inf 83.2%
associate-*r/83.3%
*-commutative83.3%
*-commutative83.3%
times-frac87.8%
associate-*r/87.9%
*-commutative87.9%
associate-*r/87.9%
Simplified87.9%
associate-/l/83.3%
*-commutative83.3%
times-frac88.4%
Applied egg-rr88.4%
if -1.09999999999999996e92 < t < -1.8e-95Initial program 91.7%
remove-double-neg91.7%
distribute-rgt-out--94.5%
distribute-lft-neg-in94.5%
distribute-rgt-out--91.7%
remove-double-neg91.7%
distribute-lft-neg-out91.7%
distribute-rgt-neg-in91.7%
neg-mul-191.7%
times-frac91.6%
associate-*r/91.7%
distribute-frac-neg91.7%
distribute-neg-frac291.7%
metadata-eval91.7%
/-rgt-identity91.7%
metadata-eval91.7%
distribute-rgt-neg-out91.7%
distribute-lft-neg-out91.7%
*-commutative91.7%
cancel-sign-sub91.7%
*-commutative91.7%
Simplified94.5%
associate-/r*96.1%
Applied egg-rr96.1%
Taylor expanded in t around 0 64.9%
*-commutative64.9%
associate-/r*69.1%
Simplified69.1%
*-commutative69.1%
associate-*l/69.1%
associate-*r/69.2%
clear-num69.2%
associate-*l/69.3%
*-un-lft-identity69.3%
Applied egg-rr69.3%
if -1.75e-126 < t < 1.29999999999999992e75Initial program 91.3%
remove-double-neg91.3%
distribute-rgt-out--91.3%
distribute-lft-neg-in91.3%
distribute-rgt-out--88.7%
remove-double-neg88.7%
distribute-lft-neg-out88.7%
distribute-rgt-neg-in88.7%
neg-mul-188.7%
times-frac88.2%
associate-*r/88.7%
distribute-frac-neg88.7%
distribute-neg-frac288.7%
metadata-eval88.7%
/-rgt-identity88.7%
metadata-eval88.7%
distribute-rgt-neg-out88.7%
distribute-lft-neg-out88.7%
*-commutative88.7%
cancel-sign-sub88.7%
*-commutative88.7%
Simplified91.3%
associate-/r*91.4%
Applied egg-rr91.4%
Taylor expanded in t around 0 72.3%
*-commutative72.3%
associate-/r*75.0%
Simplified75.0%
*-commutative75.0%
associate-*l/75.0%
associate-*r/74.9%
clear-num74.4%
frac-times75.6%
metadata-eval75.6%
Applied egg-rr75.6%
if 1.29999999999999992e75 < t Initial program 85.0%
remove-double-neg85.0%
distribute-rgt-out--87.0%
distribute-lft-neg-in87.0%
distribute-rgt-out--85.0%
remove-double-neg85.0%
distribute-lft-neg-out85.0%
distribute-rgt-neg-in85.0%
neg-mul-185.0%
times-frac85.0%
associate-*r/85.0%
distribute-frac-neg85.0%
distribute-neg-frac285.0%
metadata-eval85.0%
/-rgt-identity85.0%
metadata-eval85.0%
distribute-rgt-neg-out85.0%
distribute-lft-neg-out85.0%
*-commutative85.0%
cancel-sign-sub85.0%
*-commutative85.0%
Simplified87.0%
Taylor expanded in t around inf 79.6%
associate-*r/79.6%
*-commutative79.6%
*-commutative79.6%
associate-/l*79.6%
Simplified79.6%
associate-*r/79.6%
clear-num78.3%
*-commutative78.3%
times-frac82.2%
div-inv82.2%
metadata-eval82.2%
Applied egg-rr82.2%
associate-/r*82.4%
*-commutative82.4%
associate-/r*82.4%
metadata-eval82.4%
Simplified82.4%
Final simplification78.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* (/ -2.0 z) (/ x_m t))))
(*
x_s
(if (<= t -6.3e+84)
t_1
(if (<= t -3.8e-94)
(* 2.0 (/ (/ x_m z) y))
(if (<= t -3.5e-133)
t_1
(if (<= t 2.8e+75)
(/ 2.0 (* y (/ z x_m)))
(/ (/ -2.0 z) (/ t x_m)))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (-2.0 / z) * (x_m / t);
double tmp;
if (t <= -6.3e+84) {
tmp = t_1;
} else if (t <= -3.8e-94) {
tmp = 2.0 * ((x_m / z) / y);
} else if (t <= -3.5e-133) {
tmp = t_1;
} else if (t <= 2.8e+75) {
tmp = 2.0 / (y * (z / x_m));
} else {
tmp = (-2.0 / z) / (t / x_m);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = ((-2.0d0) / z) * (x_m / t)
if (t <= (-6.3d+84)) then
tmp = t_1
else if (t <= (-3.8d-94)) then
tmp = 2.0d0 * ((x_m / z) / y)
else if (t <= (-3.5d-133)) then
tmp = t_1
else if (t <= 2.8d+75) then
tmp = 2.0d0 / (y * (z / x_m))
else
tmp = ((-2.0d0) / z) / (t / x_m)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (-2.0 / z) * (x_m / t);
double tmp;
if (t <= -6.3e+84) {
tmp = t_1;
} else if (t <= -3.8e-94) {
tmp = 2.0 * ((x_m / z) / y);
} else if (t <= -3.5e-133) {
tmp = t_1;
} else if (t <= 2.8e+75) {
tmp = 2.0 / (y * (z / x_m));
} else {
tmp = (-2.0 / z) / (t / x_m);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = (-2.0 / z) * (x_m / t) tmp = 0 if t <= -6.3e+84: tmp = t_1 elif t <= -3.8e-94: tmp = 2.0 * ((x_m / z) / y) elif t <= -3.5e-133: tmp = t_1 elif t <= 2.8e+75: tmp = 2.0 / (y * (z / x_m)) else: tmp = (-2.0 / z) / (t / x_m) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(-2.0 / z) * Float64(x_m / t)) tmp = 0.0 if (t <= -6.3e+84) tmp = t_1; elseif (t <= -3.8e-94) tmp = Float64(2.0 * Float64(Float64(x_m / z) / y)); elseif (t <= -3.5e-133) tmp = t_1; elseif (t <= 2.8e+75) tmp = Float64(2.0 / Float64(y * Float64(z / x_m))); else tmp = Float64(Float64(-2.0 / z) / Float64(t / x_m)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = (-2.0 / z) * (x_m / t); tmp = 0.0; if (t <= -6.3e+84) tmp = t_1; elseif (t <= -3.8e-94) tmp = 2.0 * ((x_m / z) / y); elseif (t <= -3.5e-133) tmp = t_1; elseif (t <= 2.8e+75) tmp = 2.0 / (y * (z / x_m)); else tmp = (-2.0 / z) / (t / x_m); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(-2.0 / z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t, -6.3e+84], t$95$1, If[LessEqual[t, -3.8e-94], N[(2.0 * N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.5e-133], t$95$1, If[LessEqual[t, 2.8e+75], N[(2.0 / N[(y * N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 / z), $MachinePrecision] / N[(t / x$95$m), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{-2}{z} \cdot \frac{x\_m}{t}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -6.3 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-94}:\\
\;\;\;\;2 \cdot \frac{\frac{x\_m}{z}}{y}\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+75}:\\
\;\;\;\;\frac{2}{y \cdot \frac{z}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-2}{z}}{\frac{t}{x\_m}}\\
\end{array}
\end{array}
\end{array}
if t < -6.30000000000000013e84 or -3.79999999999999999e-94 < t < -3.50000000000000003e-133Initial program 85.7%
remove-double-neg85.7%
distribute-rgt-out--90.1%
distribute-lft-neg-in90.1%
distribute-rgt-out--85.9%
remove-double-neg85.9%
distribute-lft-neg-out85.9%
distribute-rgt-neg-in85.9%
neg-mul-185.9%
times-frac85.8%
associate-*r/85.9%
distribute-frac-neg85.9%
distribute-neg-frac285.9%
metadata-eval85.9%
/-rgt-identity85.9%
metadata-eval85.9%
distribute-rgt-neg-out85.9%
distribute-lft-neg-out85.9%
*-commutative85.9%
cancel-sign-sub85.9%
*-commutative85.9%
Simplified90.1%
associate-/r*93.7%
Applied egg-rr93.7%
Taylor expanded in t around inf 80.2%
associate-*r/80.3%
*-commutative80.3%
*-commutative80.3%
times-frac84.5%
associate-*r/84.6%
*-commutative84.6%
associate-*r/84.6%
Simplified84.6%
associate-/l/80.3%
*-commutative80.3%
times-frac85.1%
Applied egg-rr85.1%
if -6.30000000000000013e84 < t < -3.79999999999999999e-94Initial program 94.2%
remove-double-neg94.2%
distribute-rgt-out--94.2%
distribute-lft-neg-in94.2%
distribute-rgt-out--94.2%
remove-double-neg94.2%
distribute-lft-neg-out94.2%
distribute-rgt-neg-in94.2%
neg-mul-194.2%
times-frac94.1%
associate-*r/94.2%
distribute-frac-neg94.2%
distribute-neg-frac294.2%
metadata-eval94.2%
/-rgt-identity94.2%
metadata-eval94.2%
distribute-rgt-neg-out94.2%
distribute-lft-neg-out94.2%
*-commutative94.2%
cancel-sign-sub94.2%
*-commutative94.2%
Simplified94.2%
associate-/r*95.8%
Applied egg-rr95.8%
Taylor expanded in t around 0 65.8%
*-commutative65.8%
associate-/r*70.3%
Simplified70.3%
if -3.50000000000000003e-133 < t < 2.80000000000000012e75Initial program 91.2%
remove-double-neg91.2%
distribute-rgt-out--91.3%
distribute-lft-neg-in91.3%
distribute-rgt-out--88.7%
remove-double-neg88.7%
distribute-lft-neg-out88.7%
distribute-rgt-neg-in88.7%
neg-mul-188.7%
times-frac88.1%
associate-*r/88.7%
distribute-frac-neg88.7%
distribute-neg-frac288.7%
metadata-eval88.7%
/-rgt-identity88.7%
metadata-eval88.7%
distribute-rgt-neg-out88.7%
distribute-lft-neg-out88.7%
*-commutative88.7%
cancel-sign-sub88.7%
*-commutative88.7%
Simplified91.3%
associate-/r*92.1%
Applied egg-rr92.1%
Taylor expanded in t around 0 72.1%
*-commutative72.1%
associate-/r*75.6%
Simplified75.6%
*-commutative75.6%
associate-*l/75.6%
associate-*r/75.5%
clear-num75.0%
frac-times76.2%
metadata-eval76.2%
Applied egg-rr76.2%
if 2.80000000000000012e75 < t Initial program 85.0%
remove-double-neg85.0%
distribute-rgt-out--87.0%
distribute-lft-neg-in87.0%
distribute-rgt-out--85.0%
remove-double-neg85.0%
distribute-lft-neg-out85.0%
distribute-rgt-neg-in85.0%
neg-mul-185.0%
times-frac85.0%
associate-*r/85.0%
distribute-frac-neg85.0%
distribute-neg-frac285.0%
metadata-eval85.0%
/-rgt-identity85.0%
metadata-eval85.0%
distribute-rgt-neg-out85.0%
distribute-lft-neg-out85.0%
*-commutative85.0%
cancel-sign-sub85.0%
*-commutative85.0%
Simplified87.0%
Taylor expanded in t around inf 79.6%
associate-*r/79.6%
*-commutative79.6%
*-commutative79.6%
associate-/l*79.6%
Simplified79.6%
associate-*r/79.6%
clear-num78.3%
*-commutative78.3%
times-frac82.2%
div-inv82.2%
metadata-eval82.2%
Applied egg-rr82.2%
associate-/r*82.4%
*-commutative82.4%
associate-/r*82.4%
metadata-eval82.4%
Simplified82.4%
Final simplification78.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (/ (/ -2.0 z) t))) (t_2 (* 2.0 (/ (/ x_m z) y))))
(*
x_s
(if (<= y -5.4e+99)
t_2
(if (<= y -9.5e+51)
t_1
(if (<= y -8e-35)
t_2
(if (<= y 1.56e-55) t_1 (* (/ 2.0 z) (/ x_m y)))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = x_m * ((-2.0 / z) / t);
double t_2 = 2.0 * ((x_m / z) / y);
double tmp;
if (y <= -5.4e+99) {
tmp = t_2;
} else if (y <= -9.5e+51) {
tmp = t_1;
} else if (y <= -8e-35) {
tmp = t_2;
} else if (y <= 1.56e-55) {
tmp = t_1;
} else {
tmp = (2.0 / z) * (x_m / y);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x_m * (((-2.0d0) / z) / t)
t_2 = 2.0d0 * ((x_m / z) / y)
if (y <= (-5.4d+99)) then
tmp = t_2
else if (y <= (-9.5d+51)) then
tmp = t_1
else if (y <= (-8d-35)) then
tmp = t_2
else if (y <= 1.56d-55) then
tmp = t_1
else
tmp = (2.0d0 / z) * (x_m / y)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = x_m * ((-2.0 / z) / t);
double t_2 = 2.0 * ((x_m / z) / y);
double tmp;
if (y <= -5.4e+99) {
tmp = t_2;
} else if (y <= -9.5e+51) {
tmp = t_1;
} else if (y <= -8e-35) {
tmp = t_2;
} else if (y <= 1.56e-55) {
tmp = t_1;
} else {
tmp = (2.0 / z) * (x_m / y);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = x_m * ((-2.0 / z) / t) t_2 = 2.0 * ((x_m / z) / y) tmp = 0 if y <= -5.4e+99: tmp = t_2 elif y <= -9.5e+51: tmp = t_1 elif y <= -8e-35: tmp = t_2 elif y <= 1.56e-55: tmp = t_1 else: tmp = (2.0 / z) * (x_m / y) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(x_m * Float64(Float64(-2.0 / z) / t)) t_2 = Float64(2.0 * Float64(Float64(x_m / z) / y)) tmp = 0.0 if (y <= -5.4e+99) tmp = t_2; elseif (y <= -9.5e+51) tmp = t_1; elseif (y <= -8e-35) tmp = t_2; elseif (y <= 1.56e-55) tmp = t_1; else tmp = Float64(Float64(2.0 / z) * Float64(x_m / y)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = x_m * ((-2.0 / z) / t); t_2 = 2.0 * ((x_m / z) / y); tmp = 0.0; if (y <= -5.4e+99) tmp = t_2; elseif (y <= -9.5e+51) tmp = t_1; elseif (y <= -8e-35) tmp = t_2; elseif (y <= 1.56e-55) tmp = t_1; else tmp = (2.0 / z) * (x_m / y); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(x$95$m * N[(N[(-2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -5.4e+99], t$95$2, If[LessEqual[y, -9.5e+51], t$95$1, If[LessEqual[y, -8e-35], t$95$2, If[LessEqual[y, 1.56e-55], t$95$1, N[(N[(2.0 / z), $MachinePrecision] * N[(x$95$m / y), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := x\_m \cdot \frac{\frac{-2}{z}}{t}\\
t_2 := 2 \cdot \frac{\frac{x\_m}{z}}{y}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+99}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-35}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.56 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{z} \cdot \frac{x\_m}{y}\\
\end{array}
\end{array}
\end{array}
if y < -5.39999999999999978e99 or -9.4999999999999999e51 < y < -8.00000000000000006e-35Initial program 85.3%
remove-double-neg85.3%
distribute-rgt-out--86.9%
distribute-lft-neg-in86.9%
distribute-rgt-out--85.3%
remove-double-neg85.3%
distribute-lft-neg-out85.3%
distribute-rgt-neg-in85.3%
neg-mul-185.3%
times-frac85.2%
associate-*r/85.3%
distribute-frac-neg85.3%
distribute-neg-frac285.3%
metadata-eval85.3%
/-rgt-identity85.3%
metadata-eval85.3%
distribute-rgt-neg-out85.3%
distribute-lft-neg-out85.3%
*-commutative85.3%
cancel-sign-sub85.3%
*-commutative85.3%
Simplified86.9%
associate-/r*96.8%
Applied egg-rr96.8%
Taylor expanded in t around 0 78.9%
*-commutative78.9%
associate-/r*87.7%
Simplified87.7%
if -5.39999999999999978e99 < y < -9.4999999999999999e51 or -8.00000000000000006e-35 < y < 1.56e-55Initial program 93.8%
remove-double-neg93.8%
distribute-rgt-out--94.7%
distribute-lft-neg-in94.7%
distribute-rgt-out--92.3%
remove-double-neg92.3%
distribute-lft-neg-out92.3%
distribute-rgt-neg-in92.3%
neg-mul-192.3%
times-frac91.8%
associate-*r/92.3%
distribute-frac-neg92.3%
distribute-neg-frac292.3%
metadata-eval92.3%
/-rgt-identity92.3%
metadata-eval92.3%
distribute-rgt-neg-out92.3%
distribute-lft-neg-out92.3%
*-commutative92.3%
cancel-sign-sub92.3%
*-commutative92.3%
Simplified94.7%
Taylor expanded in t around inf 80.2%
associate-*r/80.2%
*-commutative80.2%
*-commutative80.2%
associate-/l*79.8%
Simplified79.8%
associate-/r*80.1%
Applied egg-rr80.1%
if 1.56e-55 < y Initial program 84.6%
remove-double-neg84.6%
distribute-rgt-out--86.3%
distribute-lft-neg-in86.3%
distribute-rgt-out--83.1%
remove-double-neg83.1%
distribute-lft-neg-out83.1%
distribute-rgt-neg-in83.1%
neg-mul-183.1%
times-frac82.9%
associate-*r/83.1%
distribute-frac-neg83.1%
distribute-neg-frac283.1%
metadata-eval83.1%
/-rgt-identity83.1%
metadata-eval83.1%
distribute-rgt-neg-out83.1%
distribute-lft-neg-out83.1%
*-commutative83.1%
cancel-sign-sub83.1%
*-commutative83.1%
Simplified86.3%
Taylor expanded in t around 0 66.2%
associate-*r/66.2%
*-commutative66.2%
times-frac67.5%
Simplified67.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= (* x_m 2.0) 5e-88)
(/ (* x_m -2.0) (* z (- t y)))
(* (/ x_m (- t y)) (/ -2.0 z)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((x_m * 2.0) <= 5e-88) {
tmp = (x_m * -2.0) / (z * (t - y));
} else {
tmp = (x_m / (t - y)) * (-2.0 / z);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x_m * 2.0d0) <= 5d-88) then
tmp = (x_m * (-2.0d0)) / (z * (t - y))
else
tmp = (x_m / (t - y)) * ((-2.0d0) / z)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((x_m * 2.0) <= 5e-88) {
tmp = (x_m * -2.0) / (z * (t - y));
} else {
tmp = (x_m / (t - y)) * (-2.0 / z);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (x_m * 2.0) <= 5e-88: tmp = (x_m * -2.0) / (z * (t - y)) else: tmp = (x_m / (t - y)) * (-2.0 / z) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (Float64(x_m * 2.0) <= 5e-88) tmp = Float64(Float64(x_m * -2.0) / Float64(z * Float64(t - y))); else tmp = Float64(Float64(x_m / Float64(t - y)) * Float64(-2.0 / z)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((x_m * 2.0) <= 5e-88) tmp = (x_m * -2.0) / (z * (t - y)); else tmp = (x_m / (t - y)) * (-2.0 / z); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[N[(x$95$m * 2.0), $MachinePrecision], 5e-88], N[(N[(x$95$m * -2.0), $MachinePrecision] / N[(z * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(t - y), $MachinePrecision]), $MachinePrecision] * N[(-2.0 / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \cdot 2 \leq 5 \cdot 10^{-88}:\\
\;\;\;\;\frac{x\_m \cdot -2}{z \cdot \left(t - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{t - y} \cdot \frac{-2}{z}\\
\end{array}
\end{array}
if (*.f64 x #s(literal 2 binary64)) < 5.00000000000000009e-88Initial program 88.6%
remove-double-neg88.6%
distribute-rgt-out--89.8%
distribute-lft-neg-in89.8%
distribute-rgt-out--88.6%
remove-double-neg88.6%
distribute-lft-neg-out88.6%
distribute-rgt-neg-in88.6%
neg-mul-188.6%
times-frac88.5%
associate-*r/88.6%
distribute-frac-neg88.6%
distribute-neg-frac288.6%
metadata-eval88.6%
/-rgt-identity88.6%
metadata-eval88.6%
distribute-rgt-neg-out88.6%
distribute-lft-neg-out88.6%
*-commutative88.6%
cancel-sign-sub88.6%
*-commutative88.6%
Simplified89.8%
if 5.00000000000000009e-88 < (*.f64 x #s(literal 2 binary64)) Initial program 90.1%
remove-double-neg90.1%
distribute-rgt-out--91.5%
distribute-lft-neg-in91.5%
distribute-rgt-out--87.1%
remove-double-neg87.1%
distribute-lft-neg-out87.1%
distribute-rgt-neg-in87.1%
neg-mul-187.1%
times-frac86.5%
associate-*r/87.1%
distribute-frac-neg87.1%
distribute-neg-frac287.1%
metadata-eval87.1%
/-rgt-identity87.1%
metadata-eval87.1%
distribute-rgt-neg-out87.1%
distribute-lft-neg-out87.1%
*-commutative87.1%
cancel-sign-sub87.1%
*-commutative87.1%
Simplified91.5%
*-commutative91.5%
times-frac98.6%
Applied egg-rr98.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= (* x_m 2.0) 1e-69)
(* x_m (/ (/ 2.0 z) (- y t)))
(* (/ x_m (- t y)) (/ -2.0 z)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((x_m * 2.0) <= 1e-69) {
tmp = x_m * ((2.0 / z) / (y - t));
} else {
tmp = (x_m / (t - y)) * (-2.0 / z);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x_m * 2.0d0) <= 1d-69) then
tmp = x_m * ((2.0d0 / z) / (y - t))
else
tmp = (x_m / (t - y)) * ((-2.0d0) / z)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((x_m * 2.0) <= 1e-69) {
tmp = x_m * ((2.0 / z) / (y - t));
} else {
tmp = (x_m / (t - y)) * (-2.0 / z);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (x_m * 2.0) <= 1e-69: tmp = x_m * ((2.0 / z) / (y - t)) else: tmp = (x_m / (t - y)) * (-2.0 / z) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (Float64(x_m * 2.0) <= 1e-69) tmp = Float64(x_m * Float64(Float64(2.0 / z) / Float64(y - t))); else tmp = Float64(Float64(x_m / Float64(t - y)) * Float64(-2.0 / z)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((x_m * 2.0) <= 1e-69) tmp = x_m * ((2.0 / z) / (y - t)); else tmp = (x_m / (t - y)) * (-2.0 / z); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[N[(x$95$m * 2.0), $MachinePrecision], 1e-69], N[(x$95$m * N[(N[(2.0 / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(t - y), $MachinePrecision]), $MachinePrecision] * N[(-2.0 / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \cdot 2 \leq 10^{-69}:\\
\;\;\;\;x\_m \cdot \frac{\frac{2}{z}}{y - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{t - y} \cdot \frac{-2}{z}\\
\end{array}
\end{array}
if (*.f64 x #s(literal 2 binary64)) < 9.9999999999999996e-70Initial program 88.9%
associate-/l*88.8%
*-commutative88.8%
distribute-rgt-out--90.0%
associate-/r*90.4%
Applied egg-rr90.4%
if 9.9999999999999996e-70 < (*.f64 x #s(literal 2 binary64)) Initial program 89.6%
remove-double-neg89.6%
distribute-rgt-out--91.0%
distribute-lft-neg-in91.0%
distribute-rgt-out--86.4%
remove-double-neg86.4%
distribute-lft-neg-out86.4%
distribute-rgt-neg-in86.4%
neg-mul-186.4%
times-frac85.8%
associate-*r/86.4%
distribute-frac-neg86.4%
distribute-neg-frac286.4%
metadata-eval86.4%
/-rgt-identity86.4%
metadata-eval86.4%
distribute-rgt-neg-out86.4%
distribute-lft-neg-out86.4%
*-commutative86.4%
cancel-sign-sub86.4%
*-commutative86.4%
Simplified91.0%
*-commutative91.0%
times-frac98.5%
Applied egg-rr98.5%
Final simplification93.3%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (* (/ x_m (- t y)) (/ -2.0 z))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
return x_s * ((x_m / (t - y)) * (-2.0 / z));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x_s * ((x_m / (t - y)) * ((-2.0d0) / z))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
return x_s * ((x_m / (t - y)) * (-2.0 / z));
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): return x_s * ((x_m / (t - y)) * (-2.0 / z))
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) return Float64(x_s * Float64(Float64(x_m / Float64(t - y)) * Float64(-2.0 / z))) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y, z, t) tmp = x_s * ((x_m / (t - y)) * (-2.0 / z)); end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * N[(N[(x$95$m / N[(t - y), $MachinePrecision]), $MachinePrecision] * N[(-2.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \left(\frac{x\_m}{t - y} \cdot \frac{-2}{z}\right)
\end{array}
Initial program 89.2%
remove-double-neg89.2%
distribute-rgt-out--90.4%
distribute-lft-neg-in90.4%
distribute-rgt-out--88.0%
remove-double-neg88.0%
distribute-lft-neg-out88.0%
distribute-rgt-neg-in88.0%
neg-mul-188.0%
times-frac87.8%
associate-*r/88.0%
distribute-frac-neg88.0%
distribute-neg-frac288.0%
metadata-eval88.0%
/-rgt-identity88.0%
metadata-eval88.0%
distribute-rgt-neg-out88.0%
distribute-lft-neg-out88.0%
*-commutative88.0%
cancel-sign-sub88.0%
*-commutative88.0%
Simplified90.4%
*-commutative90.4%
times-frac92.4%
Applied egg-rr92.4%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (* 2.0 (/ (/ x_m z) y))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
return x_s * (2.0 * ((x_m / z) / y));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x_s * (2.0d0 * ((x_m / z) / y))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
return x_s * (2.0 * ((x_m / z) / y));
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): return x_s * (2.0 * ((x_m / z) / y))
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) return Float64(x_s * Float64(2.0 * Float64(Float64(x_m / z) / y))) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y, z, t) tmp = x_s * (2.0 * ((x_m / z) / y)); end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * N[(2.0 * N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \left(2 \cdot \frac{\frac{x\_m}{z}}{y}\right)
\end{array}
Initial program 89.2%
remove-double-neg89.2%
distribute-rgt-out--90.4%
distribute-lft-neg-in90.4%
distribute-rgt-out--88.0%
remove-double-neg88.0%
distribute-lft-neg-out88.0%
distribute-rgt-neg-in88.0%
neg-mul-188.0%
times-frac87.8%
associate-*r/88.0%
distribute-frac-neg88.0%
distribute-neg-frac288.0%
metadata-eval88.0%
/-rgt-identity88.0%
metadata-eval88.0%
distribute-rgt-neg-out88.0%
distribute-lft-neg-out88.0%
*-commutative88.0%
cancel-sign-sub88.0%
*-commutative88.0%
Simplified90.4%
associate-/r*93.9%
Applied egg-rr93.9%
Taylor expanded in t around 0 50.2%
*-commutative50.2%
associate-/r*53.2%
Simplified53.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ x (* (- y t) z)) 2.0))
(t_2 (/ (* x 2.0) (- (* y z) (* t z)))))
(if (< t_2 -2.559141628295061e-13)
t_1
(if (< t_2 1.045027827330126e-269) (/ (* (/ x z) 2.0) (- y t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x / ((y - t) * z)) * 2.0;
double t_2 = (x * 2.0) / ((y * z) - (t * z));
double tmp;
if (t_2 < -2.559141628295061e-13) {
tmp = t_1;
} else if (t_2 < 1.045027827330126e-269) {
tmp = ((x / z) * 2.0) / (y - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x / ((y - t) * z)) * 2.0d0
t_2 = (x * 2.0d0) / ((y * z) - (t * z))
if (t_2 < (-2.559141628295061d-13)) then
tmp = t_1
else if (t_2 < 1.045027827330126d-269) then
tmp = ((x / z) * 2.0d0) / (y - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / ((y - t) * z)) * 2.0;
double t_2 = (x * 2.0) / ((y * z) - (t * z));
double tmp;
if (t_2 < -2.559141628295061e-13) {
tmp = t_1;
} else if (t_2 < 1.045027827330126e-269) {
tmp = ((x / z) * 2.0) / (y - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / ((y - t) * z)) * 2.0 t_2 = (x * 2.0) / ((y * z) - (t * z)) tmp = 0 if t_2 < -2.559141628295061e-13: tmp = t_1 elif t_2 < 1.045027827330126e-269: tmp = ((x / z) * 2.0) / (y - t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / Float64(Float64(y - t) * z)) * 2.0) t_2 = Float64(Float64(x * 2.0) / Float64(Float64(y * z) - Float64(t * z))) tmp = 0.0 if (t_2 < -2.559141628295061e-13) tmp = t_1; elseif (t_2 < 1.045027827330126e-269) tmp = Float64(Float64(Float64(x / z) * 2.0) / Float64(y - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / ((y - t) * z)) * 2.0; t_2 = (x * 2.0) / ((y * z) - (t * z)); tmp = 0.0; if (t_2 < -2.559141628295061e-13) tmp = t_1; elseif (t_2 < 1.045027827330126e-269) tmp = ((x / z) * 2.0) / (y - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / N[(N[(y - t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 2.0), $MachinePrecision] / N[(N[(y * z), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -2.559141628295061e-13], t$95$1, If[Less[t$95$2, 1.045027827330126e-269], N[(N[(N[(x / z), $MachinePrecision] * 2.0), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - t\right) \cdot z} \cdot 2\\
t_2 := \frac{x \cdot 2}{y \cdot z - t \cdot z}\\
\mathbf{if}\;t\_2 < -2.559141628295061 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.045027827330126 \cdot 10^{-269}:\\
\;\;\;\;\frac{\frac{x}{z} \cdot 2}{y - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024096
(FPCore (x y z t)
:name "Linear.Projection:infinitePerspective from linear-1.19.1.3, A"
:precision binary64
:alt
(if (< (/ (* x 2.0) (- (* y z) (* t z))) -2.559141628295061e-13) (* (/ x (* (- y t) z)) 2.0) (if (< (/ (* x 2.0) (- (* y z) (* t z))) 1.045027827330126e-269) (/ (* (/ x z) 2.0) (- y t)) (* (/ x (* (- y t) z)) 2.0)))
(/ (* x 2.0) (- (* y z) (* t z))))