
(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 13 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 1.12e+156)
(/ x_m (/ (- t z) (- y z)))
(* (/ x_m (- z t)) (- z y)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (x_m <= 1.12e+156) {
tmp = x_m / ((t - z) / (y - z));
} else {
tmp = (x_m / (z - t)) * (z - 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) :: tmp
if (x_m <= 1.12d+156) then
tmp = x_m / ((t - z) / (y - z))
else
tmp = (x_m / (z - t)) * (z - 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 tmp;
if (x_m <= 1.12e+156) {
tmp = x_m / ((t - z) / (y - z));
} else {
tmp = (x_m / (z - t)) * (z - 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): tmp = 0 if x_m <= 1.12e+156: tmp = x_m / ((t - z) / (y - z)) else: tmp = (x_m / (z - t)) * (z - y) 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 <= 1.12e+156) tmp = Float64(x_m / Float64(Float64(t - z) / Float64(y - z))); else tmp = Float64(Float64(x_m / Float64(z - t)) * Float64(z - 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) tmp = 0.0; if (x_m <= 1.12e+156) tmp = x_m / ((t - z) / (y - z)); else tmp = (x_m / (z - t)) * (z - 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_] := N[(x$95$s * If[LessEqual[x$95$m, 1.12e+156], N[(x$95$m / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(z - y), $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 1.12 \cdot 10^{+156}:\\
\;\;\;\;\frac{x\_m}{\frac{t - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z - t} \cdot \left(z - y\right)\\
\end{array}
\end{array}
if x < 1.12000000000000007e156Initial program 87.5%
associate-/l*97.0%
Simplified97.0%
clear-num96.9%
un-div-inv97.1%
Applied egg-rr97.1%
if 1.12000000000000007e156 < x Initial program 73.0%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in x around 0 73.0%
remove-double-neg73.0%
distribute-neg-frac273.0%
*-commutative73.0%
associate-/l*99.7%
distribute-lft-neg-out99.7%
neg-sub099.7%
associate--r-99.7%
neg-sub099.7%
+-commutative99.7%
sub-neg99.7%
neg-sub099.7%
associate--r-99.7%
neg-sub099.7%
+-commutative99.7%
sub-neg99.7%
*-commutative99.7%
Simplified99.7%
Final simplification97.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 -1.65e+75)
x_m
(if (<= z 5.5e-39)
(/ (* x_m y) t)
(if (<= z 8.5e+76) (* (- x_m) (/ z t)) x_m)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -1.65e+75) {
tmp = x_m;
} else if (z <= 5.5e-39) {
tmp = (x_m * y) / t;
} else if (z <= 8.5e+76) {
tmp = -x_m * (z / 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 <= (-1.65d+75)) then
tmp = x_m
else if (z <= 5.5d-39) then
tmp = (x_m * y) / t
else if (z <= 8.5d+76) then
tmp = -x_m * (z / 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 <= -1.65e+75) {
tmp = x_m;
} else if (z <= 5.5e-39) {
tmp = (x_m * y) / t;
} else if (z <= 8.5e+76) {
tmp = -x_m * (z / 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 <= -1.65e+75: tmp = x_m elif z <= 5.5e-39: tmp = (x_m * y) / t elif z <= 8.5e+76: tmp = -x_m * (z / 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 <= -1.65e+75) tmp = x_m; elseif (z <= 5.5e-39) tmp = Float64(Float64(x_m * y) / t); elseif (z <= 8.5e+76) tmp = Float64(Float64(-x_m) * Float64(z / 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 <= -1.65e+75) tmp = x_m; elseif (z <= 5.5e-39) tmp = (x_m * y) / t; elseif (z <= 8.5e+76) tmp = -x_m * (z / 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, -1.65e+75], x$95$m, If[LessEqual[z, 5.5e-39], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 8.5e+76], N[((-x$95$m) * N[(z / 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 -1.65 \cdot 10^{+75}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-39}:\\
\;\;\;\;\frac{x\_m \cdot y}{t}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+76}:\\
\;\;\;\;\left(-x\_m\right) \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -1.64999999999999999e75 or 8.49999999999999992e76 < z Initial program 68.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 70.5%
if -1.64999999999999999e75 < z < 5.50000000000000018e-39Initial program 96.4%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in z around 0 68.1%
if 5.50000000000000018e-39 < z < 8.49999999999999992e76Initial program 96.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 61.3%
Taylor expanded in y around 0 49.9%
mul-1-neg49.9%
associate-/l*53.7%
distribute-lft-neg-in53.7%
Simplified53.7%
Final simplification67.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 (or (<= z -3.8e-62) (not (<= z 1.7e-56)))
(* x_m (- 1.0 (/ y z)))
(/ 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 <= -3.8e-62) || !(z <= 1.7e-56)) {
tmp = x_m * (1.0 - (y / z));
} else {
tmp = y / (t / x_m);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-3.8d-62)) .or. (.not. (z <= 1.7d-56))) then
tmp = x_m * (1.0d0 - (y / z))
else
tmp = y / (t / x_m)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((z <= -3.8e-62) || !(z <= 1.7e-56)) {
tmp = x_m * (1.0 - (y / z));
} else {
tmp = y / (t / x_m);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (z <= -3.8e-62) or not (z <= 1.7e-56): tmp = x_m * (1.0 - (y / z)) else: tmp = y / (t / x_m) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((z <= -3.8e-62) || !(z <= 1.7e-56)) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); else tmp = Float64(y / Float64(t / x_m)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((z <= -3.8e-62) || ~((z <= 1.7e-56))) tmp = x_m * (1.0 - (y / z)); else tmp = y / (t / x_m); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -3.8e-62], N[Not[LessEqual[z, 1.7e-56]], $MachinePrecision]], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(t / x$95$m), $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.8 \cdot 10^{-62} \lor \neg \left(z \leq 1.7 \cdot 10^{-56}\right):\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t}{x\_m}}\\
\end{array}
\end{array}
if z < -3.80000000000000006e-62 or 1.69999999999999991e-56 < z Initial program 77.7%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in t around 0 53.9%
mul-1-neg53.9%
associate-/l*71.8%
distribute-rgt-neg-in71.8%
distribute-frac-neg71.8%
neg-sub071.8%
associate--r-71.8%
neg-sub071.8%
+-commutative71.8%
sub-neg71.8%
div-sub71.8%
*-inverses71.8%
Simplified71.8%
if -3.80000000000000006e-62 < z < 1.69999999999999991e-56Initial program 95.8%
associate-/l*92.0%
Simplified92.0%
clear-num91.6%
un-div-inv92.1%
Applied egg-rr92.1%
Taylor expanded in y around inf 87.2%
associate-*l/85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in t around inf 72.8%
clear-num72.7%
un-div-inv73.0%
Applied egg-rr73.0%
Final simplification72.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 (or (<= z -2.75e+45) (not (<= z 7e+38)))
(* 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 <= -2.75e+45) || !(z <= 7e+38)) {
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 <= (-2.75d+45)) .or. (.not. (z <= 7d+38))) 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 <= -2.75e+45) || !(z <= 7e+38)) {
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 <= -2.75e+45) or not (z <= 7e+38): 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 <= -2.75e+45) || !(z <= 7e+38)) 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 <= -2.75e+45) || ~((z <= 7e+38))) 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, -2.75e+45], N[Not[LessEqual[z, 7e+38]], $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 -2.75 \cdot 10^{+45} \lor \neg \left(z \leq 7 \cdot 10^{+38}\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 < -2.75e45 or 7.00000000000000003e38 < z Initial program 71.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 55.6%
mul-1-neg55.6%
associate-/l*78.2%
distribute-rgt-neg-in78.2%
distribute-frac-neg78.2%
neg-sub078.2%
associate--r-78.2%
neg-sub078.2%
+-commutative78.2%
sub-neg78.2%
div-sub78.2%
*-inverses78.2%
Simplified78.2%
if -2.75e45 < z < 7.00000000000000003e38Initial program 96.6%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in y around inf 82.5%
associate-/l*79.2%
Simplified79.2%
Final simplification78.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 -6.2e+39)
(* x_m (- 1.0 (/ y z)))
(if (<= z 4e+34) (* x_m (/ y (- t z))) (* x_m (/ z (- 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 (z <= -6.2e+39) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= 4e+34) {
tmp = x_m * (y / (t - z));
} else {
tmp = x_m * (z / (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 (z <= (-6.2d+39)) then
tmp = x_m * (1.0d0 - (y / z))
else if (z <= 4d+34) then
tmp = x_m * (y / (t - z))
else
tmp = x_m * (z / (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 (z <= -6.2e+39) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= 4e+34) {
tmp = x_m * (y / (t - z));
} else {
tmp = x_m * (z / (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 z <= -6.2e+39: tmp = x_m * (1.0 - (y / z)) elif z <= 4e+34: tmp = x_m * (y / (t - z)) else: tmp = x_m * (z / (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 (z <= -6.2e+39) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); elseif (z <= 4e+34) tmp = Float64(x_m * Float64(y / Float64(t - z))); else tmp = Float64(x_m * Float64(z / 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 (z <= -6.2e+39) tmp = x_m * (1.0 - (y / z)); elseif (z <= 4e+34) tmp = x_m * (y / (t - z)); else tmp = x_m * (z / (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[z, -6.2e+39], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+34], N[(x$95$m * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(z / 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}\;z \leq -6.2 \cdot 10^{+39}:\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+34}:\\
\;\;\;\;x\_m \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{z}{z - t}\\
\end{array}
\end{array}
if z < -6.2000000000000005e39Initial program 60.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 49.1%
mul-1-neg49.1%
associate-/l*81.9%
distribute-rgt-neg-in81.9%
distribute-frac-neg81.9%
neg-sub081.9%
associate--r-81.9%
neg-sub081.9%
+-commutative81.9%
sub-neg81.9%
div-sub81.9%
*-inverses81.9%
Simplified81.9%
if -6.2000000000000005e39 < z < 3.99999999999999978e34Initial program 96.5%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in y around inf 83.0%
associate-/l*79.7%
Simplified79.7%
if 3.99999999999999978e34 < z Initial program 80.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 69.7%
mul-1-neg69.7%
distribute-neg-frac269.7%
neg-sub069.7%
associate--r-69.7%
neg-sub069.7%
+-commutative69.7%
sub-neg69.7%
associate-/l*85.2%
Simplified85.2%
Final simplification81.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -2.5e+47)
(* x_m (- 1.0 (/ y z)))
(if (<= z 1.3e-27) (* y (/ x_m (- t z))) (* x_m (/ z (- 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 (z <= -2.5e+47) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= 1.3e-27) {
tmp = y * (x_m / (t - z));
} else {
tmp = x_m * (z / (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 (z <= (-2.5d+47)) then
tmp = x_m * (1.0d0 - (y / z))
else if (z <= 1.3d-27) then
tmp = y * (x_m / (t - z))
else
tmp = x_m * (z / (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 (z <= -2.5e+47) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= 1.3e-27) {
tmp = y * (x_m / (t - z));
} else {
tmp = x_m * (z / (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 z <= -2.5e+47: tmp = x_m * (1.0 - (y / z)) elif z <= 1.3e-27: tmp = y * (x_m / (t - z)) else: tmp = x_m * (z / (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 (z <= -2.5e+47) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); elseif (z <= 1.3e-27) tmp = Float64(y * Float64(x_m / Float64(t - z))); else tmp = Float64(x_m * Float64(z / 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 (z <= -2.5e+47) tmp = x_m * (1.0 - (y / z)); elseif (z <= 1.3e-27) tmp = y * (x_m / (t - z)); else tmp = x_m * (z / (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[z, -2.5e+47], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e-27], N[(y * N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(z / 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}\;z \leq -2.5 \cdot 10^{+47}:\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-27}:\\
\;\;\;\;y \cdot \frac{x\_m}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{z}{z - t}\\
\end{array}
\end{array}
if z < -2.50000000000000011e47Initial program 60.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 49.1%
mul-1-neg49.1%
associate-/l*81.9%
distribute-rgt-neg-in81.9%
distribute-frac-neg81.9%
neg-sub081.9%
associate--r-81.9%
neg-sub081.9%
+-commutative81.9%
sub-neg81.9%
div-sub81.9%
*-inverses81.9%
Simplified81.9%
if -2.50000000000000011e47 < z < 1.30000000000000009e-27Initial program 96.3%
associate-/l*92.7%
Simplified92.7%
clear-num92.1%
un-div-inv92.5%
Applied egg-rr92.5%
Taylor expanded in y around inf 84.1%
associate-*l/82.3%
*-commutative82.3%
Simplified82.3%
if 1.30000000000000009e-27 < z Initial program 83.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 67.9%
mul-1-neg67.9%
distribute-neg-frac267.9%
neg-sub067.9%
associate--r-67.9%
neg-sub067.9%
+-commutative67.9%
sub-neg67.9%
associate-/l*81.6%
Simplified81.6%
Final simplification82.0%
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 -2.1e+40)
(* x_m (- 1.0 (/ y z)))
(if (<= z 4.8e-25) (/ y (/ (- t z) x_m)) (* x_m (/ z (- 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 (z <= -2.1e+40) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= 4.8e-25) {
tmp = y / ((t - z) / x_m);
} else {
tmp = x_m * (z / (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 (z <= (-2.1d+40)) then
tmp = x_m * (1.0d0 - (y / z))
else if (z <= 4.8d-25) then
tmp = y / ((t - z) / x_m)
else
tmp = x_m * (z / (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 (z <= -2.1e+40) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= 4.8e-25) {
tmp = y / ((t - z) / x_m);
} else {
tmp = x_m * (z / (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 z <= -2.1e+40: tmp = x_m * (1.0 - (y / z)) elif z <= 4.8e-25: tmp = y / ((t - z) / x_m) else: tmp = x_m * (z / (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 (z <= -2.1e+40) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); elseif (z <= 4.8e-25) tmp = Float64(y / Float64(Float64(t - z) / x_m)); else tmp = Float64(x_m * Float64(z / 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 (z <= -2.1e+40) tmp = x_m * (1.0 - (y / z)); elseif (z <= 4.8e-25) tmp = y / ((t - z) / x_m); else tmp = x_m * (z / (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[z, -2.1e+40], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e-25], N[(y / N[(N[(t - z), $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(z / 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}\;z \leq -2.1 \cdot 10^{+40}:\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-25}:\\
\;\;\;\;\frac{y}{\frac{t - z}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{z}{z - t}\\
\end{array}
\end{array}
if z < -2.1000000000000001e40Initial program 60.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 49.1%
mul-1-neg49.1%
associate-/l*81.9%
distribute-rgt-neg-in81.9%
distribute-frac-neg81.9%
neg-sub081.9%
associate--r-81.9%
neg-sub081.9%
+-commutative81.9%
sub-neg81.9%
div-sub81.9%
*-inverses81.9%
Simplified81.9%
if -2.1000000000000001e40 < z < 4.80000000000000018e-25Initial program 96.3%
associate-/l*92.7%
Simplified92.7%
clear-num92.1%
un-div-inv92.5%
Applied egg-rr92.5%
*-un-lft-identity92.5%
div-inv92.4%
times-frac96.1%
Applied egg-rr96.1%
Taylor expanded in y around inf 84.1%
*-commutative84.1%
*-rgt-identity84.1%
times-frac80.6%
/-rgt-identity80.6%
associate-/r/82.5%
Simplified82.5%
if 4.80000000000000018e-25 < z Initial program 83.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 67.9%
mul-1-neg67.9%
distribute-neg-frac267.9%
neg-sub067.9%
associate--r-67.9%
neg-sub067.9%
+-commutative67.9%
sub-neg67.9%
associate-/l*81.6%
Simplified81.6%
Final simplification82.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
(*
x_s
(if (<= z -3.3e+49)
(* x_m (- 1.0 (/ y z)))
(if (<= z 4.6e+34) (/ (* x_m y) (- t z)) (* x_m (/ z (- 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 (z <= -3.3e+49) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= 4.6e+34) {
tmp = (x_m * y) / (t - z);
} else {
tmp = x_m * (z / (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 (z <= (-3.3d+49)) then
tmp = x_m * (1.0d0 - (y / z))
else if (z <= 4.6d+34) then
tmp = (x_m * y) / (t - z)
else
tmp = x_m * (z / (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 (z <= -3.3e+49) {
tmp = x_m * (1.0 - (y / z));
} else if (z <= 4.6e+34) {
tmp = (x_m * y) / (t - z);
} else {
tmp = x_m * (z / (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 z <= -3.3e+49: tmp = x_m * (1.0 - (y / z)) elif z <= 4.6e+34: tmp = (x_m * y) / (t - z) else: tmp = x_m * (z / (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 (z <= -3.3e+49) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); elseif (z <= 4.6e+34) tmp = Float64(Float64(x_m * y) / Float64(t - z)); else tmp = Float64(x_m * Float64(z / 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 (z <= -3.3e+49) tmp = x_m * (1.0 - (y / z)); elseif (z <= 4.6e+34) tmp = (x_m * y) / (t - z); else tmp = x_m * (z / (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[z, -3.3e+49], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+34], N[(N[(x$95$m * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(z / 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}\;z \leq -3.3 \cdot 10^{+49}:\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+34}:\\
\;\;\;\;\frac{x\_m \cdot y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{z}{z - t}\\
\end{array}
\end{array}
if z < -3.2999999999999998e49Initial program 60.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 49.1%
mul-1-neg49.1%
associate-/l*81.9%
distribute-rgt-neg-in81.9%
distribute-frac-neg81.9%
neg-sub081.9%
associate--r-81.9%
neg-sub081.9%
+-commutative81.9%
sub-neg81.9%
div-sub81.9%
*-inverses81.9%
Simplified81.9%
if -3.2999999999999998e49 < z < 4.5999999999999996e34Initial program 96.5%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in y around inf 83.0%
if 4.5999999999999996e34 < z Initial program 80.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 69.7%
mul-1-neg69.7%
distribute-neg-frac269.7%
neg-sub069.7%
associate--r-69.7%
neg-sub069.7%
+-commutative69.7%
sub-neg69.7%
associate-/l*85.2%
Simplified85.2%
Final simplification83.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 -1.35e+75) x_m (if (<= z 3.5e+82) (* 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 <= -1.35e+75) {
tmp = x_m;
} else if (z <= 3.5e+82) {
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 <= (-1.35d+75)) then
tmp = x_m
else if (z <= 3.5d+82) 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 <= -1.35e+75) {
tmp = x_m;
} else if (z <= 3.5e+82) {
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 <= -1.35e+75: tmp = x_m elif z <= 3.5e+82: 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 <= -1.35e+75) tmp = x_m; elseif (z <= 3.5e+82) 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 <= -1.35e+75) tmp = x_m; elseif (z <= 3.5e+82) 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, -1.35e+75], x$95$m, If[LessEqual[z, 3.5e+82], 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 -1.35 \cdot 10^{+75}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+82}:\\
\;\;\;\;x\_m \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -1.34999999999999999e75 or 3.5e82 < z Initial program 67.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 71.3%
if -1.34999999999999999e75 < z < 3.5e82Initial program 96.3%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in z around 0 62.7%
associate-/l*61.4%
Simplified61.4%
Final simplification65.0%
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.05e+75) x_m (if (<= z 9e+81) (/ (* 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 <= -1.05e+75) {
tmp = x_m;
} else if (z <= 9e+81) {
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 <= (-1.05d+75)) then
tmp = x_m
else if (z <= 9d+81) 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 <= -1.05e+75) {
tmp = x_m;
} else if (z <= 9e+81) {
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 <= -1.05e+75: tmp = x_m elif z <= 9e+81: 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 <= -1.05e+75) tmp = x_m; elseif (z <= 9e+81) 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 <= -1.05e+75) tmp = x_m; elseif (z <= 9e+81) 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, -1.05e+75], x$95$m, If[LessEqual[z, 9e+81], 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 -1.05 \cdot 10^{+75}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+81}:\\
\;\;\;\;\frac{x\_m \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -1.04999999999999999e75 or 9.00000000000000034e81 < z Initial program 67.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 71.3%
if -1.04999999999999999e75 < z < 9.00000000000000034e81Initial program 96.3%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in z around 0 62.7%
Final simplification65.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
(if (<= x_m 9e+156)
(* x_m (/ (- y z) (- t z)))
(* (/ x_m (- z t)) (- z y)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (x_m <= 9e+156) {
tmp = x_m * ((y - z) / (t - z));
} else {
tmp = (x_m / (z - t)) * (z - 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) :: tmp
if (x_m <= 9d+156) then
tmp = x_m * ((y - z) / (t - z))
else
tmp = (x_m / (z - t)) * (z - 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 tmp;
if (x_m <= 9e+156) {
tmp = x_m * ((y - z) / (t - z));
} else {
tmp = (x_m / (z - t)) * (z - 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): tmp = 0 if x_m <= 9e+156: tmp = x_m * ((y - z) / (t - z)) else: tmp = (x_m / (z - t)) * (z - y) 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 <= 9e+156) tmp = Float64(x_m * Float64(Float64(y - z) / Float64(t - z))); else tmp = Float64(Float64(x_m / Float64(z - t)) * Float64(z - 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) tmp = 0.0; if (x_m <= 9e+156) tmp = x_m * ((y - z) / (t - z)); else tmp = (x_m / (z - t)) * (z - 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_] := N[(x$95$s * If[LessEqual[x$95$m, 9e+156], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(z - y), $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 9 \cdot 10^{+156}:\\
\;\;\;\;x\_m \cdot \frac{y - z}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z - t} \cdot \left(z - y\right)\\
\end{array}
\end{array}
if x < 9.00000000000000061e156Initial program 87.5%
associate-/l*97.0%
Simplified97.0%
if 9.00000000000000061e156 < x Initial program 73.0%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in x around 0 73.0%
remove-double-neg73.0%
distribute-neg-frac273.0%
*-commutative73.0%
associate-/l*99.7%
distribute-lft-neg-out99.7%
neg-sub099.7%
associate--r-99.7%
neg-sub099.7%
+-commutative99.7%
sub-neg99.7%
neg-sub099.7%
associate--r-99.7%
neg-sub099.7%
+-commutative99.7%
sub-neg99.7%
*-commutative99.7%
Simplified99.7%
Final simplification97.3%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (* x_m (/ (- 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 85.9%
associate-/l*96.0%
Simplified96.0%
Final simplification96.0%
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 85.9%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in z around inf 32.8%
Final simplification32.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 2024080
(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)))