
(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 10 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
(let* ((t_1 (/ (* x_m (- y z)) (- t z))))
(*
x_s
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 -1e-217)))
(* x_m (/ (- y z) (- t z)))
t_1))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (x_m * (y - z)) / (t - z);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= -1e-217)) {
tmp = x_m * ((y - z) / (t - z));
} else {
tmp = t_1;
}
return x_s * tmp;
}
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 <= -Double.POSITIVE_INFINITY) || !(t_1 <= -1e-217)) {
tmp = x_m * ((y - z) / (t - z));
} else {
tmp = t_1;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = (x_m * (y - z)) / (t - z) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= -1e-217): tmp = x_m * ((y - z) / (t - z)) else: tmp = t_1 return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= -1e-217)) tmp = Float64(x_m * Float64(Float64(y - z) / Float64(t - z))); else tmp = t_1; end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = (x_m * (y - z)) / (t - z); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= -1e-217))) tmp = x_m * ((y - z) / (t - z)); else tmp = t_1; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, -1e-217]], $MachinePrecision]], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{x\_m \cdot \left(y - z\right)}{t - z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq -1 \cdot 10^{-217}\right):\\
\;\;\;\;x\_m \cdot \frac{y - z}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -inf.0 or -1.00000000000000008e-217 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) Initial program 74.9%
associate-/l*95.8%
Simplified95.8%
if -inf.0 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -1.00000000000000008e-217Initial program 99.6%
Final simplification96.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))) (t_2 (* x_m (- 1.0 (/ y z)))))
(*
x_s
(if (<= z -1.16e+73)
t_2
(if (<= z -430.0)
t_1
(if (<= z -3.6e-59)
t_2
(if (<= z 3.6e-278)
t_1
(if (<= z 2.9e-70)
(/ (* x_m y) (- t z))
(if (<= z 60000000000000.0) 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 <= -1.16e+73) {
tmp = t_2;
} else if (z <= -430.0) {
tmp = t_1;
} else if (z <= -3.6e-59) {
tmp = t_2;
} else if (z <= 3.6e-278) {
tmp = t_1;
} else if (z <= 2.9e-70) {
tmp = (x_m * y) / (t - z);
} else if (z <= 60000000000000.0) {
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 <= (-1.16d+73)) then
tmp = t_2
else if (z <= (-430.0d0)) then
tmp = t_1
else if (z <= (-3.6d-59)) then
tmp = t_2
else if (z <= 3.6d-278) then
tmp = t_1
else if (z <= 2.9d-70) then
tmp = (x_m * y) / (t - z)
else if (z <= 60000000000000.0d0) 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 <= -1.16e+73) {
tmp = t_2;
} else if (z <= -430.0) {
tmp = t_1;
} else if (z <= -3.6e-59) {
tmp = t_2;
} else if (z <= 3.6e-278) {
tmp = t_1;
} else if (z <= 2.9e-70) {
tmp = (x_m * y) / (t - z);
} else if (z <= 60000000000000.0) {
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 <= -1.16e+73: tmp = t_2 elif z <= -430.0: tmp = t_1 elif z <= -3.6e-59: tmp = t_2 elif z <= 3.6e-278: tmp = t_1 elif z <= 2.9e-70: tmp = (x_m * y) / (t - z) elif z <= 60000000000000.0: 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 <= -1.16e+73) tmp = t_2; elseif (z <= -430.0) tmp = t_1; elseif (z <= -3.6e-59) tmp = t_2; elseif (z <= 3.6e-278) tmp = t_1; elseif (z <= 2.9e-70) tmp = Float64(Float64(x_m * y) / Float64(t - z)); elseif (z <= 60000000000000.0) 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 <= -1.16e+73) tmp = t_2; elseif (z <= -430.0) tmp = t_1; elseif (z <= -3.6e-59) tmp = t_2; elseif (z <= 3.6e-278) tmp = t_1; elseif (z <= 2.9e-70) tmp = (x_m * y) / (t - z); elseif (z <= 60000000000000.0) 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, -1.16e+73], t$95$2, If[LessEqual[z, -430.0], t$95$1, If[LessEqual[z, -3.6e-59], t$95$2, If[LessEqual[z, 3.6e-278], t$95$1, If[LessEqual[z, 2.9e-70], N[(N[(x$95$m * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 60000000000000.0], 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 -1.16 \cdot 10^{+73}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -430:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-59}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-278}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-70}:\\
\;\;\;\;\frac{x\_m \cdot y}{t - z}\\
\mathbf{elif}\;z \leq 60000000000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if z < -1.16000000000000007e73 or -430 < z < -3.6e-59 or 6e13 < z Initial program 63.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 52.8%
mul-1-neg52.8%
associate-/l*80.8%
distribute-rgt-neg-in80.8%
distribute-frac-neg80.8%
neg-sub080.8%
associate--r-80.8%
neg-sub080.8%
+-commutative80.8%
sub-neg80.8%
div-sub80.9%
*-inverses80.9%
Simplified80.9%
if -1.16000000000000007e73 < z < -430 or -3.6e-59 < z < 3.59999999999999996e-278 or 2.89999999999999971e-70 < z < 6e13Initial program 93.2%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in t around inf 82.6%
associate-/l*85.6%
Simplified85.6%
if 3.59999999999999996e-278 < z < 2.89999999999999971e-70Initial program 94.4%
associate-/l*86.2%
Simplified86.2%
Taylor expanded in y around inf 82.0%
Final simplification83.0%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -8.2e+80)
x_m
(if (<= z -2.45e+32)
(/ x_m (/ t y))
(if (<= z -5000000000000.0)
x_m
(if (<= z -4.8e-14)
(* x_m (/ (- z) t))
(if (<= z 12000000000.0) (* 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 <= -8.2e+80) {
tmp = x_m;
} else if (z <= -2.45e+32) {
tmp = x_m / (t / y);
} else if (z <= -5000000000000.0) {
tmp = x_m;
} else if (z <= -4.8e-14) {
tmp = x_m * (-z / t);
} else if (z <= 12000000000.0) {
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 <= (-8.2d+80)) then
tmp = x_m
else if (z <= (-2.45d+32)) then
tmp = x_m / (t / y)
else if (z <= (-5000000000000.0d0)) then
tmp = x_m
else if (z <= (-4.8d-14)) then
tmp = x_m * (-z / t)
else if (z <= 12000000000.0d0) 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 <= -8.2e+80) {
tmp = x_m;
} else if (z <= -2.45e+32) {
tmp = x_m / (t / y);
} else if (z <= -5000000000000.0) {
tmp = x_m;
} else if (z <= -4.8e-14) {
tmp = x_m * (-z / t);
} else if (z <= 12000000000.0) {
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 <= -8.2e+80: tmp = x_m elif z <= -2.45e+32: tmp = x_m / (t / y) elif z <= -5000000000000.0: tmp = x_m elif z <= -4.8e-14: tmp = x_m * (-z / t) elif z <= 12000000000.0: 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 <= -8.2e+80) tmp = x_m; elseif (z <= -2.45e+32) tmp = Float64(x_m / Float64(t / y)); elseif (z <= -5000000000000.0) tmp = x_m; elseif (z <= -4.8e-14) tmp = Float64(x_m * Float64(Float64(-z) / t)); elseif (z <= 12000000000.0) 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 <= -8.2e+80) tmp = x_m; elseif (z <= -2.45e+32) tmp = x_m / (t / y); elseif (z <= -5000000000000.0) tmp = x_m; elseif (z <= -4.8e-14) tmp = x_m * (-z / t); elseif (z <= 12000000000.0) 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, -8.2e+80], x$95$m, If[LessEqual[z, -2.45e+32], N[(x$95$m / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5000000000000.0], x$95$m, If[LessEqual[z, -4.8e-14], N[(x$95$m * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 12000000000.0], 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 -8.2 \cdot 10^{+80}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq -2.45 \cdot 10^{+32}:\\
\;\;\;\;\frac{x\_m}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq -5000000000000:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-14}:\\
\;\;\;\;x\_m \cdot \frac{-z}{t}\\
\mathbf{elif}\;z \leq 12000000000:\\
\;\;\;\;x\_m \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -8.20000000000000003e80 or -2.4500000000000001e32 < z < -5e12 or 1.2e10 < z Initial program 60.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 64.0%
if -8.20000000000000003e80 < z < -2.4500000000000001e32Initial program 93.6%
associate-/l*99.8%
Simplified99.8%
clear-num99.9%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 70.0%
if -5e12 < z < -4.8e-14Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t around inf 60.1%
Taylor expanded in y around 0 80.1%
mul-1-neg80.1%
associate-/l*79.8%
distribute-rgt-neg-in79.8%
distribute-neg-frac279.8%
Simplified79.8%
if -4.8e-14 < z < 1.2e10Initial program 93.7%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in z around 0 68.3%
associate-/l*69.5%
Simplified69.5%
Final simplification67.7%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -9.5e+74)
x_m
(if (<= z -1.35e+33)
(/ x_m (/ t y))
(if (<= z -170000000000.0)
x_m
(if (<= z -8e-13)
(- (/ (* x_m z) t))
(if (<= z 13200000000.0) (* 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 <= -9.5e+74) {
tmp = x_m;
} else if (z <= -1.35e+33) {
tmp = x_m / (t / y);
} else if (z <= -170000000000.0) {
tmp = x_m;
} else if (z <= -8e-13) {
tmp = -((x_m * z) / t);
} else if (z <= 13200000000.0) {
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 <= (-9.5d+74)) then
tmp = x_m
else if (z <= (-1.35d+33)) then
tmp = x_m / (t / y)
else if (z <= (-170000000000.0d0)) then
tmp = x_m
else if (z <= (-8d-13)) then
tmp = -((x_m * z) / t)
else if (z <= 13200000000.0d0) 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 <= -9.5e+74) {
tmp = x_m;
} else if (z <= -1.35e+33) {
tmp = x_m / (t / y);
} else if (z <= -170000000000.0) {
tmp = x_m;
} else if (z <= -8e-13) {
tmp = -((x_m * z) / t);
} else if (z <= 13200000000.0) {
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 <= -9.5e+74: tmp = x_m elif z <= -1.35e+33: tmp = x_m / (t / y) elif z <= -170000000000.0: tmp = x_m elif z <= -8e-13: tmp = -((x_m * z) / t) elif z <= 13200000000.0: 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 <= -9.5e+74) tmp = x_m; elseif (z <= -1.35e+33) tmp = Float64(x_m / Float64(t / y)); elseif (z <= -170000000000.0) tmp = x_m; elseif (z <= -8e-13) tmp = Float64(-Float64(Float64(x_m * z) / t)); elseif (z <= 13200000000.0) 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 <= -9.5e+74) tmp = x_m; elseif (z <= -1.35e+33) tmp = x_m / (t / y); elseif (z <= -170000000000.0) tmp = x_m; elseif (z <= -8e-13) tmp = -((x_m * z) / t); elseif (z <= 13200000000.0) 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, -9.5e+74], x$95$m, If[LessEqual[z, -1.35e+33], N[(x$95$m / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -170000000000.0], x$95$m, If[LessEqual[z, -8e-13], (-N[(N[(x$95$m * z), $MachinePrecision] / t), $MachinePrecision]), If[LessEqual[z, 13200000000.0], 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 -9.5 \cdot 10^{+74}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{+33}:\\
\;\;\;\;\frac{x\_m}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq -170000000000:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-13}:\\
\;\;\;\;-\frac{x\_m \cdot z}{t}\\
\mathbf{elif}\;z \leq 13200000000:\\
\;\;\;\;x\_m \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -9.5000000000000006e74 or -1.34999999999999996e33 < z < -1.7e11 or 1.32e10 < z Initial program 60.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 64.0%
if -9.5000000000000006e74 < z < -1.34999999999999996e33Initial program 93.6%
associate-/l*99.8%
Simplified99.8%
clear-num99.9%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 70.0%
if -1.7e11 < z < -8.0000000000000002e-13Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t around inf 60.1%
Taylor expanded in y around 0 80.1%
associate-*r/80.1%
mul-1-neg80.1%
distribute-rgt-neg-out80.1%
Simplified80.1%
if -8.0000000000000002e-13 < z < 1.32e10Initial program 93.7%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in z around 0 68.3%
associate-/l*69.5%
Simplified69.5%
Final simplification67.7%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* x_m (- 1.0 (/ y z)))))
(*
x_s
(if (<= z -1.16e+73)
t_1
(if (<= z -2.3e+37)
(/ x_m (/ t y))
(if (or (<= z -1.5e-54) (not (<= z 18000000.0)))
t_1
(* x_m (/ y 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 t_1 = x_m * (1.0 - (y / z));
double tmp;
if (z <= -1.16e+73) {
tmp = t_1;
} else if (z <= -2.3e+37) {
tmp = x_m / (t / y);
} else if ((z <= -1.5e-54) || !(z <= 18000000.0)) {
tmp = t_1;
} else {
tmp = x_m * (y / 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) :: t_1
real(8) :: tmp
t_1 = x_m * (1.0d0 - (y / z))
if (z <= (-1.16d+73)) then
tmp = t_1
else if (z <= (-2.3d+37)) then
tmp = x_m / (t / y)
else if ((z <= (-1.5d-54)) .or. (.not. (z <= 18000000.0d0))) then
tmp = t_1
else
tmp = x_m * (y / 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 t_1 = x_m * (1.0 - (y / z));
double tmp;
if (z <= -1.16e+73) {
tmp = t_1;
} else if (z <= -2.3e+37) {
tmp = x_m / (t / y);
} else if ((z <= -1.5e-54) || !(z <= 18000000.0)) {
tmp = t_1;
} else {
tmp = x_m * (y / 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): t_1 = x_m * (1.0 - (y / z)) tmp = 0 if z <= -1.16e+73: tmp = t_1 elif z <= -2.3e+37: tmp = x_m / (t / y) elif (z <= -1.5e-54) or not (z <= 18000000.0): tmp = t_1 else: tmp = x_m * (y / t) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(x_m * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.16e+73) tmp = t_1; elseif (z <= -2.3e+37) tmp = Float64(x_m / Float64(t / y)); elseif ((z <= -1.5e-54) || !(z <= 18000000.0)) tmp = t_1; else tmp = Float64(x_m * Float64(y / 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) t_1 = x_m * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.16e+73) tmp = t_1; elseif (z <= -2.3e+37) tmp = x_m / (t / y); elseif ((z <= -1.5e-54) || ~((z <= 18000000.0))) tmp = t_1; else tmp = x_m * (y / 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_] := Block[{t$95$1 = N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.16e+73], t$95$1, If[LessEqual[z, -2.3e+37], N[(x$95$m / N[(t / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.5e-54], N[Not[LessEqual[z, 18000000.0]], $MachinePrecision]], t$95$1, N[(x$95$m * N[(y / t), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := x\_m \cdot \left(1 - \frac{y}{z}\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{+37}:\\
\;\;\;\;\frac{x\_m}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-54} \lor \neg \left(z \leq 18000000\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{y}{t}\\
\end{array}
\end{array}
\end{array}
if z < -1.16000000000000007e73 or -2.30000000000000002e37 < z < -1.50000000000000005e-54 or 1.8e7 < z Initial program 64.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 51.6%
mul-1-neg51.6%
associate-/l*78.1%
distribute-rgt-neg-in78.1%
distribute-frac-neg78.1%
neg-sub078.1%
associate--r-78.1%
neg-sub078.1%
+-commutative78.1%
sub-neg78.1%
div-sub78.1%
*-inverses78.1%
Simplified78.1%
if -1.16000000000000007e73 < z < -2.30000000000000002e37Initial program 99.6%
associate-/l*99.8%
Simplified99.8%
clear-num99.9%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 72.7%
if -1.50000000000000005e-54 < z < 1.8e7Initial program 94.6%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in z around 0 70.4%
associate-/l*71.0%
Simplified71.0%
Final simplification74.2%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= t -3.4e-27) (not (<= t 6e-9)))
(* x_m (/ (- y z) t))
(* x_m (- 1.0 (/ y z))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((t <= -3.4e-27) || !(t <= 6e-9)) {
tmp = x_m * ((y - z) / t);
} else {
tmp = x_m * (1.0 - (y / z));
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-3.4d-27)) .or. (.not. (t <= 6d-9))) then
tmp = x_m * ((y - z) / t)
else
tmp = x_m * (1.0d0 - (y / z))
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((t <= -3.4e-27) || !(t <= 6e-9)) {
tmp = x_m * ((y - z) / t);
} else {
tmp = x_m * (1.0 - (y / z));
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (t <= -3.4e-27) or not (t <= 6e-9): tmp = x_m * ((y - z) / t) else: tmp = x_m * (1.0 - (y / z)) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((t <= -3.4e-27) || !(t <= 6e-9)) tmp = Float64(x_m * Float64(Float64(y - z) / t)); else tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((t <= -3.4e-27) || ~((t <= 6e-9))) tmp = x_m * ((y - z) / t); else tmp = x_m * (1.0 - (y / z)); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[t, -3.4e-27], N[Not[LessEqual[t, 6e-9]], $MachinePrecision]], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{-27} \lor \neg \left(t \leq 6 \cdot 10^{-9}\right):\\
\;\;\;\;x\_m \cdot \frac{y - z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if t < -3.3999999999999997e-27 or 5.99999999999999996e-9 < t Initial program 79.3%
associate-/l*95.8%
Simplified95.8%
Taylor expanded in t around inf 69.1%
associate-/l*75.9%
Simplified75.9%
if -3.3999999999999997e-27 < t < 5.99999999999999996e-9Initial program 84.8%
associate-/l*94.9%
Simplified94.9%
Taylor expanded in t around 0 65.1%
mul-1-neg65.1%
associate-/l*76.7%
distribute-rgt-neg-in76.7%
distribute-frac-neg76.7%
neg-sub076.7%
associate--r-76.7%
neg-sub076.7%
+-commutative76.7%
sub-neg76.7%
div-sub76.7%
*-inverses76.7%
Simplified76.7%
Final simplification76.2%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= t -4.2e-27)
(/ x_m (/ t (- y z)))
(if (<= t 2.15e-7) (* x_m (- 1.0 (/ y z))) (* x_m (/ (- y z) t))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= -4.2e-27) {
tmp = x_m / (t / (y - z));
} else if (t <= 2.15e-7) {
tmp = x_m * (1.0 - (y / z));
} else {
tmp = x_m * ((y - z) / t);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4.2d-27)) then
tmp = x_m / (t / (y - z))
else if (t <= 2.15d-7) then
tmp = x_m * (1.0d0 - (y / z))
else
tmp = x_m * ((y - z) / t)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= -4.2e-27) {
tmp = x_m / (t / (y - z));
} else if (t <= 2.15e-7) {
tmp = x_m * (1.0 - (y / z));
} else {
tmp = x_m * ((y - z) / t);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if t <= -4.2e-27: tmp = x_m / (t / (y - z)) elif t <= 2.15e-7: tmp = x_m * (1.0 - (y / z)) else: tmp = x_m * ((y - z) / t) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (t <= -4.2e-27) tmp = Float64(x_m / Float64(t / Float64(y - z))); elseif (t <= 2.15e-7) tmp = Float64(x_m * Float64(1.0 - Float64(y / z))); else tmp = Float64(x_m * Float64(Float64(y - z) / t)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (t <= -4.2e-27) tmp = x_m / (t / (y - z)); elseif (t <= 2.15e-7) tmp = x_m * (1.0 - (y / z)); else tmp = x_m * ((y - z) / t); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, -4.2e-27], N[(x$95$m / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.15e-7], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / 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}\;t \leq -4.2 \cdot 10^{-27}:\\
\;\;\;\;\frac{x\_m}{\frac{t}{y - z}}\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-7}:\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{y - z}{t}\\
\end{array}
\end{array}
if t < -4.20000000000000031e-27Initial program 78.0%
associate-/l*95.4%
Simplified95.4%
clear-num95.2%
un-div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in t around inf 72.4%
if -4.20000000000000031e-27 < t < 2.1500000000000001e-7Initial program 84.8%
associate-/l*94.9%
Simplified94.9%
Taylor expanded in t around 0 65.1%
mul-1-neg65.1%
associate-/l*76.7%
distribute-rgt-neg-in76.7%
distribute-frac-neg76.7%
neg-sub076.7%
associate--r-76.7%
neg-sub076.7%
+-commutative76.7%
sub-neg76.7%
div-sub76.7%
*-inverses76.7%
Simplified76.7%
if 2.1500000000000001e-7 < t Initial program 80.4%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in t around inf 70.3%
associate-/l*78.9%
Simplified78.9%
Final simplification76.3%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= z -2.1e+73) x_m (if (<= z 13500000000.0) (* 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 <= -2.1e+73) {
tmp = x_m;
} else if (z <= 13500000000.0) {
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 <= (-2.1d+73)) then
tmp = x_m
else if (z <= 13500000000.0d0) 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 <= -2.1e+73) {
tmp = x_m;
} else if (z <= 13500000000.0) {
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 <= -2.1e+73: tmp = x_m elif z <= 13500000000.0: 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 <= -2.1e+73) tmp = x_m; elseif (z <= 13500000000.0) 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 <= -2.1e+73) tmp = x_m; elseif (z <= 13500000000.0) 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, -2.1e+73], x$95$m, If[LessEqual[z, 13500000000.0], 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 -2.1 \cdot 10^{+73}:\\
\;\;\;\;x\_m\\
\mathbf{elif}\;z \leq 13500000000:\\
\;\;\;\;x\_m \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if z < -2.1000000000000001e73 or 1.35e10 < z Initial program 60.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.2%
if -2.1000000000000001e73 < z < 1.35e10Initial program 93.4%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in z around 0 65.6%
associate-/l*67.2%
Simplified67.2%
Final simplification65.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 (* 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 81.7%
associate-/l*95.4%
Simplified95.4%
Final simplification95.4%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s 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.7%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in z around inf 30.4%
Final simplification30.4%
(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 2024077
(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)))