
(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 15 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 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= x_m 3.5e+41)
(/ (* x_m (- y z)) (- t z))
(* (- z y) (/ x_m (- 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 (x_m <= 3.5e+41) {
tmp = (x_m * (y - z)) / (t - z);
} else {
tmp = (z - y) * (x_m / (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 (x_m <= 3.5d+41) then
tmp = (x_m * (y - z)) / (t - z)
else
tmp = (z - y) * (x_m / (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 (x_m <= 3.5e+41) {
tmp = (x_m * (y - z)) / (t - z);
} else {
tmp = (z - y) * (x_m / (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 x_m <= 3.5e+41: tmp = (x_m * (y - z)) / (t - z) else: tmp = (z - y) * (x_m / (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 (x_m <= 3.5e+41) tmp = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z)); else tmp = Float64(Float64(z - y) * Float64(x_m / 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 (x_m <= 3.5e+41) tmp = (x_m * (y - z)) / (t - z); else tmp = (z - y) * (x_m / (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[LessEqual[x$95$m, 3.5e+41], N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(z - y), $MachinePrecision] * N[(x$95$m / 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}\;x\_m \leq 3.5 \cdot 10^{+41}:\\
\;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\left(z - y\right) \cdot \frac{x\_m}{z - t}\\
\end{array}
\end{array}
if x < 3.4999999999999999e41Initial program 92.9%
if 3.4999999999999999e41 < x Initial program 69.9%
remove-double-neg69.9%
distribute-lft-neg-out69.9%
distribute-neg-frac69.9%
distribute-neg-frac269.9%
distribute-lft-neg-out69.9%
distribute-rgt-neg-in69.9%
sub-neg69.9%
distribute-neg-in69.9%
remove-double-neg69.9%
+-commutative69.9%
sub-neg69.9%
sub-neg69.9%
distribute-neg-in69.9%
remove-double-neg69.9%
+-commutative69.9%
sub-neg69.9%
Simplified69.9%
*-commutative69.9%
associate-/l*96.4%
Applied egg-rr96.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 (* x_m (/ z (- z t))))
(t_2 (* x_m (/ (- y z) t)))
(t_3 (* x_m (- 1.0 (/ y z)))))
(*
x_s
(if (<= t -1e+170)
t_2
(if (<= t -1.72e+124)
t_1
(if (<= t -1.7e-44)
t_2
(if (<= t 0.00032)
t_3
(if (<= t 1e+47)
t_2
(if (<= t 1.9e+55) t_3 (if (<= t 1.16e+191) t_1 t_2))))))))))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 t_2 = x_m * ((y - z) / t);
double t_3 = x_m * (1.0 - (y / z));
double tmp;
if (t <= -1e+170) {
tmp = t_2;
} else if (t <= -1.72e+124) {
tmp = t_1;
} else if (t <= -1.7e-44) {
tmp = t_2;
} else if (t <= 0.00032) {
tmp = t_3;
} else if (t <= 1e+47) {
tmp = t_2;
} else if (t <= 1.9e+55) {
tmp = t_3;
} else if (t <= 1.16e+191) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_3
real(8) :: tmp
t_1 = x_m * (z / (z - t))
t_2 = x_m * ((y - z) / t)
t_3 = x_m * (1.0d0 - (y / z))
if (t <= (-1d+170)) then
tmp = t_2
else if (t <= (-1.72d+124)) then
tmp = t_1
else if (t <= (-1.7d-44)) then
tmp = t_2
else if (t <= 0.00032d0) then
tmp = t_3
else if (t <= 1d+47) then
tmp = t_2
else if (t <= 1.9d+55) then
tmp = t_3
else if (t <= 1.16d+191) then
tmp = t_1
else
tmp = t_2
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 t_2 = x_m * ((y - z) / t);
double t_3 = x_m * (1.0 - (y / z));
double tmp;
if (t <= -1e+170) {
tmp = t_2;
} else if (t <= -1.72e+124) {
tmp = t_1;
} else if (t <= -1.7e-44) {
tmp = t_2;
} else if (t <= 0.00032) {
tmp = t_3;
} else if (t <= 1e+47) {
tmp = t_2;
} else if (t <= 1.9e+55) {
tmp = t_3;
} else if (t <= 1.16e+191) {
tmp = t_1;
} else {
tmp = t_2;
}
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)) t_2 = x_m * ((y - z) / t) t_3 = x_m * (1.0 - (y / z)) tmp = 0 if t <= -1e+170: tmp = t_2 elif t <= -1.72e+124: tmp = t_1 elif t <= -1.7e-44: tmp = t_2 elif t <= 0.00032: tmp = t_3 elif t <= 1e+47: tmp = t_2 elif t <= 1.9e+55: tmp = t_3 elif t <= 1.16e+191: tmp = t_1 else: tmp = t_2 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))) t_2 = Float64(x_m * Float64(Float64(y - z) / t)) t_3 = Float64(x_m * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (t <= -1e+170) tmp = t_2; elseif (t <= -1.72e+124) tmp = t_1; elseif (t <= -1.7e-44) tmp = t_2; elseif (t <= 0.00032) tmp = t_3; elseif (t <= 1e+47) tmp = t_2; elseif (t <= 1.9e+55) tmp = t_3; elseif (t <= 1.16e+191) tmp = t_1; else tmp = t_2; 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)); t_2 = x_m * ((y - z) / t); t_3 = x_m * (1.0 - (y / z)); tmp = 0.0; if (t <= -1e+170) tmp = t_2; elseif (t <= -1.72e+124) tmp = t_1; elseif (t <= -1.7e-44) tmp = t_2; elseif (t <= 0.00032) tmp = t_3; elseif (t <= 1e+47) tmp = t_2; elseif (t <= 1.9e+55) tmp = t_3; elseif (t <= 1.16e+191) tmp = t_1; else tmp = t_2; 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]}, Block[{t$95$2 = N[(x$95$m * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t, -1e+170], t$95$2, If[LessEqual[t, -1.72e+124], t$95$1, If[LessEqual[t, -1.7e-44], t$95$2, If[LessEqual[t, 0.00032], t$95$3, If[LessEqual[t, 1e+47], t$95$2, If[LessEqual[t, 1.9e+55], t$95$3, If[LessEqual[t, 1.16e+191], t$95$1, t$95$2]]]]]]]), $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}\\
t_2 := x\_m \cdot \frac{y - z}{t}\\
t_3 := x\_m \cdot \left(1 - \frac{y}{z}\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+170}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.72 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-44}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 0.00032:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 10^{+47}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+55}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{+191}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if t < -1.00000000000000003e170 or -1.71999999999999994e124 < t < -1.70000000000000008e-44 or 3.20000000000000026e-4 < t < 1e47 or 1.15999999999999996e191 < t Initial program 92.6%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in t around inf 81.8%
associate-/l*80.7%
Simplified80.7%
if -1.00000000000000003e170 < t < -1.71999999999999994e124 or 1.9e55 < t < 1.15999999999999996e191Initial program 83.7%
associate-/l*85.9%
Simplified85.9%
Taylor expanded in y around 0 71.3%
mul-1-neg71.3%
distribute-neg-frac271.3%
sub-neg71.3%
distribute-neg-in71.3%
remove-double-neg71.3%
+-commutative71.3%
sub-neg71.3%
associate-/l*77.5%
Simplified77.5%
if -1.70000000000000008e-44 < t < 3.20000000000000026e-4 or 1e47 < t < 1.9e55Initial program 84.7%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in t around 0 75.7%
mul-1-neg75.7%
associate-/l*86.8%
distribute-rgt-neg-in86.8%
distribute-frac-neg86.8%
sub-neg86.8%
distribute-neg-in86.8%
remove-double-neg86.8%
+-commutative86.8%
sub-neg86.8%
div-sub86.8%
*-inverses86.8%
Simplified86.8%
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 (- 1.0 (/ y z)))))
(*
x_s
(if (<= z -8.5e+91)
(* x_m (/ z (- z t)))
(if (<= z -5.2e-23)
t_1
(if (<= z 3.8e-121)
(/ (* x_m y) t)
(if (or (<= z 6.8e-97) (not (<= z 2.65e-36)))
t_1
(/ x_m (/ t 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 * (1.0 - (y / z));
double tmp;
if (z <= -8.5e+91) {
tmp = x_m * (z / (z - t));
} else if (z <= -5.2e-23) {
tmp = t_1;
} else if (z <= 3.8e-121) {
tmp = (x_m * y) / t;
} else if ((z <= 6.8e-97) || !(z <= 2.65e-36)) {
tmp = t_1;
} else {
tmp = x_m / (t / 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 * (1.0d0 - (y / z))
if (z <= (-8.5d+91)) then
tmp = x_m * (z / (z - t))
else if (z <= (-5.2d-23)) then
tmp = t_1
else if (z <= 3.8d-121) then
tmp = (x_m * y) / t
else if ((z <= 6.8d-97) .or. (.not. (z <= 2.65d-36))) then
tmp = t_1
else
tmp = x_m / (t / 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 * (1.0 - (y / z));
double tmp;
if (z <= -8.5e+91) {
tmp = x_m * (z / (z - t));
} else if (z <= -5.2e-23) {
tmp = t_1;
} else if (z <= 3.8e-121) {
tmp = (x_m * y) / t;
} else if ((z <= 6.8e-97) || !(z <= 2.65e-36)) {
tmp = t_1;
} else {
tmp = x_m / (t / 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 * (1.0 - (y / z)) tmp = 0 if z <= -8.5e+91: tmp = x_m * (z / (z - t)) elif z <= -5.2e-23: tmp = t_1 elif z <= 3.8e-121: tmp = (x_m * y) / t elif (z <= 6.8e-97) or not (z <= 2.65e-36): tmp = t_1 else: tmp = x_m / (t / 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(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -8.5e+91) tmp = Float64(x_m * Float64(z / Float64(z - t))); elseif (z <= -5.2e-23) tmp = t_1; elseif (z <= 3.8e-121) tmp = Float64(Float64(x_m * y) / t); elseif ((z <= 6.8e-97) || !(z <= 2.65e-36)) tmp = t_1; else tmp = Float64(x_m / Float64(t / 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 * (1.0 - (y / z)); tmp = 0.0; if (z <= -8.5e+91) tmp = x_m * (z / (z - t)); elseif (z <= -5.2e-23) tmp = t_1; elseif (z <= 3.8e-121) tmp = (x_m * y) / t; elseif ((z <= 6.8e-97) || ~((z <= 2.65e-36))) tmp = t_1; else tmp = x_m / (t / 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[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -8.5e+91], N[(x$95$m * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.2e-23], t$95$1, If[LessEqual[z, 3.8e-121], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[z, 6.8e-97], N[Not[LessEqual[z, 2.65e-36]], $MachinePrecision]], t$95$1, N[(x$95$m / N[(t / 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 \left(1 - \frac{y}{z}\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+91}:\\
\;\;\;\;x\_m \cdot \frac{z}{z - t}\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-121}:\\
\;\;\;\;\frac{x\_m \cdot y}{t}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-97} \lor \neg \left(z \leq 2.65 \cdot 10^{-36}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{\frac{t}{y}}\\
\end{array}
\end{array}
\end{array}
if z < -8.4999999999999995e91Initial program 62.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 50.3%
mul-1-neg50.3%
distribute-neg-frac250.3%
sub-neg50.3%
distribute-neg-in50.3%
remove-double-neg50.3%
+-commutative50.3%
sub-neg50.3%
associate-/l*85.5%
Simplified85.5%
if -8.4999999999999995e91 < z < -5.2e-23 or 3.8000000000000001e-121 < z < 6.7999999999999998e-97 or 2.6499999999999999e-36 < z Initial program 89.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 71.0%
mul-1-neg71.0%
associate-/l*80.9%
distribute-rgt-neg-in80.9%
distribute-frac-neg80.9%
sub-neg80.9%
distribute-neg-in80.9%
remove-double-neg80.9%
+-commutative80.9%
sub-neg80.9%
div-sub80.9%
*-inverses80.9%
Simplified80.9%
if -5.2e-23 < z < 3.8000000000000001e-121Initial program 95.0%
associate-/l*85.5%
Simplified85.5%
Taylor expanded in z around 0 69.5%
if 6.7999999999999998e-97 < z < 2.6499999999999999e-36Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 99.8%
*-rgt-identity99.8%
times-frac93.6%
/-rgt-identity93.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 79.2%
Final simplification77.1%
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 (- 1.0 (/ y z)))))
(*
x_s
(if (<= z -1.05e-22)
t_1
(if (<= z 4e-121)
(/ (* x_m y) t)
(if (or (<= z 6e-97) (not (<= z 5.7e-37))) t_1 (/ x_m (/ t 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 * (1.0 - (y / z));
double tmp;
if (z <= -1.05e-22) {
tmp = t_1;
} else if (z <= 4e-121) {
tmp = (x_m * y) / t;
} else if ((z <= 6e-97) || !(z <= 5.7e-37)) {
tmp = t_1;
} else {
tmp = x_m / (t / 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 * (1.0d0 - (y / z))
if (z <= (-1.05d-22)) then
tmp = t_1
else if (z <= 4d-121) then
tmp = (x_m * y) / t
else if ((z <= 6d-97) .or. (.not. (z <= 5.7d-37))) then
tmp = t_1
else
tmp = x_m / (t / 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 * (1.0 - (y / z));
double tmp;
if (z <= -1.05e-22) {
tmp = t_1;
} else if (z <= 4e-121) {
tmp = (x_m * y) / t;
} else if ((z <= 6e-97) || !(z <= 5.7e-37)) {
tmp = t_1;
} else {
tmp = x_m / (t / 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 * (1.0 - (y / z)) tmp = 0 if z <= -1.05e-22: tmp = t_1 elif z <= 4e-121: tmp = (x_m * y) / t elif (z <= 6e-97) or not (z <= 5.7e-37): tmp = t_1 else: tmp = x_m / (t / 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(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.05e-22) tmp = t_1; elseif (z <= 4e-121) tmp = Float64(Float64(x_m * y) / t); elseif ((z <= 6e-97) || !(z <= 5.7e-37)) tmp = t_1; else tmp = Float64(x_m / Float64(t / 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 * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.05e-22) tmp = t_1; elseif (z <= 4e-121) tmp = (x_m * y) / t; elseif ((z <= 6e-97) || ~((z <= 5.7e-37))) tmp = t_1; else tmp = x_m / (t / 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[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.05e-22], t$95$1, If[LessEqual[z, 4e-121], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[z, 6e-97], N[Not[LessEqual[z, 5.7e-37]], $MachinePrecision]], t$95$1, N[(x$95$m / N[(t / 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 \left(1 - \frac{y}{z}\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-121}:\\
\;\;\;\;\frac{x\_m \cdot y}{t}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-97} \lor \neg \left(z \leq 5.7 \cdot 10^{-37}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{\frac{t}{y}}\\
\end{array}
\end{array}
\end{array}
if z < -1.05000000000000004e-22 or 3.9999999999999999e-121 < z < 6.00000000000000048e-97 or 5.69999999999999973e-37 < z Initial program 81.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 63.8%
mul-1-neg63.8%
associate-/l*78.7%
distribute-rgt-neg-in78.7%
distribute-frac-neg78.7%
sub-neg78.7%
distribute-neg-in78.7%
remove-double-neg78.7%
+-commutative78.7%
sub-neg78.7%
div-sub78.7%
*-inverses78.7%
Simplified78.7%
if -1.05000000000000004e-22 < z < 3.9999999999999999e-121Initial program 95.0%
associate-/l*85.5%
Simplified85.5%
Taylor expanded in z around 0 69.5%
if 6.00000000000000048e-97 < z < 5.69999999999999973e-37Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 99.8%
*-rgt-identity99.8%
times-frac93.6%
/-rgt-identity93.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 79.2%
Final simplification75.1%
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 (- 1.0 (/ y z)))))
(*
x_s
(if (<= z -1.45e+92)
(* x_m (/ z (- z t)))
(if (<= z -1200000.0)
t_1
(if (<= z 3.1e-124)
(* (- y z) (/ x_m t))
(if (<= z 1.2e-33) (/ x_m (/ (- t z) y)) 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.45e+92) {
tmp = x_m * (z / (z - t));
} else if (z <= -1200000.0) {
tmp = t_1;
} else if (z <= 3.1e-124) {
tmp = (y - z) * (x_m / t);
} else if (z <= 1.2e-33) {
tmp = x_m / ((t - z) / y);
} 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.45d+92)) then
tmp = x_m * (z / (z - t))
else if (z <= (-1200000.0d0)) then
tmp = t_1
else if (z <= 3.1d-124) then
tmp = (y - z) * (x_m / t)
else if (z <= 1.2d-33) then
tmp = x_m / ((t - z) / y)
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.45e+92) {
tmp = x_m * (z / (z - t));
} else if (z <= -1200000.0) {
tmp = t_1;
} else if (z <= 3.1e-124) {
tmp = (y - z) * (x_m / t);
} else if (z <= 1.2e-33) {
tmp = x_m / ((t - z) / y);
} 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.45e+92: tmp = x_m * (z / (z - t)) elif z <= -1200000.0: tmp = t_1 elif z <= 3.1e-124: tmp = (y - z) * (x_m / t) elif z <= 1.2e-33: tmp = x_m / ((t - z) / y) 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.45e+92) tmp = Float64(x_m * Float64(z / Float64(z - t))); elseif (z <= -1200000.0) tmp = t_1; elseif (z <= 3.1e-124) tmp = Float64(Float64(y - z) * Float64(x_m / t)); elseif (z <= 1.2e-33) tmp = Float64(x_m / Float64(Float64(t - z) / y)); 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.45e+92) tmp = x_m * (z / (z - t)); elseif (z <= -1200000.0) tmp = t_1; elseif (z <= 3.1e-124) tmp = (y - z) * (x_m / t); elseif (z <= 1.2e-33) tmp = x_m / ((t - z) / y); 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.45e+92], N[(x$95$m * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1200000.0], t$95$1, If[LessEqual[z, 3.1e-124], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e-33], N[(x$95$m / N[(N[(t - z), $MachinePrecision] / y), $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.45 \cdot 10^{+92}:\\
\;\;\;\;x\_m \cdot \frac{z}{z - t}\\
\mathbf{elif}\;z \leq -1200000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-124}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x\_m}{t}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-33}:\\
\;\;\;\;\frac{x\_m}{\frac{t - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if z < -1.45e92Initial program 62.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 50.3%
mul-1-neg50.3%
distribute-neg-frac250.3%
sub-neg50.3%
distribute-neg-in50.3%
remove-double-neg50.3%
+-commutative50.3%
sub-neg50.3%
associate-/l*85.5%
Simplified85.5%
if -1.45e92 < z < -1.2e6 or 1.2e-33 < z Initial program 87.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 72.1%
mul-1-neg72.1%
associate-/l*83.2%
distribute-rgt-neg-in83.2%
distribute-frac-neg83.2%
sub-neg83.2%
distribute-neg-in83.2%
remove-double-neg83.2%
+-commutative83.2%
sub-neg83.2%
div-sub83.3%
*-inverses83.3%
Simplified83.3%
if -1.2e6 < z < 3.0999999999999998e-124Initial program 95.2%
associate-/l*86.3%
Simplified86.3%
Taylor expanded in x around 0 95.2%
*-rgt-identity95.2%
times-frac96.0%
/-rgt-identity96.0%
associate-/r/84.5%
Simplified84.5%
clear-num84.5%
associate-/r/84.3%
Applied egg-rr84.3%
Taylor expanded in t around inf 70.4%
associate-*l/70.5%
*-un-lft-identity70.5%
associate-/r/79.4%
Applied egg-rr79.4%
if 3.0999999999999998e-124 < z < 1.2e-33Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 99.8%
*-rgt-identity99.8%
times-frac90.9%
/-rgt-identity90.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 77.5%
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 (* x_m (- 1.0 (/ y z)))))
(*
x_s
(if (<= z -8.5e+91)
(* x_m (/ z (- z t)))
(if (<= z -1200000.0)
t_1
(if (<= z -3.8e-246)
(* x_m (/ (- y z) t))
(if (<= z 6.8e-35) (* (- y z) (/ x_m 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 <= -8.5e+91) {
tmp = x_m * (z / (z - t));
} else if (z <= -1200000.0) {
tmp = t_1;
} else if (z <= -3.8e-246) {
tmp = x_m * ((y - z) / t);
} else if (z <= 6.8e-35) {
tmp = (y - z) * (x_m / 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 <= (-8.5d+91)) then
tmp = x_m * (z / (z - t))
else if (z <= (-1200000.0d0)) then
tmp = t_1
else if (z <= (-3.8d-246)) then
tmp = x_m * ((y - z) / t)
else if (z <= 6.8d-35) then
tmp = (y - z) * (x_m / 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 <= -8.5e+91) {
tmp = x_m * (z / (z - t));
} else if (z <= -1200000.0) {
tmp = t_1;
} else if (z <= -3.8e-246) {
tmp = x_m * ((y - z) / t);
} else if (z <= 6.8e-35) {
tmp = (y - z) * (x_m / 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 <= -8.5e+91: tmp = x_m * (z / (z - t)) elif z <= -1200000.0: tmp = t_1 elif z <= -3.8e-246: tmp = x_m * ((y - z) / t) elif z <= 6.8e-35: tmp = (y - z) * (x_m / 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 <= -8.5e+91) tmp = Float64(x_m * Float64(z / Float64(z - t))); elseif (z <= -1200000.0) tmp = t_1; elseif (z <= -3.8e-246) tmp = Float64(x_m * Float64(Float64(y - z) / t)); elseif (z <= 6.8e-35) tmp = Float64(Float64(y - z) * Float64(x_m / 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 <= -8.5e+91) tmp = x_m * (z / (z - t)); elseif (z <= -1200000.0) tmp = t_1; elseif (z <= -3.8e-246) tmp = x_m * ((y - z) / t); elseif (z <= 6.8e-35) tmp = (y - z) * (x_m / 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, -8.5e+91], N[(x$95$m * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1200000.0], t$95$1, If[LessEqual[z, -3.8e-246], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e-35], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / t), $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 -8.5 \cdot 10^{+91}:\\
\;\;\;\;x\_m \cdot \frac{z}{z - t}\\
\mathbf{elif}\;z \leq -1200000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-246}:\\
\;\;\;\;x\_m \cdot \frac{y - z}{t}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-35}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x\_m}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if z < -8.4999999999999995e91Initial program 62.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 50.3%
mul-1-neg50.3%
distribute-neg-frac250.3%
sub-neg50.3%
distribute-neg-in50.3%
remove-double-neg50.3%
+-commutative50.3%
sub-neg50.3%
associate-/l*85.5%
Simplified85.5%
if -8.4999999999999995e91 < z < -1.2e6 or 6.8000000000000005e-35 < z Initial program 87.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 72.1%
mul-1-neg72.1%
associate-/l*83.2%
distribute-rgt-neg-in83.2%
distribute-frac-neg83.2%
sub-neg83.2%
distribute-neg-in83.2%
remove-double-neg83.2%
+-commutative83.2%
sub-neg83.2%
div-sub83.3%
*-inverses83.3%
Simplified83.3%
if -1.2e6 < z < -3.79999999999999976e-246Initial program 94.3%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in t around inf 69.2%
associate-/l*70.1%
Simplified70.1%
if -3.79999999999999976e-246 < z < 6.8000000000000005e-35Initial program 97.2%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in x around 0 97.2%
*-rgt-identity97.2%
times-frac95.7%
/-rgt-identity95.7%
associate-/r/84.3%
Simplified84.3%
clear-num84.3%
associate-/r/84.2%
Applied egg-rr84.2%
Taylor expanded in t around inf 73.4%
associate-*l/73.4%
*-un-lft-identity73.4%
associate-/r/84.8%
Applied egg-rr84.8%
Final simplification81.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
(let* ((t_1 (* x_m (- 1.0 (/ y z)))))
(*
x_s
(if (<= z -3.7e+92)
(* x_m (/ z (- z t)))
(if (<= z -13000000.0)
t_1
(if (<= z -9.5e-204)
(* x_m (/ (- y z) t))
(if (<= z 1.45e-33) (* y (/ x_m (- 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 <= -3.7e+92) {
tmp = x_m * (z / (z - t));
} else if (z <= -13000000.0) {
tmp = t_1;
} else if (z <= -9.5e-204) {
tmp = x_m * ((y - z) / t);
} else if (z <= 1.45e-33) {
tmp = y * (x_m / (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 <= (-3.7d+92)) then
tmp = x_m * (z / (z - t))
else if (z <= (-13000000.0d0)) then
tmp = t_1
else if (z <= (-9.5d-204)) then
tmp = x_m * ((y - z) / t)
else if (z <= 1.45d-33) then
tmp = y * (x_m / (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 <= -3.7e+92) {
tmp = x_m * (z / (z - t));
} else if (z <= -13000000.0) {
tmp = t_1;
} else if (z <= -9.5e-204) {
tmp = x_m * ((y - z) / t);
} else if (z <= 1.45e-33) {
tmp = y * (x_m / (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 <= -3.7e+92: tmp = x_m * (z / (z - t)) elif z <= -13000000.0: tmp = t_1 elif z <= -9.5e-204: tmp = x_m * ((y - z) / t) elif z <= 1.45e-33: tmp = y * (x_m / (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 <= -3.7e+92) tmp = Float64(x_m * Float64(z / Float64(z - t))); elseif (z <= -13000000.0) tmp = t_1; elseif (z <= -9.5e-204) tmp = Float64(x_m * Float64(Float64(y - z) / t)); elseif (z <= 1.45e-33) tmp = Float64(y * Float64(x_m / 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 <= -3.7e+92) tmp = x_m * (z / (z - t)); elseif (z <= -13000000.0) tmp = t_1; elseif (z <= -9.5e-204) tmp = x_m * ((y - z) / t); elseif (z <= 1.45e-33) tmp = y * (x_m / (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, -3.7e+92], N[(x$95$m * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -13000000.0], t$95$1, If[LessEqual[z, -9.5e-204], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e-33], N[(y * N[(x$95$m / 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 -3.7 \cdot 10^{+92}:\\
\;\;\;\;x\_m \cdot \frac{z}{z - t}\\
\mathbf{elif}\;z \leq -13000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-204}:\\
\;\;\;\;x\_m \cdot \frac{y - z}{t}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-33}:\\
\;\;\;\;y \cdot \frac{x\_m}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if z < -3.69999999999999999e92Initial program 62.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 50.3%
mul-1-neg50.3%
distribute-neg-frac250.3%
sub-neg50.3%
distribute-neg-in50.3%
remove-double-neg50.3%
+-commutative50.3%
sub-neg50.3%
associate-/l*85.5%
Simplified85.5%
if -3.69999999999999999e92 < z < -1.3e7 or 1.45000000000000001e-33 < z Initial program 87.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 72.1%
mul-1-neg72.1%
associate-/l*83.2%
distribute-rgt-neg-in83.2%
distribute-frac-neg83.2%
sub-neg83.2%
distribute-neg-in83.2%
remove-double-neg83.2%
+-commutative83.2%
sub-neg83.2%
div-sub83.3%
*-inverses83.3%
Simplified83.3%
if -1.3e7 < z < -9.50000000000000063e-204Initial program 93.2%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in t around inf 67.5%
associate-/l*68.6%
Simplified68.6%
if -9.50000000000000063e-204 < z < 1.45000000000000001e-33Initial program 97.4%
associate-/l*86.2%
Simplified86.2%
Taylor expanded in x around 0 97.4%
*-rgt-identity97.4%
times-frac96.1%
/-rgt-identity96.1%
associate-/r/86.0%
Simplified86.0%
Taylor expanded in y around inf 84.0%
associate-*l/83.7%
*-commutative83.7%
Simplified83.7%
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 (<= z -3.5e+91)
(* x_m (/ z (- z t)))
(if (or (<= z -3e-22) (not (<= z 1.85e-33)))
(* 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 <= -3.5e+91) {
tmp = x_m * (z / (z - t));
} else if ((z <= -3e-22) || !(z <= 1.85e-33)) {
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 <= (-3.5d+91)) then
tmp = x_m * (z / (z - t))
else if ((z <= (-3d-22)) .or. (.not. (z <= 1.85d-33))) 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 <= -3.5e+91) {
tmp = x_m * (z / (z - t));
} else if ((z <= -3e-22) || !(z <= 1.85e-33)) {
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 <= -3.5e+91: tmp = x_m * (z / (z - t)) elif (z <= -3e-22) or not (z <= 1.85e-33): 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 <= -3.5e+91) tmp = Float64(x_m * Float64(z / Float64(z - t))); elseif ((z <= -3e-22) || !(z <= 1.85e-33)) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); else tmp = Float64(Float64(x_m * 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 <= -3.5e+91) tmp = x_m * (z / (z - t)); elseif ((z <= -3e-22) || ~((z <= 1.85e-33))) 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[LessEqual[z, -3.5e+91], N[(x$95$m * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3e-22], N[Not[LessEqual[z, 1.85e-33]], $MachinePrecision]], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y), $MachinePrecision] / N[(t - 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}\;z \leq -3.5 \cdot 10^{+91}:\\
\;\;\;\;x\_m \cdot \frac{z}{z - t}\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-22} \lor \neg \left(z \leq 1.85 \cdot 10^{-33}\right):\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m \cdot y}{t - z}\\
\end{array}
\end{array}
if z < -3.50000000000000001e91Initial program 62.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 50.3%
mul-1-neg50.3%
distribute-neg-frac250.3%
sub-neg50.3%
distribute-neg-in50.3%
remove-double-neg50.3%
+-commutative50.3%
sub-neg50.3%
associate-/l*85.5%
Simplified85.5%
if -3.50000000000000001e91 < z < -2.9999999999999999e-22 or 1.85000000000000007e-33 < z Initial program 88.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 70.7%
mul-1-neg70.7%
associate-/l*81.2%
distribute-rgt-neg-in81.2%
distribute-frac-neg81.2%
sub-neg81.2%
distribute-neg-in81.2%
remove-double-neg81.2%
+-commutative81.2%
sub-neg81.2%
div-sub81.2%
*-inverses81.2%
Simplified81.2%
if -2.9999999999999999e-22 < z < 1.85000000000000007e-33Initial program 95.8%
associate-/l*88.0%
Simplified88.0%
Taylor expanded in y around inf 79.7%
Final simplification81.2%
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 (<= z -1.42e+90)
(* x_m (/ z (- z t)))
(if (<= z -2.3e-95)
(/ x_m (/ (- t z) y))
(if (<= z 8.2e-35) (/ (* x_m (- y z)) t) (* x_m (- 1.0 (/ 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 (z <= -1.42e+90) {
tmp = x_m * (z / (z - t));
} else if (z <= -2.3e-95) {
tmp = x_m / ((t - z) / y);
} else if (z <= 8.2e-35) {
tmp = (x_m * (y - z)) / t;
} else {
tmp = x_m * (1.0 - (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 (z <= (-1.42d+90)) then
tmp = x_m * (z / (z - t))
else if (z <= (-2.3d-95)) then
tmp = x_m / ((t - z) / y)
else if (z <= 8.2d-35) then
tmp = (x_m * (y - z)) / t
else
tmp = x_m * (1.0d0 - (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 (z <= -1.42e+90) {
tmp = x_m * (z / (z - t));
} else if (z <= -2.3e-95) {
tmp = x_m / ((t - z) / y);
} else if (z <= 8.2e-35) {
tmp = (x_m * (y - z)) / t;
} else {
tmp = x_m * (1.0 - (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 z <= -1.42e+90: tmp = x_m * (z / (z - t)) elif z <= -2.3e-95: tmp = x_m / ((t - z) / y) elif z <= 8.2e-35: tmp = (x_m * (y - z)) / t else: tmp = x_m * (1.0 - (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 (z <= -1.42e+90) tmp = Float64(x_m * Float64(z / Float64(z - t))); elseif (z <= -2.3e-95) tmp = Float64(x_m / Float64(Float64(t - z) / y)); elseif (z <= 8.2e-35) tmp = Float64(Float64(x_m * Float64(y - z)) / t); else tmp = Float64(x_m * Float64(1.0 - Float64(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 (z <= -1.42e+90) tmp = x_m * (z / (z - t)); elseif (z <= -2.3e-95) tmp = x_m / ((t - z) / y); elseif (z <= 8.2e-35) tmp = (x_m * (y - z)) / t; else tmp = x_m * (1.0 - (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[z, -1.42e+90], N[(x$95$m * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e-95], N[(x$95$m / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-35], N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(x$95$m * N[(1.0 - N[(y / 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 -1.42 \cdot 10^{+90}:\\
\;\;\;\;x\_m \cdot \frac{z}{z - t}\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-95}:\\
\;\;\;\;\frac{x\_m}{\frac{t - z}{y}}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-35}:\\
\;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -1.42e90Initial program 63.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 51.5%
mul-1-neg51.5%
distribute-neg-frac251.5%
sub-neg51.5%
distribute-neg-in51.5%
remove-double-neg51.5%
+-commutative51.5%
sub-neg51.5%
associate-/l*85.9%
Simplified85.9%
if -1.42e90 < z < -2.29999999999999999e-95Initial program 87.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 87.8%
*-rgt-identity87.8%
times-frac97.9%
/-rgt-identity97.9%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around inf 69.6%
if -2.29999999999999999e-95 < z < 8.20000000000000052e-35Initial program 97.1%
associate-/l*86.6%
Simplified86.6%
Taylor expanded in t around inf 81.8%
if 8.20000000000000052e-35 < z Initial program 88.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 72.9%
mul-1-neg72.9%
associate-/l*84.7%
distribute-rgt-neg-in84.7%
distribute-frac-neg84.7%
sub-neg84.7%
distribute-neg-in84.7%
remove-double-neg84.7%
+-commutative84.7%
sub-neg84.7%
div-sub84.7%
*-inverses84.7%
Simplified84.7%
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 (<= z -3e-22) x_m (if (<= z 5.2e-34) (/ (* 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 <= -3e-22) {
tmp = x_m;
} else if (z <= 5.2e-34) {
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 <= (-3d-22)) then
tmp = x_m
else if (z <= 5.2d-34) 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 <= -3e-22) {
tmp = x_m;
} else if (z <= 5.2e-34) {
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 <= -3e-22: tmp = x_m elif z <= 5.2e-34: 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 <= -3e-22) tmp = x_m; elseif (z <= 5.2e-34) 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 <= -3e-22) tmp = x_m; elseif (z <= 5.2e-34) 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, -3e-22], x$95$m, If[LessEqual[z, 5.2e-34], 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 -3 \cdot 10^{-22}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-34}:\\
\;\;\;\;\frac{x\_m \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -2.9999999999999999e-22 or 5.1999999999999999e-34 < z Initial program 80.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 56.4%
if -2.9999999999999999e-22 < z < 5.1999999999999999e-34Initial program 95.8%
associate-/l*88.0%
Simplified88.0%
Taylor expanded in z around 0 67.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 (if (<= z -3e-22) x_m (if (<= z 1.85e-33) (* y (/ 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 <= -3e-22) {
tmp = x_m;
} else if (z <= 1.85e-33) {
tmp = y * (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 <= (-3d-22)) then
tmp = x_m
else if (z <= 1.85d-33) then
tmp = y * (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 <= -3e-22) {
tmp = x_m;
} else if (z <= 1.85e-33) {
tmp = y * (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 <= -3e-22: tmp = x_m elif z <= 1.85e-33: tmp = y * (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 <= -3e-22) tmp = x_m; elseif (z <= 1.85e-33) tmp = Float64(y * 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 <= -3e-22) tmp = x_m; elseif (z <= 1.85e-33) tmp = y * (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, -3e-22], x$95$m, If[LessEqual[z, 1.85e-33], N[(y * 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 -3 \cdot 10^{-22}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-33}:\\
\;\;\;\;y \cdot \frac{x\_m}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -2.9999999999999999e-22 or 1.85000000000000007e-33 < z Initial program 80.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 56.4%
if -2.9999999999999999e-22 < z < 1.85000000000000007e-33Initial program 95.8%
associate-/l*88.0%
Simplified88.0%
Taylor expanded in z around 0 67.4%
associate-/l*64.8%
Simplified64.8%
clear-num64.7%
un-div-inv64.7%
Applied egg-rr64.7%
associate-/r/65.7%
Simplified65.7%
Final simplification60.8%
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 (<= z -3e-22) x_m (if (<= z 3.3e-34) (* 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 <= -3e-22) {
tmp = x_m;
} else if (z <= 3.3e-34) {
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 <= (-3d-22)) then
tmp = x_m
else if (z <= 3.3d-34) 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 <= -3e-22) {
tmp = x_m;
} else if (z <= 3.3e-34) {
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 <= -3e-22: tmp = x_m elif z <= 3.3e-34: 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 <= -3e-22) tmp = x_m; elseif (z <= 3.3e-34) 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 <= -3e-22) tmp = x_m; elseif (z <= 3.3e-34) 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, -3e-22], x$95$m, If[LessEqual[z, 3.3e-34], 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 -3 \cdot 10^{-22}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-34}:\\
\;\;\;\;x\_m \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -2.9999999999999999e-22 or 3.29999999999999983e-34 < z Initial program 80.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 56.4%
if -2.9999999999999999e-22 < z < 3.29999999999999983e-34Initial program 95.8%
associate-/l*88.0%
Simplified88.0%
Taylor expanded in z around 0 67.4%
associate-/l*64.8%
Simplified64.8%
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 2e-11) (* x_m (/ (- y z) (- t z))) (* (- z y) (/ x_m (- 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 (x_m <= 2e-11) {
tmp = x_m * ((y - z) / (t - z));
} else {
tmp = (z - y) * (x_m / (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 (x_m <= 2d-11) then
tmp = x_m * ((y - z) / (t - z))
else
tmp = (z - y) * (x_m / (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 (x_m <= 2e-11) {
tmp = x_m * ((y - z) / (t - z));
} else {
tmp = (z - y) * (x_m / (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 x_m <= 2e-11: tmp = x_m * ((y - z) / (t - z)) else: tmp = (z - y) * (x_m / (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 (x_m <= 2e-11) tmp = Float64(x_m * Float64(Float64(y - z) / Float64(t - z))); else tmp = Float64(Float64(z - y) * Float64(x_m / 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 (x_m <= 2e-11) tmp = x_m * ((y - z) / (t - z)); else tmp = (z - y) * (x_m / (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[LessEqual[x$95$m, 2e-11], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - y), $MachinePrecision] * N[(x$95$m / 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}\;x\_m \leq 2 \cdot 10^{-11}:\\
\;\;\;\;x\_m \cdot \frac{y - z}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\left(z - y\right) \cdot \frac{x\_m}{z - t}\\
\end{array}
\end{array}
if x < 1.99999999999999988e-11Initial program 92.5%
associate-/l*96.4%
Simplified96.4%
if 1.99999999999999988e-11 < x Initial program 74.4%
remove-double-neg74.4%
distribute-lft-neg-out74.4%
distribute-neg-frac74.4%
distribute-neg-frac274.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
sub-neg74.4%
distribute-neg-in74.4%
remove-double-neg74.4%
+-commutative74.4%
sub-neg74.4%
sub-neg74.4%
distribute-neg-in74.4%
remove-double-neg74.4%
+-commutative74.4%
sub-neg74.4%
Simplified74.4%
*-commutative74.4%
associate-/l*96.9%
Applied egg-rr96.9%
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 (/ (- 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 87.9%
associate-/l*94.2%
Simplified94.2%
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))
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 87.9%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in z around inf 33.1%
(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 2024110
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:alt
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))