
(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 14 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 5e-5) (/ (* x_m (- y z)) (- t z)) (* (- y z) (/ x_m (- t z))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (x_m <= 5e-5) {
tmp = (x_m * (y - z)) / (t - z);
} else {
tmp = (y - z) * (x_m / (t - z));
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x_m <= 5d-5) then
tmp = (x_m * (y - z)) / (t - z)
else
tmp = (y - z) * (x_m / (t - z))
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (x_m <= 5e-5) {
tmp = (x_m * (y - z)) / (t - z);
} else {
tmp = (y - z) * (x_m / (t - z));
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if x_m <= 5e-5: tmp = (x_m * (y - z)) / (t - z) else: tmp = (y - z) * (x_m / (t - z)) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (x_m <= 5e-5) tmp = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z)); else tmp = Float64(Float64(y - z) * Float64(x_m / Float64(t - z))); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (x_m <= 5e-5) tmp = (x_m * (y - z)) / (t - z); else tmp = (y - z) * (x_m / (t - z)); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[x$95$m, 5e-5], N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x\_m}{t - z}\\
\end{array}
\end{array}
if x < 5.00000000000000024e-5Initial program 86.8%
if 5.00000000000000024e-5 < x Initial program 67.5%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.8
Applied egg-rr99.8%
Final simplification90.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 (* (- y z) (/ x_m (- t z))))
(t_2 (* x_m (- y z)))
(t_3 (/ t_2 (- t z))))
(*
x_s
(if (<= t_3 -1e-141)
t_1
(if (<= t_3 1e-310)
(/ t_2 t)
(if (<= t_3 2e-98) (/ (* x_m z) (- z 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 = (y - z) * (x_m / (t - z));
double t_2 = x_m * (y - z);
double t_3 = t_2 / (t - z);
double tmp;
if (t_3 <= -1e-141) {
tmp = t_1;
} else if (t_3 <= 1e-310) {
tmp = t_2 / t;
} else if (t_3 <= 2e-98) {
tmp = (x_m * z) / (z - 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (y - z) * (x_m / (t - z))
t_2 = x_m * (y - z)
t_3 = t_2 / (t - z)
if (t_3 <= (-1d-141)) then
tmp = t_1
else if (t_3 <= 1d-310) then
tmp = t_2 / t
else if (t_3 <= 2d-98) then
tmp = (x_m * z) / (z - 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 = (y - z) * (x_m / (t - z));
double t_2 = x_m * (y - z);
double t_3 = t_2 / (t - z);
double tmp;
if (t_3 <= -1e-141) {
tmp = t_1;
} else if (t_3 <= 1e-310) {
tmp = t_2 / t;
} else if (t_3 <= 2e-98) {
tmp = (x_m * z) / (z - 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 = (y - z) * (x_m / (t - z)) t_2 = x_m * (y - z) t_3 = t_2 / (t - z) tmp = 0 if t_3 <= -1e-141: tmp = t_1 elif t_3 <= 1e-310: tmp = t_2 / t elif t_3 <= 2e-98: tmp = (x_m * z) / (z - 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(Float64(y - z) * Float64(x_m / Float64(t - z))) t_2 = Float64(x_m * Float64(y - z)) t_3 = Float64(t_2 / Float64(t - z)) tmp = 0.0 if (t_3 <= -1e-141) tmp = t_1; elseif (t_3 <= 1e-310) tmp = Float64(t_2 / t); elseif (t_3 <= 2e-98) tmp = Float64(Float64(x_m * z) / Float64(z - 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 = (y - z) * (x_m / (t - z)); t_2 = x_m * (y - z); t_3 = t_2 / (t - z); tmp = 0.0; if (t_3 <= -1e-141) tmp = t_1; elseif (t_3 <= 1e-310) tmp = t_2 / t; elseif (t_3 <= 2e-98) tmp = (x_m * z) / (z - 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[(N[(y - z), $MachinePrecision] * N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$3, -1e-141], t$95$1, If[LessEqual[t$95$3, 1e-310], N[(t$95$2 / t), $MachinePrecision], If[LessEqual[t$95$3, 2e-98], N[(N[(x$95$m * z), $MachinePrecision] / N[(z - 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 := \left(y - z\right) \cdot \frac{x\_m}{t - z}\\
t_2 := x\_m \cdot \left(y - z\right)\\
t_3 := \frac{t\_2}{t - z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{-141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq 10^{-310}:\\
\;\;\;\;\frac{t\_2}{t}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{-98}:\\
\;\;\;\;\frac{x\_m \cdot z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -1e-141 or 1.99999999999999988e-98 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) Initial program 73.8%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.5
Applied egg-rr96.5%
if -1e-141 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 9.999999999999969e-311Initial program 99.9%
Taylor expanded in t around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6476.9
Simplified76.9%
if 9.999999999999969e-311 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 1.99999999999999988e-98Initial program 99.7%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.5
Applied egg-rr99.5%
Taylor expanded in y around 0
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6433.8
Simplified33.8%
associate-*r/N/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f6465.8
Applied egg-rr65.8%
Final simplification89.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
(let* ((t_1 (* x_m (- y z))) (t_2 (/ t_1 (- t z))))
(*
x_s
(if (<= t_2 -2e-114)
(* y (/ x_m (- t z)))
(if (<= t_2 1e-310)
(/ t_1 t)
(if (<= t_2 2e-75) (/ (* x_m z) (- z t)) (- x_m (* y (/ x_m 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 t_1 = x_m * (y - z);
double t_2 = t_1 / (t - z);
double tmp;
if (t_2 <= -2e-114) {
tmp = y * (x_m / (t - z));
} else if (t_2 <= 1e-310) {
tmp = t_1 / t;
} else if (t_2 <= 2e-75) {
tmp = (x_m * z) / (z - t);
} else {
tmp = x_m - (y * (x_m / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x_m * (y - z)
t_2 = t_1 / (t - z)
if (t_2 <= (-2d-114)) then
tmp = y * (x_m / (t - z))
else if (t_2 <= 1d-310) then
tmp = t_1 / t
else if (t_2 <= 2d-75) then
tmp = (x_m * z) / (z - t)
else
tmp = x_m - (y * (x_m / 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 t_1 = x_m * (y - z);
double t_2 = t_1 / (t - z);
double tmp;
if (t_2 <= -2e-114) {
tmp = y * (x_m / (t - z));
} else if (t_2 <= 1e-310) {
tmp = t_1 / t;
} else if (t_2 <= 2e-75) {
tmp = (x_m * z) / (z - t);
} else {
tmp = x_m - (y * (x_m / 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): t_1 = x_m * (y - z) t_2 = t_1 / (t - z) tmp = 0 if t_2 <= -2e-114: tmp = y * (x_m / (t - z)) elif t_2 <= 1e-310: tmp = t_1 / t elif t_2 <= 2e-75: tmp = (x_m * z) / (z - t) else: tmp = x_m - (y * (x_m / z)) 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(y - z)) t_2 = Float64(t_1 / Float64(t - z)) tmp = 0.0 if (t_2 <= -2e-114) tmp = Float64(y * Float64(x_m / Float64(t - z))); elseif (t_2 <= 1e-310) tmp = Float64(t_1 / t); elseif (t_2 <= 2e-75) tmp = Float64(Float64(x_m * z) / Float64(z - t)); else tmp = Float64(x_m - Float64(y * Float64(x_m / 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) t_1 = x_m * (y - z); t_2 = t_1 / (t - z); tmp = 0.0; if (t_2 <= -2e-114) tmp = y * (x_m / (t - z)); elseif (t_2 <= 1e-310) tmp = t_1 / t; elseif (t_2 <= 2e-75) tmp = (x_m * z) / (z - t); else tmp = x_m - (y * (x_m / 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_] := Block[{t$95$1 = N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$2, -2e-114], N[(y * N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-310], N[(t$95$1 / t), $MachinePrecision], If[LessEqual[t$95$2, 2e-75], N[(N[(x$95$m * z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(x$95$m - N[(y * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := x\_m \cdot \left(y - z\right)\\
t_2 := \frac{t\_1}{t - z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-114}:\\
\;\;\;\;y \cdot \frac{x\_m}{t - z}\\
\mathbf{elif}\;t\_2 \leq 10^{-310}:\\
\;\;\;\;\frac{t\_1}{t}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-75}:\\
\;\;\;\;\frac{x\_m \cdot z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;x\_m - y \cdot \frac{x\_m}{z}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -2.0000000000000001e-114Initial program 73.5%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.8
Applied egg-rr99.8%
Taylor expanded in y around inf
/-lowering-/.f64N/A
--lowering--.f6446.2
Simplified46.2%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6445.1
Applied egg-rr45.1%
if -2.0000000000000001e-114 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 9.999999999999969e-311Initial program 99.8%
Taylor expanded in t around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6474.7
Simplified74.7%
if 9.999999999999969e-311 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 1.9999999999999999e-75Initial program 99.6%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.5
Applied egg-rr99.5%
Taylor expanded in y around 0
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6434.9
Simplified34.9%
associate-*r/N/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f6465.0
Applied egg-rr65.0%
if 1.9999999999999999e-75 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) Initial program 72.3%
Taylor expanded in t around 0
mul-1-negN/A
neg-sub0N/A
associate-/l*N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-/l*N/A
mul-1-negN/A
unsub-negN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6463.7
Simplified63.7%
Final simplification59.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 (- y z)) (- t z))))
(*
x_s
(if (<= t_1 -2e-114)
(* y (/ x_m (- t z)))
(if (<= t_1 1e-310)
(* x_m (/ (- y z) t))
(if (<= t_1 2e-75) (/ (* x_m z) (- z t)) (- x_m (* y (/ x_m 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 t_1 = (x_m * (y - z)) / (t - z);
double tmp;
if (t_1 <= -2e-114) {
tmp = y * (x_m / (t - z));
} else if (t_1 <= 1e-310) {
tmp = x_m * ((y - z) / t);
} else if (t_1 <= 2e-75) {
tmp = (x_m * z) / (z - t);
} else {
tmp = x_m - (y * (x_m / 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) :: t_1
real(8) :: tmp
t_1 = (x_m * (y - z)) / (t - z)
if (t_1 <= (-2d-114)) then
tmp = y * (x_m / (t - z))
else if (t_1 <= 1d-310) then
tmp = x_m * ((y - z) / t)
else if (t_1 <= 2d-75) then
tmp = (x_m * z) / (z - t)
else
tmp = x_m - (y * (x_m / 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 t_1 = (x_m * (y - z)) / (t - z);
double tmp;
if (t_1 <= -2e-114) {
tmp = y * (x_m / (t - z));
} else if (t_1 <= 1e-310) {
tmp = x_m * ((y - z) / t);
} else if (t_1 <= 2e-75) {
tmp = (x_m * z) / (z - t);
} else {
tmp = x_m - (y * (x_m / 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): t_1 = (x_m * (y - z)) / (t - z) tmp = 0 if t_1 <= -2e-114: tmp = y * (x_m / (t - z)) elif t_1 <= 1e-310: tmp = x_m * ((y - z) / t) elif t_1 <= 2e-75: tmp = (x_m * z) / (z - t) else: tmp = x_m - (y * (x_m / z)) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z)) tmp = 0.0 if (t_1 <= -2e-114) tmp = Float64(y * Float64(x_m / Float64(t - z))); elseif (t_1 <= 1e-310) tmp = Float64(x_m * Float64(Float64(y - z) / t)); elseif (t_1 <= 2e-75) tmp = Float64(Float64(x_m * z) / Float64(z - t)); else tmp = Float64(x_m - Float64(y * Float64(x_m / 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) t_1 = (x_m * (y - z)) / (t - z); tmp = 0.0; if (t_1 <= -2e-114) tmp = y * (x_m / (t - z)); elseif (t_1 <= 1e-310) tmp = x_m * ((y - z) / t); elseif (t_1 <= 2e-75) tmp = (x_m * z) / (z - t); else tmp = x_m - (y * (x_m / 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_] := Block[{t$95$1 = N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, -2e-114], N[(y * N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-310], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-75], N[(N[(x$95$m * z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(x$95$m - N[(y * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{x\_m \cdot \left(y - z\right)}{t - z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-114}:\\
\;\;\;\;y \cdot \frac{x\_m}{t - z}\\
\mathbf{elif}\;t\_1 \leq 10^{-310}:\\
\;\;\;\;x\_m \cdot \frac{y - z}{t}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-75}:\\
\;\;\;\;\frac{x\_m \cdot z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;x\_m - y \cdot \frac{x\_m}{z}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -2.0000000000000001e-114Initial program 73.5%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.8
Applied egg-rr99.8%
Taylor expanded in y around inf
/-lowering-/.f64N/A
--lowering--.f6446.2
Simplified46.2%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6445.1
Applied egg-rr45.1%
if -2.0000000000000001e-114 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 9.999999999999969e-311Initial program 99.8%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6466.7
Applied egg-rr66.7%
Taylor expanded in t around inf
/-lowering-/.f6462.2
Simplified62.2%
*-commutativeN/A
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6470.7
Applied egg-rr70.7%
if 9.999999999999969e-311 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 1.9999999999999999e-75Initial program 99.6%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.5
Applied egg-rr99.5%
Taylor expanded in y around 0
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6434.9
Simplified34.9%
associate-*r/N/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f6465.0
Applied egg-rr65.0%
if 1.9999999999999999e-75 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) Initial program 72.3%
Taylor expanded in t around 0
mul-1-negN/A
neg-sub0N/A
associate-/l*N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-/l*N/A
mul-1-negN/A
unsub-negN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6463.7
Simplified63.7%
Final simplification59.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
(let* ((t_1 (/ (* x_m (- y z)) (- t z))))
(*
x_s
(if (<= t_1 -2e-114)
(* y (/ x_m (- t z)))
(if (<= t_1 1e-310) (* x_m (/ (- y z) t)) (- x_m (* y (/ x_m 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 t_1 = (x_m * (y - z)) / (t - z);
double tmp;
if (t_1 <= -2e-114) {
tmp = y * (x_m / (t - z));
} else if (t_1 <= 1e-310) {
tmp = x_m * ((y - z) / t);
} else {
tmp = x_m - (y * (x_m / 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) :: t_1
real(8) :: tmp
t_1 = (x_m * (y - z)) / (t - z)
if (t_1 <= (-2d-114)) then
tmp = y * (x_m / (t - z))
else if (t_1 <= 1d-310) then
tmp = x_m * ((y - z) / t)
else
tmp = x_m - (y * (x_m / 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 t_1 = (x_m * (y - z)) / (t - z);
double tmp;
if (t_1 <= -2e-114) {
tmp = y * (x_m / (t - z));
} else if (t_1 <= 1e-310) {
tmp = x_m * ((y - z) / t);
} else {
tmp = x_m - (y * (x_m / 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): t_1 = (x_m * (y - z)) / (t - z) tmp = 0 if t_1 <= -2e-114: tmp = y * (x_m / (t - z)) elif t_1 <= 1e-310: tmp = x_m * ((y - z) / t) else: tmp = x_m - (y * (x_m / z)) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z)) tmp = 0.0 if (t_1 <= -2e-114) tmp = Float64(y * Float64(x_m / Float64(t - z))); elseif (t_1 <= 1e-310) tmp = Float64(x_m * Float64(Float64(y - z) / t)); else tmp = Float64(x_m - Float64(y * Float64(x_m / 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) t_1 = (x_m * (y - z)) / (t - z); tmp = 0.0; if (t_1 <= -2e-114) tmp = y * (x_m / (t - z)); elseif (t_1 <= 1e-310) tmp = x_m * ((y - z) / t); else tmp = x_m - (y * (x_m / 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_] := Block[{t$95$1 = N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, -2e-114], N[(y * N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-310], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x$95$m - N[(y * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{x\_m \cdot \left(y - z\right)}{t - z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-114}:\\
\;\;\;\;y \cdot \frac{x\_m}{t - z}\\
\mathbf{elif}\;t\_1 \leq 10^{-310}:\\
\;\;\;\;x\_m \cdot \frac{y - z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m - y \cdot \frac{x\_m}{z}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -2.0000000000000001e-114Initial program 73.5%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.8
Applied egg-rr99.8%
Taylor expanded in y around inf
/-lowering-/.f64N/A
--lowering--.f6446.2
Simplified46.2%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6445.1
Applied egg-rr45.1%
if -2.0000000000000001e-114 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 9.999999999999969e-311Initial program 99.8%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6466.7
Applied egg-rr66.7%
Taylor expanded in t around inf
/-lowering-/.f6462.2
Simplified62.2%
*-commutativeN/A
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6470.7
Applied egg-rr70.7%
if 9.999999999999969e-311 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) Initial program 80.1%
Taylor expanded in t around 0
mul-1-negN/A
neg-sub0N/A
associate-/l*N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-/l*N/A
mul-1-negN/A
unsub-negN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6459.3
Simplified59.3%
Final simplification56.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
(let* ((t_1 (/ (* x_m (- y z)) (- t z))))
(*
x_s
(if (<= t_1 5e-313)
(* t (/ x_m z))
(if (<= t_1 1e+197) x_m (* z (/ x_m 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 t_1 = (x_m * (y - z)) / (t - z);
double tmp;
if (t_1 <= 5e-313) {
tmp = t * (x_m / z);
} else if (t_1 <= 1e+197) {
tmp = x_m;
} else {
tmp = z * (x_m / 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) :: t_1
real(8) :: tmp
t_1 = (x_m * (y - z)) / (t - z)
if (t_1 <= 5d-313) then
tmp = t * (x_m / z)
else if (t_1 <= 1d+197) then
tmp = x_m
else
tmp = z * (x_m / 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 t_1 = (x_m * (y - z)) / (t - z);
double tmp;
if (t_1 <= 5e-313) {
tmp = t * (x_m / z);
} else if (t_1 <= 1e+197) {
tmp = x_m;
} else {
tmp = z * (x_m / 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): t_1 = (x_m * (y - z)) / (t - z) tmp = 0 if t_1 <= 5e-313: tmp = t * (x_m / z) elif t_1 <= 1e+197: tmp = x_m else: tmp = z * (x_m / z) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z)) tmp = 0.0 if (t_1 <= 5e-313) tmp = Float64(t * Float64(x_m / z)); elseif (t_1 <= 1e+197) tmp = x_m; else tmp = Float64(z * Float64(x_m / 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) t_1 = (x_m * (y - z)) / (t - z); tmp = 0.0; if (t_1 <= 5e-313) tmp = t * (x_m / z); elseif (t_1 <= 1e+197) tmp = x_m; else tmp = z * (x_m / 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_] := Block[{t$95$1 = N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, 5e-313], N[(t * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+197], x$95$m, N[(z * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{x\_m \cdot \left(y - z\right)}{t - z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{-313}:\\
\;\;\;\;t \cdot \frac{x\_m}{z}\\
\mathbf{elif}\;t\_1 \leq 10^{+197}:\\
\;\;\;\;x\_m\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{x\_m}{z}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 5.00000000002e-313Initial program 82.9%
Taylor expanded in z around inf
mul-1-negN/A
unsub-negN/A
associate--r+N/A
mul-1-negN/A
sub-negN/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-lft-out--N/A
*-lowering-*.f64N/A
--lowering--.f6448.5
Simplified48.5%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f647.5
Simplified7.5%
if 5.00000000002e-313 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 9.9999999999999995e196Initial program 99.6%
Taylor expanded in z around inf
Simplified41.8%
if 9.9999999999999995e196 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) Initial program 36.3%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.9
Applied egg-rr99.9%
Taylor expanded in y around 0
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6458.1
Simplified58.1%
Taylor expanded in z around inf
/-lowering-/.f6455.8
Simplified55.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 (- y z)) (- t z)) 5e-313) (* t (/ x_m z)) x_m)))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (((x_m * (y - z)) / (t - z)) <= 5e-313) {
tmp = t * (x_m / z);
} 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 (((x_m * (y - z)) / (t - z)) <= 5d-313) then
tmp = t * (x_m / z)
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 (((x_m * (y - z)) / (t - z)) <= 5e-313) {
tmp = t * (x_m / z);
} 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 ((x_m * (y - z)) / (t - z)) <= 5e-313: tmp = t * (x_m / z) 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 (Float64(Float64(x_m * Float64(y - z)) / Float64(t - z)) <= 5e-313) tmp = Float64(t * Float64(x_m / z)); 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 (((x_m * (y - z)) / (t - z)) <= 5e-313) tmp = t * (x_m / z); 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[N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], 5e-313], N[(t * N[(x$95$m / z), $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}\;\frac{x\_m \cdot \left(y - z\right)}{t - z} \leq 5 \cdot 10^{-313}:\\
\;\;\;\;t \cdot \frac{x\_m}{z}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 5.00000000002e-313Initial program 82.9%
Taylor expanded in z around inf
mul-1-negN/A
unsub-negN/A
associate--r+N/A
mul-1-negN/A
sub-negN/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-lft-out--N/A
*-lowering-*.f64N/A
--lowering--.f6448.5
Simplified48.5%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f647.5
Simplified7.5%
if 5.00000000002e-313 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) Initial program 80.2%
Taylor expanded in z around inf
Simplified41.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -1.25e+163)
x_m
(if (<= z -1.8e+74)
(* z (/ x_m (- z t)))
(if (<= z 8.6e+73) (* x_m (/ y (- t z))) x_m)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -1.25e+163) {
tmp = x_m;
} else if (z <= -1.8e+74) {
tmp = z * (x_m / (z - t));
} else if (z <= 8.6e+73) {
tmp = x_m * (y / (t - z));
} 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.25d+163)) then
tmp = x_m
else if (z <= (-1.8d+74)) then
tmp = z * (x_m / (z - t))
else if (z <= 8.6d+73) then
tmp = x_m * (y / (t - z))
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.25e+163) {
tmp = x_m;
} else if (z <= -1.8e+74) {
tmp = z * (x_m / (z - t));
} else if (z <= 8.6e+73) {
tmp = x_m * (y / (t - z));
} 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.25e+163: tmp = x_m elif z <= -1.8e+74: tmp = z * (x_m / (z - t)) elif z <= 8.6e+73: tmp = x_m * (y / (t - z)) 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.25e+163) tmp = x_m; elseif (z <= -1.8e+74) tmp = Float64(z * Float64(x_m / Float64(z - t))); elseif (z <= 8.6e+73) tmp = Float64(x_m * Float64(y / Float64(t - z))); 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.25e+163) tmp = x_m; elseif (z <= -1.8e+74) tmp = z * (x_m / (z - t)); elseif (z <= 8.6e+73) tmp = x_m * (y / (t - z)); 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.25e+163], x$95$m, If[LessEqual[z, -1.8e+74], N[(z * N[(x$95$m / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.6e+73], N[(x$95$m * N[(y / N[(t - z), $MachinePrecision]), $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.25 \cdot 10^{+163}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{+74}:\\
\;\;\;\;z \cdot \frac{x\_m}{z - t}\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{+73}:\\
\;\;\;\;x\_m \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -1.25e163 or 8.60000000000000026e73 < z Initial program 61.4%
Taylor expanded in z around inf
Simplified73.8%
if -1.25e163 < z < -1.79999999999999994e74Initial program 79.6%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.9
Applied egg-rr99.9%
Taylor expanded in y around 0
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6491.6
Simplified91.6%
if -1.79999999999999994e74 < z < 8.60000000000000026e73Initial program 94.0%
Taylor expanded in y around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6473.5
Simplified73.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 -4.2e+71)
x_m
(if (<= z -9200000000000.0)
(* x_m (- (/ y z)))
(if (<= z 1.2) (* 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 <= -4.2e+71) {
tmp = x_m;
} else if (z <= -9200000000000.0) {
tmp = x_m * -(y / z);
} else if (z <= 1.2) {
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 <= (-4.2d+71)) then
tmp = x_m
else if (z <= (-9200000000000.0d0)) then
tmp = x_m * -(y / z)
else if (z <= 1.2d0) 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 <= -4.2e+71) {
tmp = x_m;
} else if (z <= -9200000000000.0) {
tmp = x_m * -(y / z);
} else if (z <= 1.2) {
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 <= -4.2e+71: tmp = x_m elif z <= -9200000000000.0: tmp = x_m * -(y / z) elif z <= 1.2: 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 <= -4.2e+71) tmp = x_m; elseif (z <= -9200000000000.0) tmp = Float64(x_m * Float64(-Float64(y / z))); elseif (z <= 1.2) 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 <= -4.2e+71) tmp = x_m; elseif (z <= -9200000000000.0) tmp = x_m * -(y / z); elseif (z <= 1.2) 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, -4.2e+71], x$95$m, If[LessEqual[z, -9200000000000.0], N[(x$95$m * (-N[(y / z), $MachinePrecision])), $MachinePrecision], If[LessEqual[z, 1.2], 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 -4.2 \cdot 10^{+71}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq -9200000000000:\\
\;\;\;\;x\_m \cdot \left(-\frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 1.2:\\
\;\;\;\;y \cdot \frac{x\_m}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -4.19999999999999978e71 or 1.19999999999999996 < z Initial program 68.8%
Taylor expanded in z around inf
Simplified66.3%
if -4.19999999999999978e71 < z < -9.2e12Initial program 88.9%
Taylor expanded in t around 0
mul-1-negN/A
neg-sub0N/A
associate-/l*N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-/l*N/A
mul-1-negN/A
unsub-negN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6460.5
Simplified60.5%
Taylor expanded in y around inf
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6451.6
Simplified51.6%
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
clear-numN/A
/-rgt-identityN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6451.6
Applied egg-rr51.6%
if -9.2e12 < z < 1.19999999999999996Initial program 95.5%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.4
Applied egg-rr97.4%
Taylor expanded in t around inf
/-lowering-/.f6475.2
Simplified75.2%
Taylor expanded in y around inf
Simplified67.0%
Final simplification65.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -4e+71)
x_m
(if (<= z -760000000000.0)
(- (* y (/ x_m z)))
(if (<= z 0.014) (* 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 <= -4e+71) {
tmp = x_m;
} else if (z <= -760000000000.0) {
tmp = -(y * (x_m / z));
} else if (z <= 0.014) {
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 <= (-4d+71)) then
tmp = x_m
else if (z <= (-760000000000.0d0)) then
tmp = -(y * (x_m / z))
else if (z <= 0.014d0) 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 <= -4e+71) {
tmp = x_m;
} else if (z <= -760000000000.0) {
tmp = -(y * (x_m / z));
} else if (z <= 0.014) {
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 <= -4e+71: tmp = x_m elif z <= -760000000000.0: tmp = -(y * (x_m / z)) elif z <= 0.014: 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 <= -4e+71) tmp = x_m; elseif (z <= -760000000000.0) tmp = Float64(-Float64(y * Float64(x_m / z))); elseif (z <= 0.014) 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 <= -4e+71) tmp = x_m; elseif (z <= -760000000000.0) tmp = -(y * (x_m / z)); elseif (z <= 0.014) 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, -4e+71], x$95$m, If[LessEqual[z, -760000000000.0], (-N[(y * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision]), If[LessEqual[z, 0.014], 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 -4 \cdot 10^{+71}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq -760000000000:\\
\;\;\;\;-y \cdot \frac{x\_m}{z}\\
\mathbf{elif}\;z \leq 0.014:\\
\;\;\;\;y \cdot \frac{x\_m}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -4.0000000000000002e71 or 0.0140000000000000003 < z Initial program 68.8%
Taylor expanded in z around inf
Simplified66.3%
if -4.0000000000000002e71 < z < -7.6e11Initial program 88.9%
Taylor expanded in t around 0
mul-1-negN/A
neg-sub0N/A
associate-/l*N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-/l*N/A
mul-1-negN/A
unsub-negN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6460.5
Simplified60.5%
Taylor expanded in y around inf
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6451.6
Simplified51.6%
if -7.6e11 < z < 0.0140000000000000003Initial program 95.5%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.4
Applied egg-rr97.4%
Taylor expanded in t around inf
/-lowering-/.f6475.2
Simplified75.2%
Taylor expanded in y around inf
Simplified67.0%
Final simplification65.6%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= z -4.4e+73) x_m (if (<= z 4.4e+72) (* x_m (/ y (- t z))) x_m))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -4.4e+73) {
tmp = x_m;
} else if (z <= 4.4e+72) {
tmp = x_m * (y / (t - z));
} 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 <= (-4.4d+73)) then
tmp = x_m
else if (z <= 4.4d+72) then
tmp = x_m * (y / (t - z))
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 <= -4.4e+73) {
tmp = x_m;
} else if (z <= 4.4e+72) {
tmp = x_m * (y / (t - z));
} 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 <= -4.4e+73: tmp = x_m elif z <= 4.4e+72: tmp = x_m * (y / (t - z)) 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 <= -4.4e+73) tmp = x_m; elseif (z <= 4.4e+72) tmp = Float64(x_m * Float64(y / Float64(t - z))); 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 <= -4.4e+73) tmp = x_m; elseif (z <= 4.4e+72) tmp = x_m * (y / (t - z)); 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, -4.4e+73], x$95$m, If[LessEqual[z, 4.4e+72], N[(x$95$m * N[(y / N[(t - z), $MachinePrecision]), $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 -4.4 \cdot 10^{+73}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+72}:\\
\;\;\;\;x\_m \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -4.4e73 or 4.4e72 < z Initial program 65.2%
Taylor expanded in z around inf
Simplified72.7%
if -4.4e73 < z < 4.4e72Initial program 94.0%
Taylor expanded in y around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6473.5
Simplified73.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 -3.4e+66) x_m (if (<= z 250.0) (* 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 <= -3.4e+66) {
tmp = x_m;
} else if (z <= 250.0) {
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 <= (-3.4d+66)) then
tmp = x_m
else if (z <= 250.0d0) 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 <= -3.4e+66) {
tmp = x_m;
} else if (z <= 250.0) {
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 <= -3.4e+66: tmp = x_m elif z <= 250.0: 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 <= -3.4e+66) tmp = x_m; elseif (z <= 250.0) 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 <= -3.4e+66) tmp = x_m; elseif (z <= 250.0) 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, -3.4e+66], x$95$m, If[LessEqual[z, 250.0], 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.4 \cdot 10^{+66}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq 250:\\
\;\;\;\;y \cdot \frac{x\_m}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -3.4000000000000003e66 or 250 < z Initial program 69.7%
Taylor expanded in z around inf
Simplified65.9%
if -3.4000000000000003e66 < z < 250Initial program 94.4%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.5
Applied egg-rr96.5%
Taylor expanded in t around inf
/-lowering-/.f6471.4
Simplified71.4%
Taylor expanded in y around inf
Simplified61.4%
Final simplification63.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 (/ x_m (/ (- t z) (- 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) {
return x_s * (x_m / ((t - z) / (y - z)));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x_s * (x_m / ((t - z) / (y - z)))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
return x_s * (x_m / ((t - z) / (y - z)));
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): return x_s * (x_m / ((t - z) / (y - 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(t - z) / Float64(y - z)))) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y, z, t) tmp = x_s * (x_m / ((t - z) / (y - 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[(t - z), $MachinePrecision] / 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 \frac{x\_m}{\frac{t - z}{y - z}}
\end{array}
Initial program 81.6%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.2
Applied egg-rr98.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 81.6%
Taylor expanded in z around inf
Simplified40.6%
(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 2024204
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (/ x (/ (- t z) (- y z))))
(/ (* x (- y z)) (- t z)))