
(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 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * (y - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
x\_m = (fabs.f64 x) x\_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= x_m 2e-26) (/ (* 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 <= 2e-26) {
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 <= 2d-26) 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 <= 2e-26) {
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 <= 2e-26: 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 <= 2e-26) tmp = Float64(Float64(x_m * 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 <= 2e-26) 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, 2e-26], N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $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 2 \cdot 10^{-26}:\\
\;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z - t} \cdot \left(z - y\right)\\
\end{array}
\end{array}
if x < 2.0000000000000001e-26Initial program 88.1%
if 2.0000000000000001e-26 < x Initial program 65.4%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in x around 0 65.4%
remove-double-neg65.4%
distribute-neg-frac265.4%
*-commutative65.4%
associate-/l*98.2%
distribute-lft-neg-out98.2%
neg-sub098.2%
associate--r-98.2%
neg-sub098.2%
+-commutative98.2%
sub-neg98.2%
neg-sub098.2%
associate--r-98.2%
neg-sub098.2%
+-commutative98.2%
sub-neg98.2%
*-commutative98.2%
Simplified98.2%
Final simplification90.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (/ (- y z) t))) (t_2 (* x_m (- 1.0 (/ y z)))))
(*
x_s
(if (<= z -5.6e+18)
t_2
(if (<= z -6.4e-242)
t_1
(if (<= z 6e-233) (/ (* x_m y) t) (if (<= z 8e-60) t_1 t_2)))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = x_m * ((y - z) / t);
double t_2 = x_m * (1.0 - (y / z));
double tmp;
if (z <= -5.6e+18) {
tmp = t_2;
} else if (z <= -6.4e-242) {
tmp = t_1;
} else if (z <= 6e-233) {
tmp = (x_m * y) / t;
} else if (z <= 8e-60) {
tmp = t_1;
} else {
tmp = t_2;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x_m * ((y - z) / t)
t_2 = x_m * (1.0d0 - (y / z))
if (z <= (-5.6d+18)) then
tmp = t_2
else if (z <= (-6.4d-242)) then
tmp = t_1
else if (z <= 6d-233) then
tmp = (x_m * y) / t
else if (z <= 8d-60) then
tmp = t_1
else
tmp = t_2
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = x_m * ((y - z) / t);
double t_2 = x_m * (1.0 - (y / z));
double tmp;
if (z <= -5.6e+18) {
tmp = t_2;
} else if (z <= -6.4e-242) {
tmp = t_1;
} else if (z <= 6e-233) {
tmp = (x_m * y) / t;
} else if (z <= 8e-60) {
tmp = t_1;
} else {
tmp = t_2;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = x_m * ((y - z) / t) t_2 = x_m * (1.0 - (y / z)) tmp = 0 if z <= -5.6e+18: tmp = t_2 elif z <= -6.4e-242: tmp = t_1 elif z <= 6e-233: tmp = (x_m * y) / t elif z <= 8e-60: tmp = t_1 else: tmp = t_2 return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(x_m * Float64(Float64(y - z) / t)) t_2 = Float64(x_m * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -5.6e+18) tmp = t_2; elseif (z <= -6.4e-242) tmp = t_1; elseif (z <= 6e-233) tmp = Float64(Float64(x_m * y) / t); elseif (z <= 8e-60) tmp = t_1; else tmp = t_2; end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = x_m * ((y - z) / t); t_2 = x_m * (1.0 - (y / z)); tmp = 0.0; if (z <= -5.6e+18) tmp = t_2; elseif (z <= -6.4e-242) tmp = t_1; elseif (z <= 6e-233) tmp = (x_m * y) / t; elseif (z <= 8e-60) tmp = t_1; else tmp = t_2; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(x$95$m * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -5.6e+18], t$95$2, If[LessEqual[z, -6.4e-242], t$95$1, If[LessEqual[z, 6e-233], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 8e-60], t$95$1, t$95$2]]]]), $MachinePrecision]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := x\_m \cdot \frac{y - z}{t}\\
t_2 := x\_m \cdot \left(1 - \frac{y}{z}\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-233}:\\
\;\;\;\;\frac{x\_m \cdot y}{t}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if z < -5.6e18 or 7.9999999999999998e-60 < z Initial program 74.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 64.0%
mul-1-neg64.0%
associate-/l*82.3%
distribute-rgt-neg-in82.3%
distribute-frac-neg82.3%
neg-sub082.3%
associate--r-82.3%
neg-sub082.3%
+-commutative82.3%
sub-neg82.3%
div-sub82.3%
*-inverses82.3%
Simplified82.3%
if -5.6e18 < z < -6.39999999999999997e-242 or 5.99999999999999997e-233 < z < 7.9999999999999998e-60Initial program 89.1%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in t around inf 77.9%
associate-/l*82.0%
Simplified82.0%
if -6.39999999999999997e-242 < z < 5.99999999999999997e-233Initial program 97.1%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in z around 0 83.6%
Final simplification82.4%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (- 1.0 (/ y z)))))
(*
x_s
(if (<= z -2.9e+16)
t_1
(if (<= z -2.75e-201)
(* (- y z) (/ x_m t))
(if (<= z 2.15e-209)
(/ (* x_m y) (- t z))
(if (<= z 7.6e-60) (/ x_m (/ t (- y z))) t_1)))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = x_m * (1.0 - (y / z));
double tmp;
if (z <= -2.9e+16) {
tmp = t_1;
} else if (z <= -2.75e-201) {
tmp = (y - z) * (x_m / t);
} else if (z <= 2.15e-209) {
tmp = (x_m * y) / (t - z);
} else if (z <= 7.6e-60) {
tmp = x_m / (t / (y - z));
} else {
tmp = t_1;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x_m * (1.0d0 - (y / z))
if (z <= (-2.9d+16)) then
tmp = t_1
else if (z <= (-2.75d-201)) then
tmp = (y - z) * (x_m / t)
else if (z <= 2.15d-209) then
tmp = (x_m * y) / (t - z)
else if (z <= 7.6d-60) then
tmp = x_m / (t / (y - z))
else
tmp = t_1
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = x_m * (1.0 - (y / z));
double tmp;
if (z <= -2.9e+16) {
tmp = t_1;
} else if (z <= -2.75e-201) {
tmp = (y - z) * (x_m / t);
} else if (z <= 2.15e-209) {
tmp = (x_m * y) / (t - z);
} else if (z <= 7.6e-60) {
tmp = x_m / (t / (y - z));
} else {
tmp = t_1;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = x_m * (1.0 - (y / z)) tmp = 0 if z <= -2.9e+16: tmp = t_1 elif z <= -2.75e-201: tmp = (y - z) * (x_m / t) elif z <= 2.15e-209: tmp = (x_m * y) / (t - z) elif z <= 7.6e-60: tmp = x_m / (t / (y - z)) else: tmp = t_1 return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(x_m * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -2.9e+16) tmp = t_1; elseif (z <= -2.75e-201) tmp = Float64(Float64(y - z) * Float64(x_m / t)); elseif (z <= 2.15e-209) tmp = Float64(Float64(x_m * y) / Float64(t - z)); elseif (z <= 7.6e-60) tmp = Float64(x_m / Float64(t / Float64(y - z))); else tmp = t_1; end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = x_m * (1.0 - (y / z)); tmp = 0.0; if (z <= -2.9e+16) tmp = t_1; elseif (z <= -2.75e-201) tmp = (y - z) * (x_m / t); elseif (z <= 2.15e-209) tmp = (x_m * y) / (t - z); elseif (z <= 7.6e-60) tmp = x_m / (t / (y - z)); else tmp = t_1; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -2.9e+16], t$95$1, If[LessEqual[z, -2.75e-201], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e-209], N[(N[(x$95$m * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e-60], N[(x$95$m / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := x\_m \cdot \left(1 - \frac{y}{z}\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.75 \cdot 10^{-201}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x\_m}{t}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-209}:\\
\;\;\;\;\frac{x\_m \cdot y}{t - z}\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-60}:\\
\;\;\;\;\frac{x\_m}{\frac{t}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if z < -2.9e16 or 7.59999999999999989e-60 < z Initial program 74.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 64.0%
mul-1-neg64.0%
associate-/l*82.3%
distribute-rgt-neg-in82.3%
distribute-frac-neg82.3%
neg-sub082.3%
associate--r-82.3%
neg-sub082.3%
+-commutative82.3%
sub-neg82.3%
div-sub82.3%
*-inverses82.3%
Simplified82.3%
if -2.9e16 < z < -2.75000000000000017e-201Initial program 88.9%
associate-/l*93.9%
Simplified93.9%
clear-num91.1%
un-div-inv91.3%
Applied egg-rr91.3%
Taylor expanded in t around inf 76.6%
associate-/r/79.5%
Applied egg-rr79.5%
if -2.75000000000000017e-201 < z < 2.15000000000000003e-209Initial program 97.9%
associate-/l*83.9%
Simplified83.9%
Taylor expanded in y around inf 94.4%
if 2.15000000000000003e-209 < z < 7.59999999999999989e-60Initial program 84.3%
associate-/l*94.6%
Simplified94.6%
clear-num94.4%
un-div-inv94.6%
Applied egg-rr94.6%
Taylor expanded in t around inf 83.5%
Final simplification84.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -1.8e+17) (not (<= z 7.5e-61)))
(* x_m (- 1.0 (/ y z)))
(* y (/ x_m 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 <= -1.8e+17) || !(z <= 7.5e-61)) {
tmp = x_m * (1.0 - (y / z));
} else {
tmp = y * (x_m / 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 <= (-1.8d+17)) .or. (.not. (z <= 7.5d-61))) then
tmp = x_m * (1.0d0 - (y / z))
else
tmp = y * (x_m / 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 <= -1.8e+17) || !(z <= 7.5e-61)) {
tmp = x_m * (1.0 - (y / z));
} else {
tmp = y * (x_m / 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 <= -1.8e+17) or not (z <= 7.5e-61): tmp = x_m * (1.0 - (y / z)) else: tmp = y * (x_m / 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 <= -1.8e+17) || !(z <= 7.5e-61)) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); else tmp = Float64(y * Float64(x_m / 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 <= -1.8e+17) || ~((z <= 7.5e-61))) tmp = x_m * (1.0 - (y / z)); else tmp = y * (x_m / t); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -1.8e+17], N[Not[LessEqual[z, 7.5e-61]], $MachinePrecision]], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+17} \lor \neg \left(z \leq 7.5 \cdot 10^{-61}\right):\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x\_m}{t}\\
\end{array}
\end{array}
if z < -1.8e17 or 7.50000000000000047e-61 < z Initial program 74.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 64.0%
mul-1-neg64.0%
associate-/l*82.3%
distribute-rgt-neg-in82.3%
distribute-frac-neg82.3%
neg-sub082.3%
associate--r-82.3%
neg-sub082.3%
+-commutative82.3%
sub-neg82.3%
div-sub82.3%
*-inverses82.3%
Simplified82.3%
if -1.8e17 < z < 7.50000000000000047e-61Initial program 91.3%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in y around inf 77.1%
*-commutative77.1%
associate-/l*80.2%
Applied egg-rr80.2%
Taylor expanded in t around inf 71.6%
Final simplification77.2%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -2.6e+17) (not (<= z 4.6e-29)))
(* x_m (- 1.0 (/ y z)))
(* y (/ 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 ((z <= -2.6e+17) || !(z <= 4.6e-29)) {
tmp = x_m * (1.0 - (y / z));
} else {
tmp = y * (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 ((z <= (-2.6d+17)) .or. (.not. (z <= 4.6d-29))) then
tmp = x_m * (1.0d0 - (y / z))
else
tmp = y * (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 ((z <= -2.6e+17) || !(z <= 4.6e-29)) {
tmp = x_m * (1.0 - (y / z));
} else {
tmp = y * (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 (z <= -2.6e+17) or not (z <= 4.6e-29): tmp = x_m * (1.0 - (y / z)) else: tmp = y * (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 ((z <= -2.6e+17) || !(z <= 4.6e-29)) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); else tmp = Float64(y * 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 ((z <= -2.6e+17) || ~((z <= 4.6e-29))) tmp = x_m * (1.0 - (y / z)); else tmp = y * (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[Or[LessEqual[z, -2.6e+17], N[Not[LessEqual[z, 4.6e-29]], $MachinePrecision]], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * 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}\;z \leq -2.6 \cdot 10^{+17} \lor \neg \left(z \leq 4.6 \cdot 10^{-29}\right):\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x\_m}{t - z}\\
\end{array}
\end{array}
if z < -2.6e17 or 4.59999999999999982e-29 < z Initial program 74.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 63.9%
mul-1-neg63.9%
associate-/l*82.6%
distribute-rgt-neg-in82.6%
distribute-frac-neg82.6%
neg-sub082.6%
associate--r-82.6%
neg-sub082.6%
+-commutative82.6%
sub-neg82.6%
div-sub82.6%
*-inverses82.6%
Simplified82.6%
if -2.6e17 < z < 4.59999999999999982e-29Initial program 91.5%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in y around inf 77.7%
*-commutative77.7%
associate-/l*80.7%
Applied egg-rr80.7%
Final simplification81.7%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -3.6e+15) (not (<= z 7.6e-60)))
(* x_m (- 1.0 (/ y z)))
(* (- y z) (/ x_m 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.6e+15) || !(z <= 7.6e-60)) {
tmp = x_m * (1.0 - (y / z));
} else {
tmp = (y - z) * (x_m / 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.6d+15)) .or. (.not. (z <= 7.6d-60))) then
tmp = x_m * (1.0d0 - (y / z))
else
tmp = (y - z) * (x_m / 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.6e+15) || !(z <= 7.6e-60)) {
tmp = x_m * (1.0 - (y / z));
} else {
tmp = (y - z) * (x_m / 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.6e+15) or not (z <= 7.6e-60): tmp = x_m * (1.0 - (y / z)) else: tmp = (y - z) * (x_m / 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.6e+15) || !(z <= 7.6e-60)) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); else tmp = Float64(Float64(y - z) * Float64(x_m / 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.6e+15) || ~((z <= 7.6e-60))) tmp = x_m * (1.0 - (y / z)); else tmp = (y - z) * (x_m / t); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -3.6e+15], N[Not[LessEqual[z, 7.6e-60]], $MachinePrecision]], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+15} \lor \neg \left(z \leq 7.6 \cdot 10^{-60}\right):\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x\_m}{t}\\
\end{array}
\end{array}
if z < -3.6e15 or 7.59999999999999989e-60 < z Initial program 74.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 64.0%
mul-1-neg64.0%
associate-/l*82.3%
distribute-rgt-neg-in82.3%
distribute-frac-neg82.3%
neg-sub082.3%
associate--r-82.3%
neg-sub082.3%
+-commutative82.3%
sub-neg82.3%
div-sub82.3%
*-inverses82.3%
Simplified82.3%
if -3.6e15 < z < 7.59999999999999989e-60Initial program 91.3%
associate-/l*89.9%
Simplified89.9%
clear-num88.2%
un-div-inv89.0%
Applied egg-rr89.0%
Taylor expanded in t around inf 77.4%
associate-/r/81.6%
Applied egg-rr81.6%
Final simplification81.9%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= z -5.6e+17) x_m (if (<= z 5.4e+18) (* 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 <= -5.6e+17) {
tmp = x_m;
} else if (z <= 5.4e+18) {
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 <= (-5.6d+17)) then
tmp = x_m
else if (z <= 5.4d+18) 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 <= -5.6e+17) {
tmp = x_m;
} else if (z <= 5.4e+18) {
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 <= -5.6e+17: tmp = x_m elif z <= 5.4e+18: 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 <= -5.6e+17) tmp = x_m; elseif (z <= 5.4e+18) 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 <= -5.6e+17) tmp = x_m; elseif (z <= 5.4e+18) 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, -5.6e+17], x$95$m, If[LessEqual[z, 5.4e+18], 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 -5.6 \cdot 10^{+17}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+18}:\\
\;\;\;\;x\_m \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -5.6e17 or 5.4e18 < z Initial program 72.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 60.4%
if -5.6e17 < z < 5.4e18Initial program 91.5%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in z around 0 65.1%
associate-/l*67.0%
Simplified67.0%
Final simplification63.9%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= z -1.9e+16) x_m (if (<= z 3.4e+18) (* 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 <= -1.9e+16) {
tmp = x_m;
} else if (z <= 3.4e+18) {
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 <= (-1.9d+16)) then
tmp = x_m
else if (z <= 3.4d+18) 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 <= -1.9e+16) {
tmp = x_m;
} else if (z <= 3.4e+18) {
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 <= -1.9e+16: tmp = x_m elif z <= 3.4e+18: 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 <= -1.9e+16) tmp = x_m; elseif (z <= 3.4e+18) 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 <= -1.9e+16) tmp = x_m; elseif (z <= 3.4e+18) 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, -1.9e+16], x$95$m, If[LessEqual[z, 3.4e+18], 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 -1.9 \cdot 10^{+16}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+18}:\\
\;\;\;\;y \cdot \frac{x\_m}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -1.9e16 or 3.4e18 < z Initial program 72.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 60.4%
if -1.9e16 < z < 3.4e18Initial program 91.5%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in y around inf 75.4%
*-commutative75.4%
associate-/l*78.2%
Applied egg-rr78.2%
Taylor expanded in t around inf 67.7%
Final simplification64.3%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= x_m 4.4e-26)
(* 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 <= 4.4e-26) {
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 <= 4.4d-26) 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 <= 4.4e-26) {
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 <= 4.4e-26: 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 <= 4.4e-26) 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 <= 4.4e-26) 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, 4.4e-26], 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 4.4 \cdot 10^{-26}:\\
\;\;\;\;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 < 4.4000000000000002e-26Initial program 88.1%
associate-/l*95.1%
Simplified95.1%
if 4.4000000000000002e-26 < x Initial program 65.4%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in x around 0 65.4%
remove-double-neg65.4%
distribute-neg-frac265.4%
*-commutative65.4%
associate-/l*98.2%
distribute-lft-neg-out98.2%
neg-sub098.2%
associate--r-98.2%
neg-sub098.2%
+-commutative98.2%
sub-neg98.2%
neg-sub098.2%
associate--r-98.2%
neg-sub098.2%
+-commutative98.2%
sub-neg98.2%
*-commutative98.2%
Simplified98.2%
Final simplification95.9%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= x_m 3.5e-26)
(/ 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 <= 3.5e-26) {
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 <= 3.5d-26) 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 <= 3.5e-26) {
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 <= 3.5e-26: 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 <= 3.5e-26) 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 <= 3.5e-26) 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, 3.5e-26], 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 3.5 \cdot 10^{-26}:\\
\;\;\;\;\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 < 3.49999999999999985e-26Initial program 88.1%
associate-/l*95.1%
Simplified95.1%
clear-num94.3%
un-div-inv94.7%
Applied egg-rr94.7%
if 3.49999999999999985e-26 < x Initial program 65.4%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in x around 0 65.4%
remove-double-neg65.4%
distribute-neg-frac265.4%
*-commutative65.4%
associate-/l*98.2%
distribute-lft-neg-out98.2%
neg-sub098.2%
associate--r-98.2%
neg-sub098.2%
+-commutative98.2%
sub-neg98.2%
neg-sub098.2%
associate--r-98.2%
neg-sub098.2%
+-commutative98.2%
sub-neg98.2%
*-commutative98.2%
Simplified98.2%
Final simplification95.5%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (* x_m (/ (- 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 82.5%
associate-/l*95.2%
Simplified95.2%
Final simplification95.2%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s x_m))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
return x_s * x_m;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x_s * x_m
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
return x_s * x_m;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): return x_s * x_m
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) return Float64(x_s * x_m) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y, z, t) tmp = x_s * x_m; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * x$95$m), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot x\_m
\end{array}
Initial program 82.5%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in z around inf 33.3%
Final simplification33.3%
(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 2024096
(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)))