
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (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 * (y - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (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 * (y - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= x_m 3.6e-16)
(/ (* x_m (- y z)) (- t z))
(* (- y z) (/ x_m (- t 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 <= 3.6e-16) {
tmp = (x_m * (y - z)) / (t - z);
} else {
tmp = (y - z) * (x_m / (t - 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 <= 3.6d-16) then
tmp = (x_m * (y - z)) / (t - z)
else
tmp = (y - z) * (x_m / (t - 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 <= 3.6e-16) {
tmp = (x_m * (y - z)) / (t - z);
} else {
tmp = (y - z) * (x_m / (t - 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 <= 3.6e-16: tmp = (x_m * (y - z)) / (t - z) else: tmp = (y - z) * (x_m / (t - 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 (x_m <= 3.6e-16) tmp = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z)); else tmp = Float64(Float64(y - z) * Float64(x_m / Float64(t - 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 <= 3.6e-16) tmp = (x_m * (y - z)) / (t - z); else tmp = (y - z) * (x_m / (t - 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[x$95$m, 3.6e-16], N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / N[(t - z), $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}\;x_m \leq 3.6 \cdot 10^{-16}:\\
\;\;\;\;\frac{x_m \cdot \left(y - z\right)}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x_m}{t - z}\\
\end{array}
\end{array}
if x < 3.59999999999999983e-16Initial program 85.9%
if 3.59999999999999983e-16 < x Initial program 79.5%
associate-*l/96.5%
Simplified96.5%
Final simplification88.4%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (+ 1.0 (/ t z)))) (t_2 (* x_m (/ (- y) z))))
(*
x_s
(if (<= z -1.15e+151)
x_m
(if (<= z -1.2e+104)
t_2
(if (<= z -2.8e+61)
t_1
(if (<= z -5.5e-51)
(/ (- x_m) (/ t z))
(if (<= z 7e-7) (/ (* x_m y) t) (if (<= z 4e+82) t_2 t_1)))))))))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 * (1.0 + (t / z));
double t_2 = x_m * (-y / z);
double tmp;
if (z <= -1.15e+151) {
tmp = x_m;
} else if (z <= -1.2e+104) {
tmp = t_2;
} else if (z <= -2.8e+61) {
tmp = t_1;
} else if (z <= -5.5e-51) {
tmp = -x_m / (t / z);
} else if (z <= 7e-7) {
tmp = (x_m * y) / t;
} else if (z <= 4e+82) {
tmp = t_2;
} else {
tmp = t_1;
}
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 * (1.0d0 + (t / z))
t_2 = x_m * (-y / z)
if (z <= (-1.15d+151)) then
tmp = x_m
else if (z <= (-1.2d+104)) then
tmp = t_2
else if (z <= (-2.8d+61)) then
tmp = t_1
else if (z <= (-5.5d-51)) then
tmp = -x_m / (t / z)
else if (z <= 7d-7) then
tmp = (x_m * y) / t
else if (z <= 4d+82) then
tmp = t_2
else
tmp = t_1
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 * (1.0 + (t / z));
double t_2 = x_m * (-y / z);
double tmp;
if (z <= -1.15e+151) {
tmp = x_m;
} else if (z <= -1.2e+104) {
tmp = t_2;
} else if (z <= -2.8e+61) {
tmp = t_1;
} else if (z <= -5.5e-51) {
tmp = -x_m / (t / z);
} else if (z <= 7e-7) {
tmp = (x_m * y) / t;
} else if (z <= 4e+82) {
tmp = t_2;
} else {
tmp = t_1;
}
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 * (1.0 + (t / z)) t_2 = x_m * (-y / z) tmp = 0 if z <= -1.15e+151: tmp = x_m elif z <= -1.2e+104: tmp = t_2 elif z <= -2.8e+61: tmp = t_1 elif z <= -5.5e-51: tmp = -x_m / (t / z) elif z <= 7e-7: tmp = (x_m * y) / t elif z <= 4e+82: tmp = t_2 else: tmp = t_1 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(1.0 + Float64(t / z))) t_2 = Float64(x_m * Float64(Float64(-y) / z)) tmp = 0.0 if (z <= -1.15e+151) tmp = x_m; elseif (z <= -1.2e+104) tmp = t_2; elseif (z <= -2.8e+61) tmp = t_1; elseif (z <= -5.5e-51) tmp = Float64(Float64(-x_m) / Float64(t / z)); elseif (z <= 7e-7) tmp = Float64(Float64(x_m * y) / t); elseif (z <= 4e+82) tmp = t_2; else tmp = t_1; 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 * (1.0 + (t / z)); t_2 = x_m * (-y / z); tmp = 0.0; if (z <= -1.15e+151) tmp = x_m; elseif (z <= -1.2e+104) tmp = t_2; elseif (z <= -2.8e+61) tmp = t_1; elseif (z <= -5.5e-51) tmp = -x_m / (t / z); elseif (z <= 7e-7) tmp = (x_m * y) / t; elseif (z <= 4e+82) tmp = t_2; else tmp = t_1; 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[(1.0 + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$95$m * N[((-y) / z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.15e+151], x$95$m, If[LessEqual[z, -1.2e+104], t$95$2, If[LessEqual[z, -2.8e+61], t$95$1, If[LessEqual[z, -5.5e-51], N[((-x$95$m) / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-7], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 4e+82], t$95$2, t$95$1]]]]]]), $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 \left(1 + \frac{t}{z}\right)\\
t_2 := x_m \cdot \frac{-y}{z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+151}:\\
\;\;\;\;x_m\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{+104}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-51}:\\
\;\;\;\;\frac{-x_m}{\frac{t}{z}}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-7}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+82}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if z < -1.15e151Initial program 59.8%
*-commutative59.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 70.1%
if -1.15e151 < z < -1.2e104 or 6.99999999999999968e-7 < z < 3.9999999999999999e82Initial program 85.1%
*-commutative85.1%
associate-*l/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in t around 0 66.2%
mul-1-neg66.2%
div-sub66.2%
sub-neg66.2%
*-inverses66.2%
metadata-eval66.2%
Simplified66.2%
Taylor expanded in y around inf 47.6%
mul-1-neg47.6%
associate-*r/54.6%
*-commutative54.6%
distribute-rgt-neg-in54.6%
Simplified54.6%
if -1.2e104 < z < -2.8000000000000001e61 or 3.9999999999999999e82 < z Initial program 75.3%
*-commutative75.3%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 60.5%
mul-1-neg60.5%
associate-/l*80.5%
distribute-neg-frac80.5%
div-sub80.5%
*-inverses80.5%
Simplified80.5%
Taylor expanded in t around 0 62.8%
*-lft-identity62.8%
associate-/l*64.9%
associate-/r/64.3%
distribute-rgt-in64.4%
Simplified64.4%
if -2.8000000000000001e61 < z < -5.4999999999999997e-51Initial program 94.8%
*-commutative94.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 65.4%
Taylor expanded in y around 0 55.9%
mul-1-neg55.9%
associate-/l*60.9%
distribute-neg-frac60.9%
Simplified60.9%
if -5.4999999999999997e-51 < z < 6.99999999999999968e-7Initial program 94.2%
*-commutative94.2%
associate-*l/90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in z around 0 66.9%
Final simplification65.0%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (/ (- y) z))))
(*
x_s
(if (<= z -1.85e+151)
x_m
(if (<= z -1.25e+104)
t_1
(if (<= z -2.6e+62)
x_m
(if (<= z -1.15e-51)
(* x_m (/ (- z) t))
(if (<= z 7e-6) (/ (* x_m y) t) (if (<= z 2e+80) t_1 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 = x_m * (-y / z);
double tmp;
if (z <= -1.85e+151) {
tmp = x_m;
} else if (z <= -1.25e+104) {
tmp = t_1;
} else if (z <= -2.6e+62) {
tmp = x_m;
} else if (z <= -1.15e-51) {
tmp = x_m * (-z / t);
} else if (z <= 7e-6) {
tmp = (x_m * y) / t;
} else if (z <= 2e+80) {
tmp = t_1;
} else {
tmp = 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 = x_m * (-y / z)
if (z <= (-1.85d+151)) then
tmp = x_m
else if (z <= (-1.25d+104)) then
tmp = t_1
else if (z <= (-2.6d+62)) then
tmp = x_m
else if (z <= (-1.15d-51)) then
tmp = x_m * (-z / t)
else if (z <= 7d-6) then
tmp = (x_m * y) / t
else if (z <= 2d+80) then
tmp = t_1
else
tmp = 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 = x_m * (-y / z);
double tmp;
if (z <= -1.85e+151) {
tmp = x_m;
} else if (z <= -1.25e+104) {
tmp = t_1;
} else if (z <= -2.6e+62) {
tmp = x_m;
} else if (z <= -1.15e-51) {
tmp = x_m * (-z / t);
} else if (z <= 7e-6) {
tmp = (x_m * y) / t;
} else if (z <= 2e+80) {
tmp = t_1;
} else {
tmp = 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 = x_m * (-y / z) tmp = 0 if z <= -1.85e+151: tmp = x_m elif z <= -1.25e+104: tmp = t_1 elif z <= -2.6e+62: tmp = x_m elif z <= -1.15e-51: tmp = x_m * (-z / t) elif z <= 7e-6: tmp = (x_m * y) / t elif z <= 2e+80: tmp = t_1 else: tmp = 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(x_m * Float64(Float64(-y) / z)) tmp = 0.0 if (z <= -1.85e+151) tmp = x_m; elseif (z <= -1.25e+104) tmp = t_1; elseif (z <= -2.6e+62) tmp = x_m; elseif (z <= -1.15e-51) tmp = Float64(x_m * Float64(Float64(-z) / t)); elseif (z <= 7e-6) tmp = Float64(Float64(x_m * y) / t); elseif (z <= 2e+80) tmp = t_1; else tmp = 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 = x_m * (-y / z); tmp = 0.0; if (z <= -1.85e+151) tmp = x_m; elseif (z <= -1.25e+104) tmp = t_1; elseif (z <= -2.6e+62) tmp = x_m; elseif (z <= -1.15e-51) tmp = x_m * (-z / t); elseif (z <= 7e-6) tmp = (x_m * y) / t; elseif (z <= 2e+80) tmp = t_1; else tmp = 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[(x$95$m * N[((-y) / z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.85e+151], x$95$m, If[LessEqual[z, -1.25e+104], t$95$1, If[LessEqual[z, -2.6e+62], x$95$m, If[LessEqual[z, -1.15e-51], N[(x$95$m * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-6], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 2e+80], t$95$1, x$95$m]]]]]]), $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{-y}{z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+151}:\\
\;\;\;\;x_m\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{+104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{+62}:\\
\;\;\;\;x_m\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-51}:\\
\;\;\;\;x_m \cdot \frac{-z}{t}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-6}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+80}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x_m\\
\end{array}
\end{array}
\end{array}
if z < -1.8499999999999999e151 or -1.2499999999999999e104 < z < -2.59999999999999984e62 or 2e80 < z Initial program 70.2%
*-commutative70.2%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 65.4%
if -1.8499999999999999e151 < z < -1.2499999999999999e104 or 6.99999999999999989e-6 < z < 2e80Initial program 84.5%
*-commutative84.5%
associate-*l/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in t around 0 68.8%
mul-1-neg68.8%
div-sub68.8%
sub-neg68.8%
*-inverses68.8%
metadata-eval68.8%
Simplified68.8%
Taylor expanded in y around inf 49.3%
mul-1-neg49.3%
associate-*r/56.7%
*-commutative56.7%
distribute-rgt-neg-in56.7%
Simplified56.7%
if -2.59999999999999984e62 < z < -1.15000000000000001e-51Initial program 94.8%
*-commutative94.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 65.4%
Taylor expanded in y around 0 60.9%
neg-mul-160.9%
distribute-neg-frac60.9%
Simplified60.9%
if -1.15000000000000001e-51 < z < 6.99999999999999989e-6Initial program 94.2%
*-commutative94.2%
associate-*l/90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in z around 0 66.9%
Final simplification64.9%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (/ (- y) z))))
(*
x_s
(if (<= z -1.15e+151)
x_m
(if (<= z -1.25e+104)
t_1
(if (<= z -1.4e+62)
x_m
(if (<= z -4e-51)
(/ (- x_m) (/ t z))
(if (<= z 2.2e-7)
(/ (* x_m y) t)
(if (<= z 2.1e+79) t_1 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 = x_m * (-y / z);
double tmp;
if (z <= -1.15e+151) {
tmp = x_m;
} else if (z <= -1.25e+104) {
tmp = t_1;
} else if (z <= -1.4e+62) {
tmp = x_m;
} else if (z <= -4e-51) {
tmp = -x_m / (t / z);
} else if (z <= 2.2e-7) {
tmp = (x_m * y) / t;
} else if (z <= 2.1e+79) {
tmp = t_1;
} else {
tmp = 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 = x_m * (-y / z)
if (z <= (-1.15d+151)) then
tmp = x_m
else if (z <= (-1.25d+104)) then
tmp = t_1
else if (z <= (-1.4d+62)) then
tmp = x_m
else if (z <= (-4d-51)) then
tmp = -x_m / (t / z)
else if (z <= 2.2d-7) then
tmp = (x_m * y) / t
else if (z <= 2.1d+79) then
tmp = t_1
else
tmp = 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 = x_m * (-y / z);
double tmp;
if (z <= -1.15e+151) {
tmp = x_m;
} else if (z <= -1.25e+104) {
tmp = t_1;
} else if (z <= -1.4e+62) {
tmp = x_m;
} else if (z <= -4e-51) {
tmp = -x_m / (t / z);
} else if (z <= 2.2e-7) {
tmp = (x_m * y) / t;
} else if (z <= 2.1e+79) {
tmp = t_1;
} else {
tmp = 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 = x_m * (-y / z) tmp = 0 if z <= -1.15e+151: tmp = x_m elif z <= -1.25e+104: tmp = t_1 elif z <= -1.4e+62: tmp = x_m elif z <= -4e-51: tmp = -x_m / (t / z) elif z <= 2.2e-7: tmp = (x_m * y) / t elif z <= 2.1e+79: tmp = t_1 else: tmp = 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(x_m * Float64(Float64(-y) / z)) tmp = 0.0 if (z <= -1.15e+151) tmp = x_m; elseif (z <= -1.25e+104) tmp = t_1; elseif (z <= -1.4e+62) tmp = x_m; elseif (z <= -4e-51) tmp = Float64(Float64(-x_m) / Float64(t / z)); elseif (z <= 2.2e-7) tmp = Float64(Float64(x_m * y) / t); elseif (z <= 2.1e+79) tmp = t_1; else tmp = 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 = x_m * (-y / z); tmp = 0.0; if (z <= -1.15e+151) tmp = x_m; elseif (z <= -1.25e+104) tmp = t_1; elseif (z <= -1.4e+62) tmp = x_m; elseif (z <= -4e-51) tmp = -x_m / (t / z); elseif (z <= 2.2e-7) tmp = (x_m * y) / t; elseif (z <= 2.1e+79) tmp = t_1; else tmp = 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[(x$95$m * N[((-y) / z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.15e+151], x$95$m, If[LessEqual[z, -1.25e+104], t$95$1, If[LessEqual[z, -1.4e+62], x$95$m, If[LessEqual[z, -4e-51], N[((-x$95$m) / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e-7], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 2.1e+79], t$95$1, x$95$m]]]]]]), $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{-y}{z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+151}:\\
\;\;\;\;x_m\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{+104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{+62}:\\
\;\;\;\;x_m\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-51}:\\
\;\;\;\;\frac{-x_m}{\frac{t}{z}}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-7}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+79}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x_m\\
\end{array}
\end{array}
\end{array}
if z < -1.15e151 or -1.2499999999999999e104 < z < -1.40000000000000007e62 or 2.10000000000000008e79 < z Initial program 70.2%
*-commutative70.2%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 65.4%
if -1.15e151 < z < -1.2499999999999999e104 or 2.2000000000000001e-7 < z < 2.10000000000000008e79Initial program 84.5%
*-commutative84.5%
associate-*l/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in t around 0 68.8%
mul-1-neg68.8%
div-sub68.8%
sub-neg68.8%
*-inverses68.8%
metadata-eval68.8%
Simplified68.8%
Taylor expanded in y around inf 49.3%
mul-1-neg49.3%
associate-*r/56.7%
*-commutative56.7%
distribute-rgt-neg-in56.7%
Simplified56.7%
if -1.40000000000000007e62 < z < -4e-51Initial program 94.8%
*-commutative94.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 65.4%
Taylor expanded in y around 0 55.9%
mul-1-neg55.9%
associate-/l*60.9%
distribute-neg-frac60.9%
Simplified60.9%
if -4e-51 < z < 2.2000000000000001e-7Initial program 94.2%
*-commutative94.2%
associate-*l/90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in z around 0 66.9%
Final simplification64.9%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (/ z (- z t)))))
(*
x_s
(if (<= z -5.8e+148)
t_1
(if (<= z -1.55e+102)
(* x_m (- 1.0 (/ y z)))
(if (<= z -4.3e-51)
t_1
(if (<= z 2e-161)
(* (- y z) (/ x_m t))
(if (<= z 3.6e+32) (* x_m (/ y (- t z))) t_1))))))))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 * (z / (z - t));
double tmp;
if (z <= -5.8e+148) {
tmp = t_1;
} else if (z <= -1.55e+102) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= -4.3e-51) {
tmp = t_1;
} else if (z <= 2e-161) {
tmp = (y - z) * (x_m / t);
} else if (z <= 3.6e+32) {
tmp = x_m * (y / (t - z));
} else {
tmp = t_1;
}
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 * (z / (z - t))
if (z <= (-5.8d+148)) then
tmp = t_1
else if (z <= (-1.55d+102)) then
tmp = x_m * (1.0d0 - (y / z))
else if (z <= (-4.3d-51)) then
tmp = t_1
else if (z <= 2d-161) then
tmp = (y - z) * (x_m / t)
else if (z <= 3.6d+32) then
tmp = x_m * (y / (t - z))
else
tmp = t_1
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 * (z / (z - t));
double tmp;
if (z <= -5.8e+148) {
tmp = t_1;
} else if (z <= -1.55e+102) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= -4.3e-51) {
tmp = t_1;
} else if (z <= 2e-161) {
tmp = (y - z) * (x_m / t);
} else if (z <= 3.6e+32) {
tmp = x_m * (y / (t - z));
} else {
tmp = t_1;
}
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 * (z / (z - t)) tmp = 0 if z <= -5.8e+148: tmp = t_1 elif z <= -1.55e+102: tmp = x_m * (1.0 - (y / z)) elif z <= -4.3e-51: tmp = t_1 elif z <= 2e-161: tmp = (y - z) * (x_m / t) elif z <= 3.6e+32: tmp = x_m * (y / (t - z)) else: tmp = t_1 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(z / Float64(z - t))) tmp = 0.0 if (z <= -5.8e+148) tmp = t_1; elseif (z <= -1.55e+102) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); elseif (z <= -4.3e-51) tmp = t_1; elseif (z <= 2e-161) tmp = Float64(Float64(y - z) * Float64(x_m / t)); elseif (z <= 3.6e+32) tmp = Float64(x_m * Float64(y / Float64(t - z))); else tmp = t_1; 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 * (z / (z - t)); tmp = 0.0; if (z <= -5.8e+148) tmp = t_1; elseif (z <= -1.55e+102) tmp = x_m * (1.0 - (y / z)); elseif (z <= -4.3e-51) tmp = t_1; elseif (z <= 2e-161) tmp = (y - z) * (x_m / t); elseif (z <= 3.6e+32) tmp = x_m * (y / (t - z)); else tmp = t_1; 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[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -5.8e+148], t$95$1, If[LessEqual[z, -1.55e+102], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.3e-51], t$95$1, If[LessEqual[z, 2e-161], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+32], N[(x$95$m * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]), $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{z}{z - t}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+148}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{+102}:\\
\;\;\;\;x_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{-51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-161}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x_m}{t}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+32}:\\
\;\;\;\;x_m \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if z < -5.7999999999999999e148 or -1.54999999999999993e102 < z < -4.2999999999999997e-51 or 3.5999999999999997e32 < z Initial program 74.4%
*-commutative74.4%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 81.0%
neg-mul-181.0%
distribute-neg-frac81.0%
Simplified81.0%
*-commutative81.0%
frac-2neg81.0%
remove-double-neg81.0%
associate-*l/60.0%
sub-neg60.0%
distribute-neg-in60.0%
remove-double-neg60.0%
Applied egg-rr60.0%
associate-/l*63.2%
associate-/r/81.0%
+-commutative81.0%
unsub-neg81.0%
Simplified81.0%
if -5.7999999999999999e148 < z < -1.54999999999999993e102Initial program 87.4%
*-commutative87.4%
associate-*l/99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in t around 0 87.3%
mul-1-neg87.3%
div-sub87.3%
sub-neg87.3%
*-inverses87.3%
metadata-eval87.3%
Simplified87.3%
Taylor expanded in x around 0 87.3%
if -4.2999999999999997e-51 < z < 2.00000000000000006e-161Initial program 92.9%
associate-*l/92.6%
Simplified92.6%
Taylor expanded in t around inf 86.5%
if 2.00000000000000006e-161 < z < 3.5999999999999997e32Initial program 95.6%
*-commutative95.6%
associate-*l/95.8%
*-commutative95.8%
Simplified95.8%
Taylor expanded in y around inf 74.5%
Final simplification81.7%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (/ z (- z t)))))
(*
x_s
(if (<= z -2.65e+150)
(/ x_m (- 1.0 (/ t z)))
(if (<= z -1.1e+96)
(* x_m (- 1.0 (/ y z)))
(if (<= z -4.6e-52)
t_1
(if (<= z 8.5e-162)
(* (- y z) (/ x_m t))
(if (<= z 8e+35) (* x_m (/ y (- t z))) t_1))))))))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 * (z / (z - t));
double tmp;
if (z <= -2.65e+150) {
tmp = x_m / (1.0 - (t / z));
} else if (z <= -1.1e+96) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= -4.6e-52) {
tmp = t_1;
} else if (z <= 8.5e-162) {
tmp = (y - z) * (x_m / t);
} else if (z <= 8e+35) {
tmp = x_m * (y / (t - z));
} else {
tmp = t_1;
}
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 * (z / (z - t))
if (z <= (-2.65d+150)) then
tmp = x_m / (1.0d0 - (t / z))
else if (z <= (-1.1d+96)) then
tmp = x_m * (1.0d0 - (y / z))
else if (z <= (-4.6d-52)) then
tmp = t_1
else if (z <= 8.5d-162) then
tmp = (y - z) * (x_m / t)
else if (z <= 8d+35) then
tmp = x_m * (y / (t - z))
else
tmp = t_1
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 * (z / (z - t));
double tmp;
if (z <= -2.65e+150) {
tmp = x_m / (1.0 - (t / z));
} else if (z <= -1.1e+96) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= -4.6e-52) {
tmp = t_1;
} else if (z <= 8.5e-162) {
tmp = (y - z) * (x_m / t);
} else if (z <= 8e+35) {
tmp = x_m * (y / (t - z));
} else {
tmp = t_1;
}
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 * (z / (z - t)) tmp = 0 if z <= -2.65e+150: tmp = x_m / (1.0 - (t / z)) elif z <= -1.1e+96: tmp = x_m * (1.0 - (y / z)) elif z <= -4.6e-52: tmp = t_1 elif z <= 8.5e-162: tmp = (y - z) * (x_m / t) elif z <= 8e+35: tmp = x_m * (y / (t - z)) else: tmp = t_1 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(z / Float64(z - t))) tmp = 0.0 if (z <= -2.65e+150) tmp = Float64(x_m / Float64(1.0 - Float64(t / z))); elseif (z <= -1.1e+96) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); elseif (z <= -4.6e-52) tmp = t_1; elseif (z <= 8.5e-162) tmp = Float64(Float64(y - z) * Float64(x_m / t)); elseif (z <= 8e+35) tmp = Float64(x_m * Float64(y / Float64(t - z))); else tmp = t_1; 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 * (z / (z - t)); tmp = 0.0; if (z <= -2.65e+150) tmp = x_m / (1.0 - (t / z)); elseif (z <= -1.1e+96) tmp = x_m * (1.0 - (y / z)); elseif (z <= -4.6e-52) tmp = t_1; elseif (z <= 8.5e-162) tmp = (y - z) * (x_m / t); elseif (z <= 8e+35) tmp = x_m * (y / (t - z)); else tmp = t_1; 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[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -2.65e+150], N[(x$95$m / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e+96], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.6e-52], t$95$1, If[LessEqual[z, 8.5e-162], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+35], N[(x$95$m * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]), $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{z}{z - t}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.65 \cdot 10^{+150}:\\
\;\;\;\;\frac{x_m}{1 - \frac{t}{z}}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{+96}:\\
\;\;\;\;x_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-52}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-162}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x_m}{t}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+35}:\\
\;\;\;\;x_m \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if z < -2.65000000000000007e150Initial program 61.0%
*-commutative61.0%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 55.4%
mul-1-neg55.4%
associate-/l*89.2%
distribute-neg-frac89.2%
div-sub89.2%
*-inverses89.2%
Simplified89.2%
frac-2neg89.2%
div-inv89.1%
remove-double-neg89.1%
sub-neg89.1%
metadata-eval89.1%
distribute-neg-in89.1%
metadata-eval89.1%
Applied egg-rr89.1%
associate-*r/89.2%
*-rgt-identity89.2%
+-commutative89.2%
unsub-neg89.2%
Simplified89.2%
if -2.65000000000000007e150 < z < -1.0999999999999999e96Initial program 87.4%
*-commutative87.4%
associate-*l/99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in t around 0 87.3%
mul-1-neg87.3%
div-sub87.3%
sub-neg87.3%
*-inverses87.3%
metadata-eval87.3%
Simplified87.3%
Taylor expanded in x around 0 87.3%
if -1.0999999999999999e96 < z < -4.59999999999999989e-52 or 7.9999999999999997e35 < z Initial program 79.6%
*-commutative79.6%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 77.8%
neg-mul-177.8%
distribute-neg-frac77.8%
Simplified77.8%
*-commutative77.8%
frac-2neg77.8%
remove-double-neg77.8%
associate-*l/61.7%
sub-neg61.7%
distribute-neg-in61.7%
remove-double-neg61.7%
Applied egg-rr61.7%
associate-/l*64.9%
associate-/r/77.8%
+-commutative77.8%
unsub-neg77.8%
Simplified77.8%
if -4.59999999999999989e-52 < z < 8.49999999999999955e-162Initial program 92.9%
associate-*l/92.6%
Simplified92.6%
Taylor expanded in t around inf 86.5%
if 8.49999999999999955e-162 < z < 7.9999999999999997e35Initial program 95.6%
*-commutative95.6%
associate-*l/95.8%
*-commutative95.8%
Simplified95.8%
Taylor expanded in y around inf 74.5%
Final simplification81.7%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (/ z (- z t)))))
(*
x_s
(if (<= z -6.4e+148)
(/ x_m (- 1.0 (/ t z)))
(if (<= z -1.02e+103)
(* x_m (- 1.0 (/ y z)))
(if (<= z -1.7e-51)
t_1
(if (<= z 2.7e-161)
(/ (- y z) (/ t x_m))
(if (<= z 5e+30) (* x_m (/ y (- t z))) t_1))))))))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 * (z / (z - t));
double tmp;
if (z <= -6.4e+148) {
tmp = x_m / (1.0 - (t / z));
} else if (z <= -1.02e+103) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= -1.7e-51) {
tmp = t_1;
} else if (z <= 2.7e-161) {
tmp = (y - z) / (t / x_m);
} else if (z <= 5e+30) {
tmp = x_m * (y / (t - z));
} else {
tmp = t_1;
}
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 * (z / (z - t))
if (z <= (-6.4d+148)) then
tmp = x_m / (1.0d0 - (t / z))
else if (z <= (-1.02d+103)) then
tmp = x_m * (1.0d0 - (y / z))
else if (z <= (-1.7d-51)) then
tmp = t_1
else if (z <= 2.7d-161) then
tmp = (y - z) / (t / x_m)
else if (z <= 5d+30) then
tmp = x_m * (y / (t - z))
else
tmp = t_1
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 * (z / (z - t));
double tmp;
if (z <= -6.4e+148) {
tmp = x_m / (1.0 - (t / z));
} else if (z <= -1.02e+103) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= -1.7e-51) {
tmp = t_1;
} else if (z <= 2.7e-161) {
tmp = (y - z) / (t / x_m);
} else if (z <= 5e+30) {
tmp = x_m * (y / (t - z));
} else {
tmp = t_1;
}
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 * (z / (z - t)) tmp = 0 if z <= -6.4e+148: tmp = x_m / (1.0 - (t / z)) elif z <= -1.02e+103: tmp = x_m * (1.0 - (y / z)) elif z <= -1.7e-51: tmp = t_1 elif z <= 2.7e-161: tmp = (y - z) / (t / x_m) elif z <= 5e+30: tmp = x_m * (y / (t - z)) else: tmp = t_1 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(z / Float64(z - t))) tmp = 0.0 if (z <= -6.4e+148) tmp = Float64(x_m / Float64(1.0 - Float64(t / z))); elseif (z <= -1.02e+103) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); elseif (z <= -1.7e-51) tmp = t_1; elseif (z <= 2.7e-161) tmp = Float64(Float64(y - z) / Float64(t / x_m)); elseif (z <= 5e+30) tmp = Float64(x_m * Float64(y / Float64(t - z))); else tmp = t_1; 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 * (z / (z - t)); tmp = 0.0; if (z <= -6.4e+148) tmp = x_m / (1.0 - (t / z)); elseif (z <= -1.02e+103) tmp = x_m * (1.0 - (y / z)); elseif (z <= -1.7e-51) tmp = t_1; elseif (z <= 2.7e-161) tmp = (y - z) / (t / x_m); elseif (z <= 5e+30) tmp = x_m * (y / (t - z)); else tmp = t_1; 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[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -6.4e+148], N[(x$95$m / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.02e+103], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.7e-51], t$95$1, If[LessEqual[z, 2.7e-161], N[(N[(y - z), $MachinePrecision] / N[(t / x$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+30], N[(x$95$m * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]), $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{z}{z - t}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{+148}:\\
\;\;\;\;\frac{x_m}{1 - \frac{t}{z}}\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{+103}:\\
\;\;\;\;x_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-161}:\\
\;\;\;\;\frac{y - z}{\frac{t}{x_m}}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+30}:\\
\;\;\;\;x_m \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if z < -6.3999999999999999e148Initial program 61.0%
*-commutative61.0%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 55.4%
mul-1-neg55.4%
associate-/l*89.2%
distribute-neg-frac89.2%
div-sub89.2%
*-inverses89.2%
Simplified89.2%
frac-2neg89.2%
div-inv89.1%
remove-double-neg89.1%
sub-neg89.1%
metadata-eval89.1%
distribute-neg-in89.1%
metadata-eval89.1%
Applied egg-rr89.1%
associate-*r/89.2%
*-rgt-identity89.2%
+-commutative89.2%
unsub-neg89.2%
Simplified89.2%
if -6.3999999999999999e148 < z < -1.01999999999999991e103Initial program 87.4%
*-commutative87.4%
associate-*l/99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in t around 0 87.3%
mul-1-neg87.3%
div-sub87.3%
sub-neg87.3%
*-inverses87.3%
metadata-eval87.3%
Simplified87.3%
Taylor expanded in x around 0 87.3%
if -1.01999999999999991e103 < z < -1.70000000000000001e-51 or 4.9999999999999998e30 < z Initial program 79.6%
*-commutative79.6%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 77.8%
neg-mul-177.8%
distribute-neg-frac77.8%
Simplified77.8%
*-commutative77.8%
frac-2neg77.8%
remove-double-neg77.8%
associate-*l/61.7%
sub-neg61.7%
distribute-neg-in61.7%
remove-double-neg61.7%
Applied egg-rr61.7%
associate-/l*64.9%
associate-/r/77.8%
+-commutative77.8%
unsub-neg77.8%
Simplified77.8%
if -1.70000000000000001e-51 < z < 2.6999999999999999e-161Initial program 92.9%
*-commutative92.9%
associate-*l/88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in x around 0 92.9%
associate-*r/88.3%
*-commutative88.3%
associate-/r/92.6%
Simplified92.6%
Taylor expanded in t around inf 86.5%
if 2.6999999999999999e-161 < z < 4.9999999999999998e30Initial program 95.6%
*-commutative95.6%
associate-*l/95.8%
*-commutative95.8%
Simplified95.8%
Taylor expanded in y around inf 74.5%
Final simplification81.7%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (/ (- z) t))))
(*
x_s
(if (<= z -1.8e+63)
x_m
(if (<= z -4.6e-51)
t_1
(if (<= z 5.2e-45) (/ (* x_m y) t) (if (<= z 1.4e+83) t_1 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 = x_m * (-z / t);
double tmp;
if (z <= -1.8e+63) {
tmp = x_m;
} else if (z <= -4.6e-51) {
tmp = t_1;
} else if (z <= 5.2e-45) {
tmp = (x_m * y) / t;
} else if (z <= 1.4e+83) {
tmp = t_1;
} else {
tmp = 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 = x_m * (-z / t)
if (z <= (-1.8d+63)) then
tmp = x_m
else if (z <= (-4.6d-51)) then
tmp = t_1
else if (z <= 5.2d-45) then
tmp = (x_m * y) / t
else if (z <= 1.4d+83) then
tmp = t_1
else
tmp = 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 = x_m * (-z / t);
double tmp;
if (z <= -1.8e+63) {
tmp = x_m;
} else if (z <= -4.6e-51) {
tmp = t_1;
} else if (z <= 5.2e-45) {
tmp = (x_m * y) / t;
} else if (z <= 1.4e+83) {
tmp = t_1;
} else {
tmp = 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 = x_m * (-z / t) tmp = 0 if z <= -1.8e+63: tmp = x_m elif z <= -4.6e-51: tmp = t_1 elif z <= 5.2e-45: tmp = (x_m * y) / t elif z <= 1.4e+83: tmp = t_1 else: tmp = 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(x_m * Float64(Float64(-z) / t)) tmp = 0.0 if (z <= -1.8e+63) tmp = x_m; elseif (z <= -4.6e-51) tmp = t_1; elseif (z <= 5.2e-45) tmp = Float64(Float64(x_m * y) / t); elseif (z <= 1.4e+83) tmp = t_1; else tmp = 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 = x_m * (-z / t); tmp = 0.0; if (z <= -1.8e+63) tmp = x_m; elseif (z <= -4.6e-51) tmp = t_1; elseif (z <= 5.2e-45) tmp = (x_m * y) / t; elseif (z <= 1.4e+83) tmp = t_1; else tmp = 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[(x$95$m * N[((-z) / t), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.8e+63], x$95$m, If[LessEqual[z, -4.6e-51], t$95$1, If[LessEqual[z, 5.2e-45], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.4e+83], t$95$1, x$95$m]]]]), $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{-z}{t}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+63}:\\
\;\;\;\;x_m\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+83}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x_m\\
\end{array}
\end{array}
\end{array}
if z < -1.79999999999999999e63 or 1.4e83 < z Initial program 71.5%
*-commutative71.5%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 61.6%
if -1.79999999999999999e63 < z < -4.60000000000000004e-51 or 5.19999999999999973e-45 < z < 1.4e83Initial program 91.1%
*-commutative91.1%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 61.0%
Taylor expanded in y around 0 51.3%
neg-mul-151.3%
distribute-neg-frac51.3%
Simplified51.3%
if -4.60000000000000004e-51 < z < 5.19999999999999973e-45Initial program 93.9%
*-commutative93.9%
associate-*l/89.8%
*-commutative89.8%
Simplified89.8%
Taylor expanded in z around 0 68.3%
Final simplification62.7%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -5.5e+59)
x_m
(if (<= z -3.2e-54)
(* x_m (/ (- z) t))
(if (<= z 4.2e-45)
(/ (* x_m y) t)
(if (<= z 3.6e+82) (* z (/ (- x_m) 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 tmp;
if (z <= -5.5e+59) {
tmp = x_m;
} else if (z <= -3.2e-54) {
tmp = x_m * (-z / t);
} else if (z <= 4.2e-45) {
tmp = (x_m * y) / t;
} else if (z <= 3.6e+82) {
tmp = z * (-x_m / t);
} else {
tmp = 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) :: tmp
if (z <= (-5.5d+59)) then
tmp = x_m
else if (z <= (-3.2d-54)) then
tmp = x_m * (-z / t)
else if (z <= 4.2d-45) then
tmp = (x_m * y) / t
else if (z <= 3.6d+82) then
tmp = z * (-x_m / t)
else
tmp = 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 tmp;
if (z <= -5.5e+59) {
tmp = x_m;
} else if (z <= -3.2e-54) {
tmp = x_m * (-z / t);
} else if (z <= 4.2e-45) {
tmp = (x_m * y) / t;
} else if (z <= 3.6e+82) {
tmp = z * (-x_m / t);
} else {
tmp = 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): tmp = 0 if z <= -5.5e+59: tmp = x_m elif z <= -3.2e-54: tmp = x_m * (-z / t) elif z <= 4.2e-45: tmp = (x_m * y) / t elif z <= 3.6e+82: tmp = z * (-x_m / t) else: tmp = 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) tmp = 0.0 if (z <= -5.5e+59) tmp = x_m; elseif (z <= -3.2e-54) tmp = Float64(x_m * Float64(Float64(-z) / t)); elseif (z <= 4.2e-45) tmp = Float64(Float64(x_m * y) / t); elseif (z <= 3.6e+82) tmp = Float64(z * Float64(Float64(-x_m) / t)); else tmp = 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) tmp = 0.0; if (z <= -5.5e+59) tmp = x_m; elseif (z <= -3.2e-54) tmp = x_m * (-z / t); elseif (z <= 4.2e-45) tmp = (x_m * y) / t; elseif (z <= 3.6e+82) tmp = z * (-x_m / t); else tmp = 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_] := N[(x$95$s * If[LessEqual[z, -5.5e+59], x$95$m, If[LessEqual[z, -3.2e-54], N[(x$95$m * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-45], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 3.6e+82], N[(z * N[((-x$95$m) / t), $MachinePrecision]), $MachinePrecision], x$95$m]]]]), $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}\;z \leq -5.5 \cdot 10^{+59}:\\
\;\;\;\;x_m\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-54}:\\
\;\;\;\;x_m \cdot \frac{-z}{t}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+82}:\\
\;\;\;\;z \cdot \frac{-x_m}{t}\\
\mathbf{else}:\\
\;\;\;\;x_m\\
\end{array}
\end{array}
if z < -5.4999999999999999e59 or 3.60000000000000014e82 < z Initial program 71.5%
*-commutative71.5%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 61.6%
if -5.4999999999999999e59 < z < -3.19999999999999998e-54Initial program 94.8%
*-commutative94.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 65.4%
Taylor expanded in y around 0 60.9%
neg-mul-160.9%
distribute-neg-frac60.9%
Simplified60.9%
if -3.19999999999999998e-54 < z < 4.1999999999999999e-45Initial program 93.9%
*-commutative93.9%
associate-*l/89.8%
*-commutative89.8%
Simplified89.8%
Taylor expanded in z around 0 68.3%
if 4.1999999999999999e-45 < z < 3.60000000000000014e82Initial program 88.0%
*-commutative88.0%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 57.3%
Taylor expanded in y around 0 39.3%
mul-1-neg39.3%
associate-/l*43.3%
distribute-neg-frac43.3%
Simplified43.3%
Taylor expanded in x around 0 39.3%
mul-1-neg39.3%
associate-*l/43.3%
distribute-rgt-neg-out43.3%
Simplified43.3%
Final simplification62.7%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (- 1.0 (/ y z)))))
(*
x_s
(if (<= z -7.2e+50)
t_1
(if (<= z -2.2e-55)
(/ (- x_m) (/ t z))
(if (<= z 2.5e-8) (/ (* x_m y) t) t_1))))))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 * (1.0 - (y / z));
double tmp;
if (z <= -7.2e+50) {
tmp = t_1;
} else if (z <= -2.2e-55) {
tmp = -x_m / (t / z);
} else if (z <= 2.5e-8) {
tmp = (x_m * y) / t;
} else {
tmp = t_1;
}
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 * (1.0d0 - (y / z))
if (z <= (-7.2d+50)) then
tmp = t_1
else if (z <= (-2.2d-55)) then
tmp = -x_m / (t / z)
else if (z <= 2.5d-8) then
tmp = (x_m * y) / t
else
tmp = t_1
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 * (1.0 - (y / z));
double tmp;
if (z <= -7.2e+50) {
tmp = t_1;
} else if (z <= -2.2e-55) {
tmp = -x_m / (t / z);
} else if (z <= 2.5e-8) {
tmp = (x_m * y) / t;
} else {
tmp = t_1;
}
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 * (1.0 - (y / z)) tmp = 0 if z <= -7.2e+50: tmp = t_1 elif z <= -2.2e-55: tmp = -x_m / (t / z) elif z <= 2.5e-8: tmp = (x_m * y) / t else: tmp = t_1 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(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -7.2e+50) tmp = t_1; elseif (z <= -2.2e-55) tmp = Float64(Float64(-x_m) / Float64(t / z)); elseif (z <= 2.5e-8) tmp = Float64(Float64(x_m * y) / t); else tmp = t_1; 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 * (1.0 - (y / z)); tmp = 0.0; if (z <= -7.2e+50) tmp = t_1; elseif (z <= -2.2e-55) tmp = -x_m / (t / z); elseif (z <= 2.5e-8) tmp = (x_m * y) / t; else tmp = t_1; 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[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -7.2e+50], t$95$1, If[LessEqual[z, -2.2e-55], N[((-x$95$m) / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-8], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]), $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 \left(1 - \frac{y}{z}\right)\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+50}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-55}:\\
\;\;\;\;\frac{-x_m}{\frac{t}{z}}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if z < -7.19999999999999972e50 or 2.4999999999999999e-8 < z Initial program 73.6%
*-commutative73.6%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 73.8%
mul-1-neg73.8%
div-sub73.8%
sub-neg73.8%
*-inverses73.8%
metadata-eval73.8%
Simplified73.8%
Taylor expanded in x around 0 73.8%
if -7.19999999999999972e50 < z < -2.2e-55Initial program 94.3%
*-commutative94.3%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around inf 66.8%
Taylor expanded in y around 0 56.4%
mul-1-neg56.4%
associate-/l*62.0%
distribute-neg-frac62.0%
Simplified62.0%
if -2.2e-55 < z < 2.4999999999999999e-8Initial program 94.2%
*-commutative94.2%
associate-*l/90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in z around 0 66.9%
Final simplification69.8%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (- 1.0 (/ y z)))))
(*
x_s
(if (<= z -1.22e+64)
t_1
(if (<= z -1.1e-163)
(* x_m (/ (- y z) t))
(if (<= z 3.5e+82) (* x_m (/ y (- t z))) t_1))))))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 * (1.0 - (y / z));
double tmp;
if (z <= -1.22e+64) {
tmp = t_1;
} else if (z <= -1.1e-163) {
tmp = x_m * ((y - z) / t);
} else if (z <= 3.5e+82) {
tmp = x_m * (y / (t - z));
} else {
tmp = t_1;
}
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 * (1.0d0 - (y / z))
if (z <= (-1.22d+64)) then
tmp = t_1
else if (z <= (-1.1d-163)) then
tmp = x_m * ((y - z) / t)
else if (z <= 3.5d+82) then
tmp = x_m * (y / (t - z))
else
tmp = t_1
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 * (1.0 - (y / z));
double tmp;
if (z <= -1.22e+64) {
tmp = t_1;
} else if (z <= -1.1e-163) {
tmp = x_m * ((y - z) / t);
} else if (z <= 3.5e+82) {
tmp = x_m * (y / (t - z));
} else {
tmp = t_1;
}
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 * (1.0 - (y / z)) tmp = 0 if z <= -1.22e+64: tmp = t_1 elif z <= -1.1e-163: tmp = x_m * ((y - z) / t) elif z <= 3.5e+82: tmp = x_m * (y / (t - z)) else: tmp = t_1 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(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.22e+64) tmp = t_1; elseif (z <= -1.1e-163) tmp = Float64(x_m * Float64(Float64(y - z) / t)); elseif (z <= 3.5e+82) tmp = Float64(x_m * Float64(y / Float64(t - z))); else tmp = t_1; 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 * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.22e+64) tmp = t_1; elseif (z <= -1.1e-163) tmp = x_m * ((y - z) / t); elseif (z <= 3.5e+82) tmp = x_m * (y / (t - z)); else tmp = t_1; 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[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.22e+64], t$95$1, If[LessEqual[z, -1.1e-163], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+82], N[(x$95$m * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]), $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 \left(1 - \frac{y}{z}\right)\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-163}:\\
\;\;\;\;x_m \cdot \frac{y - z}{t}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+82}:\\
\;\;\;\;x_m \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if z < -1.21999999999999994e64 or 3.5e82 < z Initial program 71.0%
*-commutative71.0%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 77.0%
mul-1-neg77.0%
div-sub77.0%
sub-neg77.0%
*-inverses77.0%
metadata-eval77.0%
Simplified77.0%
Taylor expanded in x around 0 77.0%
if -1.21999999999999994e64 < z < -1.10000000000000005e-163Initial program 95.6%
*-commutative95.6%
associate-*l/95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in t around inf 72.3%
if -1.10000000000000005e-163 < z < 3.5e82Initial program 92.3%
*-commutative92.3%
associate-*l/91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in y around inf 76.8%
Final simplification76.1%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (- 1.0 (/ y z)))))
(*
x_s
(if (<= z -6e+65)
t_1
(if (<= z 1.45e-161)
(* (- y z) (/ x_m t))
(if (<= z 3.5e+82) (* x_m (/ y (- t z))) t_1))))))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 * (1.0 - (y / z));
double tmp;
if (z <= -6e+65) {
tmp = t_1;
} else if (z <= 1.45e-161) {
tmp = (y - z) * (x_m / t);
} else if (z <= 3.5e+82) {
tmp = x_m * (y / (t - z));
} else {
tmp = t_1;
}
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 * (1.0d0 - (y / z))
if (z <= (-6d+65)) then
tmp = t_1
else if (z <= 1.45d-161) then
tmp = (y - z) * (x_m / t)
else if (z <= 3.5d+82) then
tmp = x_m * (y / (t - z))
else
tmp = t_1
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 * (1.0 - (y / z));
double tmp;
if (z <= -6e+65) {
tmp = t_1;
} else if (z <= 1.45e-161) {
tmp = (y - z) * (x_m / t);
} else if (z <= 3.5e+82) {
tmp = x_m * (y / (t - z));
} else {
tmp = t_1;
}
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 * (1.0 - (y / z)) tmp = 0 if z <= -6e+65: tmp = t_1 elif z <= 1.45e-161: tmp = (y - z) * (x_m / t) elif z <= 3.5e+82: tmp = x_m * (y / (t - z)) else: tmp = t_1 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(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -6e+65) tmp = t_1; elseif (z <= 1.45e-161) tmp = Float64(Float64(y - z) * Float64(x_m / t)); elseif (z <= 3.5e+82) tmp = Float64(x_m * Float64(y / Float64(t - z))); else tmp = t_1; 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 * (1.0 - (y / z)); tmp = 0.0; if (z <= -6e+65) tmp = t_1; elseif (z <= 1.45e-161) tmp = (y - z) * (x_m / t); elseif (z <= 3.5e+82) tmp = x_m * (y / (t - z)); else tmp = t_1; 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[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -6e+65], t$95$1, If[LessEqual[z, 1.45e-161], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+82], N[(x$95$m * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]), $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 \left(1 - \frac{y}{z}\right)\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+65}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-161}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x_m}{t}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+82}:\\
\;\;\;\;x_m \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if z < -6.0000000000000004e65 or 3.5e82 < z Initial program 71.0%
*-commutative71.0%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 77.0%
mul-1-neg77.0%
div-sub77.0%
sub-neg77.0%
*-inverses77.0%
metadata-eval77.0%
Simplified77.0%
Taylor expanded in x around 0 77.0%
if -6.0000000000000004e65 < z < 1.45e-161Initial program 93.4%
associate-*l/92.3%
Simplified92.3%
Taylor expanded in t around inf 80.7%
if 1.45e-161 < z < 3.5e82Initial program 92.7%
*-commutative92.7%
associate-*l/96.3%
*-commutative96.3%
Simplified96.3%
Taylor expanded in y around inf 70.6%
Final simplification77.1%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -7.8e+63) (not (<= z 3.5e+82)))
(* x_m (- 1.0 (/ y z)))
(* x_m (/ y (- t 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 ((z <= -7.8e+63) || !(z <= 3.5e+82)) {
tmp = x_m * (1.0 - (y / z));
} else {
tmp = x_m * (y / (t - 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 ((z <= (-7.8d+63)) .or. (.not. (z <= 3.5d+82))) then
tmp = x_m * (1.0d0 - (y / z))
else
tmp = x_m * (y / (t - 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 ((z <= -7.8e+63) || !(z <= 3.5e+82)) {
tmp = x_m * (1.0 - (y / z));
} else {
tmp = x_m * (y / (t - 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 (z <= -7.8e+63) or not (z <= 3.5e+82): tmp = x_m * (1.0 - (y / z)) else: tmp = x_m * (y / (t - 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 ((z <= -7.8e+63) || !(z <= 3.5e+82)) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); else tmp = Float64(x_m * Float64(y / Float64(t - 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 ((z <= -7.8e+63) || ~((z <= 3.5e+82))) tmp = x_m * (1.0 - (y / z)); else tmp = x_m * (y / (t - 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[Or[LessEqual[z, -7.8e+63], N[Not[LessEqual[z, 3.5e+82]], $MachinePrecision]], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(y / N[(t - z), $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}\;z \leq -7.8 \cdot 10^{+63} \lor \neg \left(z \leq 3.5 \cdot 10^{+82}\right):\\
\;\;\;\;x_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x_m \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if z < -7.8e63 or 3.5e82 < z Initial program 71.0%
*-commutative71.0%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 77.0%
mul-1-neg77.0%
div-sub77.0%
sub-neg77.0%
*-inverses77.0%
metadata-eval77.0%
Simplified77.0%
Taylor expanded in x around 0 77.0%
if -7.8e63 < z < 3.5e82Initial program 93.2%
*-commutative93.2%
associate-*l/92.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in y around inf 71.5%
Final simplification73.7%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= x_m 3.9e-69)
(* x_m (/ (- y z) (- t z)))
(* (- y z) (/ x_m (- t 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 <= 3.9e-69) {
tmp = x_m * ((y - z) / (t - z));
} else {
tmp = (y - z) * (x_m / (t - 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 <= 3.9d-69) then
tmp = x_m * ((y - z) / (t - z))
else
tmp = (y - z) * (x_m / (t - 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 <= 3.9e-69) {
tmp = x_m * ((y - z) / (t - z));
} else {
tmp = (y - z) * (x_m / (t - 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 <= 3.9e-69: tmp = x_m * ((y - z) / (t - z)) else: tmp = (y - z) * (x_m / (t - 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 (x_m <= 3.9e-69) tmp = Float64(x_m * Float64(Float64(y - z) / Float64(t - z))); else tmp = Float64(Float64(y - z) * Float64(x_m / Float64(t - 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 <= 3.9e-69) tmp = x_m * ((y - z) / (t - z)); else tmp = (y - z) * (x_m / (t - 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[x$95$m, 3.9e-69], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / N[(t - z), $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}\;x_m \leq 3.9 \cdot 10^{-69}:\\
\;\;\;\;x_m \cdot \frac{y - z}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x_m}{t - z}\\
\end{array}
\end{array}
if x < 3.89999999999999981e-69Initial program 84.6%
*-commutative84.6%
associate-*l/97.7%
*-commutative97.7%
Simplified97.7%
if 3.89999999999999981e-69 < x Initial program 84.0%
associate-*l/97.2%
Simplified97.2%
Final simplification97.5%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= z -6.6e+54) x_m (if (<= z 2.06e+46) (* x_m (/ y 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 tmp;
if (z <= -6.6e+54) {
tmp = x_m;
} else if (z <= 2.06e+46) {
tmp = x_m * (y / t);
} else {
tmp = 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) :: tmp
if (z <= (-6.6d+54)) then
tmp = x_m
else if (z <= 2.06d+46) then
tmp = x_m * (y / t)
else
tmp = 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 tmp;
if (z <= -6.6e+54) {
tmp = x_m;
} else if (z <= 2.06e+46) {
tmp = x_m * (y / t);
} else {
tmp = 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): tmp = 0 if z <= -6.6e+54: tmp = x_m elif z <= 2.06e+46: tmp = x_m * (y / t) else: tmp = 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) tmp = 0.0 if (z <= -6.6e+54) tmp = x_m; elseif (z <= 2.06e+46) tmp = Float64(x_m * Float64(y / t)); else tmp = 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) tmp = 0.0; if (z <= -6.6e+54) tmp = x_m; elseif (z <= 2.06e+46) tmp = x_m * (y / t); else tmp = 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_] := N[(x$95$s * If[LessEqual[z, -6.6e+54], x$95$m, If[LessEqual[z, 2.06e+46], N[(x$95$m * N[(y / t), $MachinePrecision]), $MachinePrecision], x$95$m]]), $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}\;z \leq -6.6 \cdot 10^{+54}:\\
\;\;\;\;x_m\\
\mathbf{elif}\;z \leq 2.06 \cdot 10^{+46}:\\
\;\;\;\;x_m \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x_m\\
\end{array}
\end{array}
if z < -6.6e54 or 2.0600000000000001e46 < z Initial program 71.7%
*-commutative71.7%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 58.8%
if -6.6e54 < z < 2.0600000000000001e46Initial program 94.0%
*-commutative94.0%
associate-*l/92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in z around 0 57.8%
Final simplification58.2%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= z -1.95e+54) x_m (if (<= z 2.8e+43) (/ x_m (/ t y)) 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 tmp;
if (z <= -1.95e+54) {
tmp = x_m;
} else if (z <= 2.8e+43) {
tmp = x_m / (t / y);
} else {
tmp = 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) :: tmp
if (z <= (-1.95d+54)) then
tmp = x_m
else if (z <= 2.8d+43) then
tmp = x_m / (t / y)
else
tmp = 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 tmp;
if (z <= -1.95e+54) {
tmp = x_m;
} else if (z <= 2.8e+43) {
tmp = x_m / (t / y);
} else {
tmp = 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): tmp = 0 if z <= -1.95e+54: tmp = x_m elif z <= 2.8e+43: tmp = x_m / (t / y) else: tmp = 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) tmp = 0.0 if (z <= -1.95e+54) tmp = x_m; elseif (z <= 2.8e+43) tmp = Float64(x_m / Float64(t / y)); else tmp = 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) tmp = 0.0; if (z <= -1.95e+54) tmp = x_m; elseif (z <= 2.8e+43) tmp = x_m / (t / y); else tmp = 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_] := N[(x$95$s * If[LessEqual[z, -1.95e+54], x$95$m, If[LessEqual[z, 2.8e+43], N[(x$95$m / N[(t / y), $MachinePrecision]), $MachinePrecision], x$95$m]]), $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}\;z \leq -1.95 \cdot 10^{+54}:\\
\;\;\;\;x_m\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+43}:\\
\;\;\;\;\frac{x_m}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x_m\\
\end{array}
\end{array}
if z < -1.9500000000000001e54 or 2.80000000000000019e43 < z Initial program 71.7%
*-commutative71.7%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 58.8%
if -1.9500000000000001e54 < z < 2.80000000000000019e43Initial program 94.0%
*-commutative94.0%
associate-*l/92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in z around 0 58.9%
associate-/l*58.0%
Simplified58.0%
Final simplification58.3%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= z -9e+55) x_m (if (<= z 6.2e+41) (/ (* x_m y) 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 tmp;
if (z <= -9e+55) {
tmp = x_m;
} else if (z <= 6.2e+41) {
tmp = (x_m * y) / t;
} else {
tmp = 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) :: tmp
if (z <= (-9d+55)) then
tmp = x_m
else if (z <= 6.2d+41) then
tmp = (x_m * y) / t
else
tmp = 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 tmp;
if (z <= -9e+55) {
tmp = x_m;
} else if (z <= 6.2e+41) {
tmp = (x_m * y) / t;
} else {
tmp = 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): tmp = 0 if z <= -9e+55: tmp = x_m elif z <= 6.2e+41: tmp = (x_m * y) / t else: tmp = 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) tmp = 0.0 if (z <= -9e+55) tmp = x_m; elseif (z <= 6.2e+41) tmp = Float64(Float64(x_m * y) / t); else tmp = 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) tmp = 0.0; if (z <= -9e+55) tmp = x_m; elseif (z <= 6.2e+41) tmp = (x_m * y) / t; else tmp = 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_] := N[(x$95$s * If[LessEqual[z, -9e+55], x$95$m, If[LessEqual[z, 6.2e+41], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], x$95$m]]), $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}\;z \leq -9 \cdot 10^{+55}:\\
\;\;\;\;x_m\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+41}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;x_m\\
\end{array}
\end{array}
if z < -8.99999999999999996e55 or 6.2e41 < z Initial program 71.7%
*-commutative71.7%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 58.8%
if -8.99999999999999996e55 < z < 6.2e41Initial program 94.0%
*-commutative94.0%
associate-*l/92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in z around 0 58.9%
Final simplification58.9%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (* x_m (/ (- y z) (- t 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 * ((y - z) / (t - 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 * ((y - z) / (t - 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 * ((y - z) / (t - 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 * ((y - z) / (t - 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(x_m * Float64(Float64(y - z) / Float64(t - 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 * ((y - z) / (t - 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[(x$95$m * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x_s \cdot \left(x_m \cdot \frac{y - z}{t - z}\right)
\end{array}
Initial program 84.4%
*-commutative84.4%
associate-*l/95.5%
*-commutative95.5%
Simplified95.5%
Final simplification95.5%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s 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) {
return x_s * x_m;
}
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
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;
}
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
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) return Float64(x_s * x_m) 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; 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 * x$95$m), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x_s \cdot x_m
\end{array}
Initial program 84.4%
*-commutative84.4%
associate-*l/95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in z around inf 30.8%
Final simplification30.8%
(FPCore (x y z t) :precision binary64 (/ x (/ (- t z) (- y z))))
double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - 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 / ((t - z) / (y - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
def code(x, y, z, t): return x / ((t - z) / (y - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(t - z) / Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = x / ((t - z) / (y - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{t - z}{y - z}}
\end{array}
herbie shell --seed 2024010
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:herbie-target
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))