
(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(x / Float64(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[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 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(x / Float64(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[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x_s x_m y z t) :precision binary64 (let* ((t_1 (/ x_m (* (- y z) (- t z))))) (* x_s (if (<= t_1 0.0) (/ (/ x_m (- t z)) (- y z)) t_1))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
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 <= 0.0) {
tmp = (x_m / (t - z)) / (y - z);
} else {
tmp = t_1;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 <= 0.0d0) then
tmp = (x_m / (t - z)) / (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);
assert x_m < y && y < z && z < t;
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 <= 0.0) {
tmp = (x_m / (t - z)) / (y - z);
} else {
tmp = t_1;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): t_1 = x_m / ((y - z) * (t - z)) tmp = 0 if t_1 <= 0.0: tmp = (x_m / (t - z)) / (y - z) else: tmp = t_1 return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) t_1 = Float64(x_m / Float64(Float64(y - z) * Float64(t - z))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(Float64(x_m / Float64(t - z)) / 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);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
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 <= 0.0)
tmp = (x_m / (t - z)) / (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]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(x$95$m / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, 0.0], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$1]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x\_m}{\left(y - z\right) \cdot \left(t - z\right)}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\frac{x\_m}{t - z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < 0.0Initial program 79.4%
associate-/l/97.2%
Simplified97.2%
if 0.0 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) Initial program 98.4%
Final simplification97.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -4.5e+106)
(/ (/ x_m z) y)
(if (<= z -2.5e-42)
(/ x_m (* y (- z)))
(if (<= z 2.2e+18) (/ (/ x_m t) y) (/ x_m (* z (- t))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -4.5e+106) {
tmp = (x_m / z) / y;
} else if (z <= -2.5e-42) {
tmp = x_m / (y * -z);
} else if (z <= 2.2e+18) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (z * -t);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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.5d+106)) then
tmp = (x_m / z) / y
else if (z <= (-2.5d-42)) then
tmp = x_m / (y * -z)
else if (z <= 2.2d+18) then
tmp = (x_m / t) / y
else
tmp = x_m / (z * -t)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -4.5e+106) {
tmp = (x_m / z) / y;
} else if (z <= -2.5e-42) {
tmp = x_m / (y * -z);
} else if (z <= 2.2e+18) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (z * -t);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if z <= -4.5e+106: tmp = (x_m / z) / y elif z <= -2.5e-42: tmp = x_m / (y * -z) elif z <= 2.2e+18: tmp = (x_m / t) / y else: tmp = x_m / (z * -t) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (z <= -4.5e+106) tmp = Float64(Float64(x_m / z) / y); elseif (z <= -2.5e-42) tmp = Float64(x_m / Float64(y * Float64(-z))); elseif (z <= 2.2e+18) tmp = Float64(Float64(x_m / t) / y); else tmp = Float64(x_m / Float64(z * Float64(-t))); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (z <= -4.5e+106)
tmp = (x_m / z) / y;
elseif (z <= -2.5e-42)
tmp = x_m / (y * -z);
elseif (z <= 2.2e+18)
tmp = (x_m / t) / y;
else
tmp = x_m / (z * -t);
end
tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[z, -4.5e+106], N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, -2.5e-42], N[(x$95$m / N[(y * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+18], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], N[(x$95$m / N[(z * (-t)), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{x\_m}{z}}{y}\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-42}:\\
\;\;\;\;\frac{x\_m}{y \cdot \left(-z\right)}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+18}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z \cdot \left(-t\right)}\\
\end{array}
\end{array}
if z < -4.4999999999999997e106Initial program 65.0%
Taylor expanded in y around inf 32.5%
*-commutative32.5%
Simplified32.5%
*-un-lft-identity32.5%
times-frac33.6%
Applied egg-rr33.6%
Taylor expanded in t around 0 33.5%
frac-times32.3%
neg-mul-132.3%
add-sqr-sqrt17.9%
sqrt-unprod39.5%
sqr-neg39.5%
sqrt-unprod13.5%
add-sqr-sqrt31.4%
associate-/r*40.2%
Applied egg-rr40.2%
if -4.4999999999999997e106 < z < -2.50000000000000001e-42Initial program 93.1%
Taylor expanded in y around inf 44.1%
*-commutative44.1%
Simplified44.1%
Taylor expanded in t around 0 43.4%
associate-*r/43.4%
mul-1-neg43.4%
*-commutative43.4%
Simplified43.4%
if -2.50000000000000001e-42 < z < 2.2e18Initial program 93.6%
associate-/l/92.5%
div-inv92.5%
Applied egg-rr92.5%
*-commutative92.5%
clear-num92.3%
un-div-inv92.5%
Applied egg-rr92.5%
Taylor expanded in y around inf 71.5%
associate-/l/71.7%
Simplified71.7%
Taylor expanded in t around inf 57.4%
if 2.2e18 < z Initial program 75.8%
Taylor expanded in y around 0 57.7%
associate-*r/57.7%
neg-mul-157.7%
Simplified57.7%
Taylor expanded in z around 0 39.5%
associate-*r/39.5%
mul-1-neg39.5%
Simplified39.5%
Final simplification49.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -2.6e+106)
(/ (/ x_m z) y)
(if (<= z -1.1e-45)
(/ (/ x_m (- y)) z)
(if (<= z 1.55e+18) (/ (/ x_m t) y) (/ x_m (* z (- t))))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -2.6e+106) {
tmp = (x_m / z) / y;
} else if (z <= -1.1e-45) {
tmp = (x_m / -y) / z;
} else if (z <= 1.55e+18) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (z * -t);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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+106)) then
tmp = (x_m / z) / y
else if (z <= (-1.1d-45)) then
tmp = (x_m / -y) / z
else if (z <= 1.55d+18) then
tmp = (x_m / t) / y
else
tmp = x_m / (z * -t)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -2.6e+106) {
tmp = (x_m / z) / y;
} else if (z <= -1.1e-45) {
tmp = (x_m / -y) / z;
} else if (z <= 1.55e+18) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (z * -t);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if z <= -2.6e+106: tmp = (x_m / z) / y elif z <= -1.1e-45: tmp = (x_m / -y) / z elif z <= 1.55e+18: tmp = (x_m / t) / y else: tmp = x_m / (z * -t) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (z <= -2.6e+106) tmp = Float64(Float64(x_m / z) / y); elseif (z <= -1.1e-45) tmp = Float64(Float64(x_m / Float64(-y)) / z); elseif (z <= 1.55e+18) tmp = Float64(Float64(x_m / t) / y); else tmp = Float64(x_m / Float64(z * Float64(-t))); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (z <= -2.6e+106)
tmp = (x_m / z) / y;
elseif (z <= -1.1e-45)
tmp = (x_m / -y) / z;
elseif (z <= 1.55e+18)
tmp = (x_m / t) / y;
else
tmp = x_m / (z * -t);
end
tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[z, -2.6e+106], N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, -1.1e-45], N[(N[(x$95$m / (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.55e+18], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], N[(x$95$m / N[(z * (-t)), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{x\_m}{z}}{y}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-45}:\\
\;\;\;\;\frac{\frac{x\_m}{-y}}{z}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+18}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z \cdot \left(-t\right)}\\
\end{array}
\end{array}
if z < -2.6000000000000002e106Initial program 65.0%
Taylor expanded in y around inf 32.5%
*-commutative32.5%
Simplified32.5%
*-un-lft-identity32.5%
times-frac33.6%
Applied egg-rr33.6%
Taylor expanded in t around 0 33.5%
frac-times32.3%
neg-mul-132.3%
add-sqr-sqrt17.9%
sqrt-unprod39.5%
sqr-neg39.5%
sqrt-unprod13.5%
add-sqr-sqrt31.4%
associate-/r*40.2%
Applied egg-rr40.2%
if -2.6000000000000002e106 < z < -1.09999999999999997e-45Initial program 93.1%
Taylor expanded in y around inf 44.1%
*-commutative44.1%
Simplified44.1%
*-un-lft-identity44.1%
times-frac50.3%
Applied egg-rr50.3%
Taylor expanded in t around 0 43.4%
mul-1-neg43.4%
associate-/r*46.6%
distribute-neg-frac246.6%
Simplified46.6%
if -1.09999999999999997e-45 < z < 1.55e18Initial program 93.6%
associate-/l/92.5%
div-inv92.5%
Applied egg-rr92.5%
*-commutative92.5%
clear-num92.3%
un-div-inv92.5%
Applied egg-rr92.5%
Taylor expanded in y around inf 71.5%
associate-/l/71.7%
Simplified71.7%
Taylor expanded in t around inf 57.4%
if 1.55e18 < z Initial program 75.8%
Taylor expanded in y around 0 57.7%
associate-*r/57.7%
neg-mul-157.7%
Simplified57.7%
Taylor expanded in z around 0 39.5%
associate-*r/39.5%
mul-1-neg39.5%
Simplified39.5%
Final simplification49.8%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (/ (/ x_m z) (- z))))
(*
x_s
(if (<= z -6.8e+102)
t_1
(if (<= z -2.7e-44)
(/ (/ x_m (- y)) z)
(if (<= z 3e+66) (/ (/ x_m t) y) t_1))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (x_m / z) / -z;
double tmp;
if (z <= -6.8e+102) {
tmp = t_1;
} else if (z <= -2.7e-44) {
tmp = (x_m / -y) / z;
} else if (z <= 3e+66) {
tmp = (x_m / t) / y;
} else {
tmp = t_1;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 / z) / -z
if (z <= (-6.8d+102)) then
tmp = t_1
else if (z <= (-2.7d-44)) then
tmp = (x_m / -y) / z
else if (z <= 3d+66) then
tmp = (x_m / t) / y
else
tmp = t_1
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (x_m / z) / -z;
double tmp;
if (z <= -6.8e+102) {
tmp = t_1;
} else if (z <= -2.7e-44) {
tmp = (x_m / -y) / z;
} else if (z <= 3e+66) {
tmp = (x_m / t) / y;
} else {
tmp = t_1;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): t_1 = (x_m / z) / -z tmp = 0 if z <= -6.8e+102: tmp = t_1 elif z <= -2.7e-44: tmp = (x_m / -y) / z elif z <= 3e+66: tmp = (x_m / t) / y else: tmp = t_1 return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(x_m / z) / Float64(-z)) tmp = 0.0 if (z <= -6.8e+102) tmp = t_1; elseif (z <= -2.7e-44) tmp = Float64(Float64(x_m / Float64(-y)) / z); elseif (z <= 3e+66) tmp = Float64(Float64(x_m / t) / y); else tmp = t_1; end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
t_1 = (x_m / z) / -z;
tmp = 0.0;
if (z <= -6.8e+102)
tmp = t_1;
elseif (z <= -2.7e-44)
tmp = (x_m / -y) / z;
elseif (z <= 3e+66)
tmp = (x_m / t) / y;
else
tmp = t_1;
end
tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m / z), $MachinePrecision] / (-z)), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -6.8e+102], t$95$1, If[LessEqual[z, -2.7e-44], N[(N[(x$95$m / (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 3e+66], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x\_m}{z}}{-z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-44}:\\
\;\;\;\;\frac{\frac{x\_m}{-y}}{z}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+66}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if z < -6.8000000000000001e102 or 3.00000000000000002e66 < z Initial program 68.4%
Taylor expanded in y around 0 64.9%
associate-*r/64.9%
neg-mul-164.9%
Simplified64.9%
div-inv64.9%
add-sqr-sqrt29.7%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-unprod33.1%
add-sqr-sqrt59.5%
Applied egg-rr59.5%
*-commutative59.5%
associate-*l/59.5%
times-frac59.0%
associate-*l/59.0%
*-lft-identity59.0%
Simplified59.0%
Taylor expanded in t around 0 55.8%
associate-*r/45.1%
neg-mul-145.1%
Simplified55.8%
if -6.8000000000000001e102 < z < -2.6999999999999999e-44Initial program 92.6%
Taylor expanded in y around inf 43.4%
*-commutative43.4%
Simplified43.4%
*-un-lft-identity43.4%
times-frac50.1%
Applied egg-rr50.1%
Taylor expanded in t around 0 42.6%
mul-1-neg42.6%
associate-/r*46.1%
distribute-neg-frac246.1%
Simplified46.1%
if -2.6999999999999999e-44 < z < 3.00000000000000002e66Initial program 93.4%
associate-/l/93.0%
div-inv93.0%
Applied egg-rr93.0%
*-commutative93.0%
clear-num92.8%
un-div-inv93.0%
Applied egg-rr93.0%
Taylor expanded in y around inf 72.1%
associate-/l/72.9%
Simplified72.9%
Taylor expanded in t around inf 56.0%
Final simplification54.9%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (/ (/ x_m z) (- z))))
(*
x_s
(if (<= z -7.5e+102)
t_1
(if (<= z -4.2e-43)
(/ -1.0 (* z (/ y x_m)))
(if (<= z 1.3e+69) (/ (/ x_m t) y) t_1))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (x_m / z) / -z;
double tmp;
if (z <= -7.5e+102) {
tmp = t_1;
} else if (z <= -4.2e-43) {
tmp = -1.0 / (z * (y / x_m));
} else if (z <= 1.3e+69) {
tmp = (x_m / t) / y;
} else {
tmp = t_1;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 / z) / -z
if (z <= (-7.5d+102)) then
tmp = t_1
else if (z <= (-4.2d-43)) then
tmp = (-1.0d0) / (z * (y / x_m))
else if (z <= 1.3d+69) then
tmp = (x_m / t) / y
else
tmp = t_1
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (x_m / z) / -z;
double tmp;
if (z <= -7.5e+102) {
tmp = t_1;
} else if (z <= -4.2e-43) {
tmp = -1.0 / (z * (y / x_m));
} else if (z <= 1.3e+69) {
tmp = (x_m / t) / y;
} else {
tmp = t_1;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): t_1 = (x_m / z) / -z tmp = 0 if z <= -7.5e+102: tmp = t_1 elif z <= -4.2e-43: tmp = -1.0 / (z * (y / x_m)) elif z <= 1.3e+69: tmp = (x_m / t) / y else: tmp = t_1 return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(x_m / z) / Float64(-z)) tmp = 0.0 if (z <= -7.5e+102) tmp = t_1; elseif (z <= -4.2e-43) tmp = Float64(-1.0 / Float64(z * Float64(y / x_m))); elseif (z <= 1.3e+69) tmp = Float64(Float64(x_m / t) / y); else tmp = t_1; end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
t_1 = (x_m / z) / -z;
tmp = 0.0;
if (z <= -7.5e+102)
tmp = t_1;
elseif (z <= -4.2e-43)
tmp = -1.0 / (z * (y / x_m));
elseif (z <= 1.3e+69)
tmp = (x_m / t) / y;
else
tmp = t_1;
end
tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m / z), $MachinePrecision] / (-z)), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -7.5e+102], t$95$1, If[LessEqual[z, -4.2e-43], N[(-1.0 / N[(z * N[(y / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+69], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x\_m}{z}}{-z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-43}:\\
\;\;\;\;\frac{-1}{z \cdot \frac{y}{x\_m}}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+69}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if z < -7.5e102 or 1.3000000000000001e69 < z Initial program 68.4%
Taylor expanded in y around 0 64.9%
associate-*r/64.9%
neg-mul-164.9%
Simplified64.9%
div-inv64.9%
add-sqr-sqrt29.7%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-unprod33.1%
add-sqr-sqrt59.5%
Applied egg-rr59.5%
*-commutative59.5%
associate-*l/59.5%
times-frac59.0%
associate-*l/59.0%
*-lft-identity59.0%
Simplified59.0%
Taylor expanded in t around 0 55.8%
associate-*r/45.1%
neg-mul-145.1%
Simplified55.8%
if -7.5e102 < z < -4.2000000000000001e-43Initial program 92.6%
Taylor expanded in y around inf 43.4%
*-commutative43.4%
Simplified43.4%
*-un-lft-identity43.4%
times-frac50.1%
Applied egg-rr50.1%
Taylor expanded in t around 0 46.0%
*-commutative46.0%
clear-num45.9%
frac-times46.1%
metadata-eval46.1%
Applied egg-rr46.1%
if -4.2000000000000001e-43 < z < 1.3000000000000001e69Initial program 93.4%
associate-/l/93.0%
div-inv93.0%
Applied egg-rr93.0%
*-commutative93.0%
clear-num92.8%
un-div-inv93.0%
Applied egg-rr93.0%
Taylor expanded in y around inf 72.1%
associate-/l/72.9%
Simplified72.9%
Taylor expanded in t around inf 56.0%
Final simplification54.9%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x_s x_m y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (* x_s (if (<= t_1 5e+304) (/ x_m t_1) (* (/ x_m (- t z)) (/ -1.0 z))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= 5e+304) {
tmp = x_m / t_1;
} else {
tmp = (x_m / (t - z)) * (-1.0 / z);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 = (y - z) * (t - z)
if (t_1 <= 5d+304) then
tmp = x_m / t_1
else
tmp = (x_m / (t - z)) * ((-1.0d0) / z)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= 5e+304) {
tmp = x_m / t_1;
} else {
tmp = (x_m / (t - z)) * (-1.0 / z);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if t_1 <= 5e+304: tmp = x_m / t_1 else: tmp = (x_m / (t - z)) * (-1.0 / z) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (t_1 <= 5e+304) tmp = Float64(x_m / t_1); else tmp = Float64(Float64(x_m / Float64(t - z)) * Float64(-1.0 / z)); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
t_1 = (y - z) * (t - z);
tmp = 0.0;
if (t_1 <= 5e+304)
tmp = x_m / t_1;
else
tmp = (x_m / (t - z)) * (-1.0 / 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]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, 5e+304], N[(x$95$m / t$95$1), $MachinePrecision], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;\frac{x\_m}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{t - z} \cdot \frac{-1}{z}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < 4.9999999999999997e304Initial program 95.1%
if 4.9999999999999997e304 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 58.5%
associate-/l/100.0%
div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 86.2%
Final simplification92.7%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x_s x_m y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (* x_s (if (<= t_1 5e+304) (/ x_m t_1) (/ (/ -1.0 z) (/ (- t z) x_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= 5e+304) {
tmp = x_m / t_1;
} else {
tmp = (-1.0 / z) / ((t - z) / x_m);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 = (y - z) * (t - z)
if (t_1 <= 5d+304) then
tmp = x_m / t_1
else
tmp = ((-1.0d0) / z) / ((t - z) / x_m)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= 5e+304) {
tmp = x_m / t_1;
} else {
tmp = (-1.0 / z) / ((t - z) / x_m);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if t_1 <= 5e+304: tmp = x_m / t_1 else: tmp = (-1.0 / z) / ((t - z) / x_m) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (t_1 <= 5e+304) tmp = Float64(x_m / t_1); else tmp = Float64(Float64(-1.0 / z) / Float64(Float64(t - z) / x_m)); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
t_1 = (y - z) * (t - z);
tmp = 0.0;
if (t_1 <= 5e+304)
tmp = x_m / t_1;
else
tmp = (-1.0 / z) / ((t - z) / 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]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, 5e+304], N[(x$95$m / t$95$1), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;\frac{x\_m}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-1}{z}}{\frac{t - z}{x\_m}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < 4.9999999999999997e304Initial program 95.1%
if 4.9999999999999997e304 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 58.5%
associate-/l/100.0%
div-inv99.9%
Applied egg-rr99.9%
*-commutative99.9%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 86.2%
Final simplification92.7%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -1.55e-44)
(/ (/ x_m y) (- t z))
(if (<= y 1.52e-81)
(* (/ x_m (- t z)) (/ -1.0 z))
(/ (/ x_m t) (- y z))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -1.55e-44) {
tmp = (x_m / y) / (t - z);
} else if (y <= 1.52e-81) {
tmp = (x_m / (t - z)) * (-1.0 / z);
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 (y <= (-1.55d-44)) then
tmp = (x_m / y) / (t - z)
else if (y <= 1.52d-81) then
tmp = (x_m / (t - z)) * ((-1.0d0) / z)
else
tmp = (x_m / t) / (y - z)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -1.55e-44) {
tmp = (x_m / y) / (t - z);
} else if (y <= 1.52e-81) {
tmp = (x_m / (t - z)) * (-1.0 / z);
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -1.55e-44: tmp = (x_m / y) / (t - z) elif y <= 1.52e-81: tmp = (x_m / (t - z)) * (-1.0 / z) else: tmp = (x_m / t) / (y - z) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -1.55e-44) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif (y <= 1.52e-81) tmp = Float64(Float64(x_m / Float64(t - z)) * Float64(-1.0 / z)); else tmp = Float64(Float64(x_m / t) / Float64(y - z)); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (y <= -1.55e-44)
tmp = (x_m / y) / (t - z);
elseif (y <= 1.52e-81)
tmp = (x_m / (t - z)) * (-1.0 / z);
else
tmp = (x_m / t) / (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]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -1.55e-44], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.52e-81], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{-44}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{-81}:\\
\;\;\;\;\frac{x\_m}{t - z} \cdot \frac{-1}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -1.54999999999999992e-44Initial program 88.9%
associate-/l/95.4%
div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in y around inf 88.1%
associate-/r*93.1%
Simplified93.1%
if -1.54999999999999992e-44 < y < 1.52000000000000008e-81Initial program 83.0%
associate-/l/96.1%
div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in y around 0 82.9%
if 1.52000000000000008e-81 < y Initial program 84.4%
associate-/l/96.4%
Simplified96.4%
Taylor expanded in t around inf 59.0%
Final simplification77.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= t -4.9e-67)
(/ (/ x_m t) y)
(if (<= t 4.3e-161) (/ (/ x_m z) (- y)) (/ x_m (* (- y z) t))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= -4.9e-67) {
tmp = (x_m / t) / y;
} else if (t <= 4.3e-161) {
tmp = (x_m / z) / -y;
} else {
tmp = x_m / ((y - z) * t);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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.9d-67)) then
tmp = (x_m / t) / y
else if (t <= 4.3d-161) then
tmp = (x_m / z) / -y
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);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= -4.9e-67) {
tmp = (x_m / t) / y;
} else if (t <= 4.3e-161) {
tmp = (x_m / z) / -y;
} else {
tmp = x_m / ((y - z) * t);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if t <= -4.9e-67: tmp = (x_m / t) / y elif t <= 4.3e-161: tmp = (x_m / z) / -y else: tmp = x_m / ((y - z) * t) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (t <= -4.9e-67) tmp = Float64(Float64(x_m / t) / y); elseif (t <= 4.3e-161) tmp = Float64(Float64(x_m / z) / Float64(-y)); 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);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (t <= -4.9e-67)
tmp = (x_m / t) / y;
elseif (t <= 4.3e-161)
tmp = (x_m / z) / -y;
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]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, -4.9e-67], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 4.3e-161], N[(N[(x$95$m / z), $MachinePrecision] / (-y)), $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_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -4.9 \cdot 10^{-67}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-161}:\\
\;\;\;\;\frac{\frac{x\_m}{z}}{-y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -4.89999999999999993e-67Initial program 88.6%
associate-/l/96.0%
div-inv96.0%
Applied egg-rr96.0%
*-commutative96.0%
clear-num95.8%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in y around inf 52.9%
associate-/l/55.4%
Simplified55.4%
Taylor expanded in t around inf 49.8%
if -4.89999999999999993e-67 < t < 4.29999999999999967e-161Initial program 90.1%
associate-/l/93.3%
div-inv93.2%
Applied egg-rr93.2%
*-commutative93.2%
clear-num93.0%
un-div-inv93.1%
Applied egg-rr93.1%
Taylor expanded in y around inf 61.2%
associate-/l/62.2%
Simplified62.2%
Taylor expanded in t around 0 52.7%
associate-*r/52.7%
neg-mul-152.7%
Simplified52.7%
if 4.29999999999999967e-161 < t Initial program 77.2%
Taylor expanded in t around inf 63.0%
Final simplification55.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -1.22e-45)
(/ (/ x_m y) (- t z))
(if (<= y 1.95e-220) (/ x_m (* z (- z t))) (/ (/ x_m t) (- y z))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -1.22e-45) {
tmp = (x_m / y) / (t - z);
} else if (y <= 1.95e-220) {
tmp = x_m / (z * (z - t));
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 (y <= (-1.22d-45)) then
tmp = (x_m / y) / (t - z)
else if (y <= 1.95d-220) then
tmp = x_m / (z * (z - t))
else
tmp = (x_m / t) / (y - z)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -1.22e-45) {
tmp = (x_m / y) / (t - z);
} else if (y <= 1.95e-220) {
tmp = x_m / (z * (z - t));
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -1.22e-45: tmp = (x_m / y) / (t - z) elif y <= 1.95e-220: tmp = x_m / (z * (z - t)) else: tmp = (x_m / t) / (y - z) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -1.22e-45) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif (y <= 1.95e-220) tmp = Float64(x_m / Float64(z * Float64(z - t))); else tmp = Float64(Float64(x_m / t) / Float64(y - z)); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (y <= -1.22e-45)
tmp = (x_m / y) / (t - z);
elseif (y <= 1.95e-220)
tmp = x_m / (z * (z - t));
else
tmp = (x_m / t) / (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]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -1.22e-45], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e-220], N[(x$95$m / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.22 \cdot 10^{-45}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-220}:\\
\;\;\;\;\frac{x\_m}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -1.22000000000000007e-45Initial program 89.0%
associate-/l/95.5%
div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in y around inf 88.3%
associate-/r*93.2%
Simplified93.2%
if -1.22000000000000007e-45 < y < 1.95000000000000001e-220Initial program 82.3%
Taylor expanded in y around 0 70.7%
associate-*r/70.7%
neg-mul-170.7%
Simplified70.7%
if 1.95000000000000001e-220 < y Initial program 84.2%
associate-/l/96.5%
Simplified96.5%
Taylor expanded in t around inf 58.9%
Final simplification71.1%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -2.6e-45)
(/ (/ x_m y) (- t z))
(if (<= y 3.3e-118) (/ (/ x_m z) (- z t)) (/ (/ x_m t) (- y z))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -2.6e-45) {
tmp = (x_m / y) / (t - z);
} else if (y <= 3.3e-118) {
tmp = (x_m / z) / (z - t);
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 (y <= (-2.6d-45)) then
tmp = (x_m / y) / (t - z)
else if (y <= 3.3d-118) then
tmp = (x_m / z) / (z - t)
else
tmp = (x_m / t) / (y - z)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -2.6e-45) {
tmp = (x_m / y) / (t - z);
} else if (y <= 3.3e-118) {
tmp = (x_m / z) / (z - t);
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -2.6e-45: tmp = (x_m / y) / (t - z) elif y <= 3.3e-118: tmp = (x_m / z) / (z - t) else: tmp = (x_m / t) / (y - z) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -2.6e-45) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif (y <= 3.3e-118) tmp = Float64(Float64(x_m / z) / Float64(z - t)); else tmp = Float64(Float64(x_m / t) / Float64(y - z)); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (y <= -2.6e-45)
tmp = (x_m / y) / (t - z);
elseif (y <= 3.3e-118)
tmp = (x_m / z) / (z - t);
else
tmp = (x_m / t) / (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]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -2.6e-45], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e-118], N[(N[(x$95$m / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-45}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-118}:\\
\;\;\;\;\frac{\frac{x\_m}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -2.59999999999999987e-45Initial program 88.9%
associate-/l/95.4%
div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in y around inf 88.1%
associate-/r*93.1%
Simplified93.1%
if -2.59999999999999987e-45 < y < 3.3e-118Initial program 83.3%
Taylor expanded in x around 0 83.3%
associate-/l/97.9%
Simplified97.9%
Taylor expanded in y around 0 81.7%
mul-1-neg81.7%
Simplified81.7%
if 3.3e-118 < y Initial program 83.9%
associate-/l/96.8%
Simplified96.8%
Taylor expanded in t around inf 59.9%
Final simplification76.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= y -1.55e-93) (not (<= y 1.5e-81)))
(/ (/ x_m t) y)
(/ x_m (* z (- t))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((y <= -1.55e-93) || !(y <= 1.5e-81)) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (z * -t);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 ((y <= (-1.55d-93)) .or. (.not. (y <= 1.5d-81))) then
tmp = (x_m / t) / y
else
tmp = x_m / (z * -t)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((y <= -1.55e-93) || !(y <= 1.5e-81)) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (z * -t);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if (y <= -1.55e-93) or not (y <= 1.5e-81): tmp = (x_m / t) / y else: tmp = x_m / (z * -t) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((y <= -1.55e-93) || !(y <= 1.5e-81)) tmp = Float64(Float64(x_m / t) / y); else tmp = Float64(x_m / Float64(z * Float64(-t))); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if ((y <= -1.55e-93) || ~((y <= 1.5e-81)))
tmp = (x_m / t) / y;
else
tmp = x_m / (z * -t);
end
tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[y, -1.55e-93], N[Not[LessEqual[y, 1.5e-81]], $MachinePrecision]], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], N[(x$95$m / N[(z * (-t)), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{-93} \lor \neg \left(y \leq 1.5 \cdot 10^{-81}\right):\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z \cdot \left(-t\right)}\\
\end{array}
\end{array}
if y < -1.55e-93 or 1.4999999999999999e-81 < y Initial program 85.8%
associate-/l/96.2%
div-inv96.2%
Applied egg-rr96.2%
*-commutative96.2%
clear-num96.0%
un-div-inv96.1%
Applied egg-rr96.1%
Taylor expanded in y around inf 76.6%
associate-/l/80.4%
Simplified80.4%
Taylor expanded in t around inf 52.3%
if -1.55e-93 < y < 1.4999999999999999e-81Initial program 83.6%
Taylor expanded in y around 0 68.6%
associate-*r/68.6%
neg-mul-168.6%
Simplified68.6%
Taylor expanded in z around 0 41.8%
associate-*r/41.8%
mul-1-neg41.8%
Simplified41.8%
Final simplification48.4%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -2.2e-42)
(/ (/ x_m z) (- y))
(if (<= z 2.5e+18) (/ (/ x_m t) y) (/ x_m (* z (- t)))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -2.2e-42) {
tmp = (x_m / z) / -y;
} else if (z <= 2.5e+18) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (z * -t);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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.2d-42)) then
tmp = (x_m / z) / -y
else if (z <= 2.5d+18) then
tmp = (x_m / t) / y
else
tmp = x_m / (z * -t)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -2.2e-42) {
tmp = (x_m / z) / -y;
} else if (z <= 2.5e+18) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (z * -t);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if z <= -2.2e-42: tmp = (x_m / z) / -y elif z <= 2.5e+18: tmp = (x_m / t) / y else: tmp = x_m / (z * -t) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (z <= -2.2e-42) tmp = Float64(Float64(x_m / z) / Float64(-y)); elseif (z <= 2.5e+18) tmp = Float64(Float64(x_m / t) / y); else tmp = Float64(x_m / Float64(z * Float64(-t))); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (z <= -2.2e-42)
tmp = (x_m / z) / -y;
elseif (z <= 2.5e+18)
tmp = (x_m / t) / y;
else
tmp = x_m / (z * -t);
end
tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[z, -2.2e-42], N[(N[(x$95$m / z), $MachinePrecision] / (-y)), $MachinePrecision], If[LessEqual[z, 2.5e+18], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], N[(x$95$m / N[(z * (-t)), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{-42}:\\
\;\;\;\;\frac{\frac{x\_m}{z}}{-y}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z \cdot \left(-t\right)}\\
\end{array}
\end{array}
if z < -2.20000000000000005e-42Initial program 75.3%
associate-/l/99.8%
div-inv99.7%
Applied egg-rr99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 36.7%
associate-/l/45.9%
Simplified45.9%
Taylor expanded in t around 0 44.4%
associate-*r/44.4%
neg-mul-144.4%
Simplified44.4%
if -2.20000000000000005e-42 < z < 2.5e18Initial program 93.6%
associate-/l/92.5%
div-inv92.5%
Applied egg-rr92.5%
*-commutative92.5%
clear-num92.3%
un-div-inv92.5%
Applied egg-rr92.5%
Taylor expanded in y around inf 71.5%
associate-/l/71.7%
Simplified71.7%
Taylor expanded in t around inf 57.4%
if 2.5e18 < z Initial program 75.8%
Taylor expanded in y around 0 57.7%
associate-*r/57.7%
neg-mul-157.7%
Simplified57.7%
Taylor expanded in z around 0 39.5%
associate-*r/39.5%
mul-1-neg39.5%
Simplified39.5%
Final simplification50.4%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -7.6e+102) (not (<= z 5.5e+70)))
(/ x_m (* z t))
(/ x_m (* y t)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((z <= -7.6e+102) || !(z <= 5.5e+70)) {
tmp = x_m / (z * t);
} else {
tmp = x_m / (y * t);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 <= (-7.6d+102)) .or. (.not. (z <= 5.5d+70))) then
tmp = x_m / (z * t)
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);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((z <= -7.6e+102) || !(z <= 5.5e+70)) {
tmp = x_m / (z * t);
} else {
tmp = x_m / (y * t);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if (z <= -7.6e+102) or not (z <= 5.5e+70): tmp = x_m / (z * t) else: tmp = x_m / (y * t) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((z <= -7.6e+102) || !(z <= 5.5e+70)) tmp = Float64(x_m / Float64(z * t)); 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);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if ((z <= -7.6e+102) || ~((z <= 5.5e+70)))
tmp = x_m / (z * t);
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]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -7.6e+102], N[Not[LessEqual[z, 5.5e+70]], $MachinePrecision]], N[(x$95$m / N[(z * t), $MachinePrecision]), $MachinePrecision], 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)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{+102} \lor \neg \left(z \leq 5.5 \cdot 10^{+70}\right):\\
\;\;\;\;\frac{x\_m}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{y \cdot t}\\
\end{array}
\end{array}
if z < -7.59999999999999958e102 or 5.49999999999999986e70 < z Initial program 68.4%
Taylor expanded in y around 0 64.9%
associate-*r/64.9%
neg-mul-164.9%
Simplified64.9%
div-inv64.9%
add-sqr-sqrt29.7%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-unprod33.1%
add-sqr-sqrt59.5%
Applied egg-rr59.5%
*-commutative59.5%
associate-*l/59.5%
times-frac59.0%
associate-*l/59.0%
*-lft-identity59.0%
Simplified59.0%
Taylor expanded in t around inf 31.2%
*-commutative31.2%
Simplified31.2%
if -7.59999999999999958e102 < z < 5.49999999999999986e70Initial program 93.2%
Taylor expanded in z around 0 49.1%
Final simplification43.2%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -2.4e-11)
(/ x_m (* y z))
(if (<= z 5.5e+69) (/ x_m (* y t)) (/ x_m (* z t))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -2.4e-11) {
tmp = x_m / (y * z);
} else if (z <= 5.5e+69) {
tmp = x_m / (y * t);
} else {
tmp = x_m / (z * t);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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.4d-11)) then
tmp = x_m / (y * z)
else if (z <= 5.5d+69) then
tmp = x_m / (y * t)
else
tmp = x_m / (z * t)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -2.4e-11) {
tmp = x_m / (y * z);
} else if (z <= 5.5e+69) {
tmp = x_m / (y * t);
} else {
tmp = x_m / (z * t);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if z <= -2.4e-11: tmp = x_m / (y * z) elif z <= 5.5e+69: tmp = x_m / (y * t) else: tmp = x_m / (z * t) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (z <= -2.4e-11) tmp = Float64(x_m / Float64(y * z)); elseif (z <= 5.5e+69) tmp = Float64(x_m / Float64(y * t)); else tmp = Float64(x_m / Float64(z * t)); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (z <= -2.4e-11)
tmp = x_m / (y * z);
elseif (z <= 5.5e+69)
tmp = x_m / (y * t);
else
tmp = x_m / (z * t);
end
tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[z, -2.4e-11], N[(x$95$m / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+69], N[(x$95$m / N[(y * t), $MachinePrecision]), $MachinePrecision], N[(x$95$m / N[(z * t), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-11}:\\
\;\;\;\;\frac{x\_m}{y \cdot z}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+69}:\\
\;\;\;\;\frac{x\_m}{y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z \cdot t}\\
\end{array}
\end{array}
if z < -2.4000000000000001e-11Initial program 74.0%
Taylor expanded in y around inf 37.2%
*-commutative37.2%
Simplified37.2%
*-un-lft-identity37.2%
times-frac40.3%
Applied egg-rr40.3%
Taylor expanded in t around 0 38.8%
frac-times36.8%
neg-mul-136.8%
add-sqr-sqrt16.2%
sqrt-unprod38.0%
sqr-neg38.0%
sqrt-unprod16.1%
add-sqr-sqrt28.6%
Applied egg-rr28.6%
if -2.4000000000000001e-11 < z < 5.50000000000000002e69Initial program 93.5%
Taylor expanded in z around 0 54.2%
if 5.50000000000000002e69 < z Initial program 71.5%
Taylor expanded in y around 0 65.5%
associate-*r/65.5%
neg-mul-165.5%
Simplified65.5%
div-inv65.5%
add-sqr-sqrt27.9%
sqrt-unprod58.4%
sqr-neg58.4%
sqrt-unprod38.0%
add-sqr-sqrt60.1%
Applied egg-rr60.1%
*-commutative60.1%
associate-*l/60.1%
times-frac59.8%
associate-*l/59.8%
*-lft-identity59.8%
Simplified59.8%
Taylor expanded in t around inf 41.8%
*-commutative41.8%
Simplified41.8%
Final simplification45.1%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -2.1e+124)
(/ x_m (* y z))
(if (<= z 5.3e+116) (/ (/ x_m t) y) (/ x_m (* z t))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -2.1e+124) {
tmp = x_m / (y * z);
} else if (z <= 5.3e+116) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (z * t);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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+124)) then
tmp = x_m / (y * z)
else if (z <= 5.3d+116) then
tmp = (x_m / t) / y
else
tmp = x_m / (z * t)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -2.1e+124) {
tmp = x_m / (y * z);
} else if (z <= 5.3e+116) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (z * t);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if z <= -2.1e+124: tmp = x_m / (y * z) elif z <= 5.3e+116: tmp = (x_m / t) / y else: tmp = x_m / (z * t) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (z <= -2.1e+124) tmp = Float64(x_m / Float64(y * z)); elseif (z <= 5.3e+116) tmp = Float64(Float64(x_m / t) / y); else tmp = Float64(x_m / Float64(z * t)); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (z <= -2.1e+124)
tmp = x_m / (y * z);
elseif (z <= 5.3e+116)
tmp = (x_m / t) / y;
else
tmp = x_m / (z * t);
end
tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[z, -2.1e+124], N[(x$95$m / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.3e+116], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], N[(x$95$m / N[(z * t), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+124}:\\
\;\;\;\;\frac{x\_m}{y \cdot z}\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{+116}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z \cdot t}\\
\end{array}
\end{array}
if z < -2.10000000000000011e124Initial program 64.1%
Taylor expanded in y around inf 34.9%
*-commutative34.9%
Simplified34.9%
*-un-lft-identity34.9%
times-frac34.1%
Applied egg-rr34.1%
Taylor expanded in t around 0 34.0%
frac-times34.8%
neg-mul-134.8%
add-sqr-sqrt19.4%
sqrt-unprod40.6%
sqr-neg40.6%
sqrt-unprod14.3%
add-sqr-sqrt33.8%
Applied egg-rr33.8%
if -2.10000000000000011e124 < z < 5.3000000000000002e116Initial program 91.6%
associate-/l/94.5%
div-inv94.4%
Applied egg-rr94.4%
*-commutative94.4%
clear-num94.3%
un-div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in y around inf 64.7%
associate-/l/68.9%
Simplified68.9%
Taylor expanded in t around inf 48.3%
if 5.3000000000000002e116 < z Initial program 75.0%
Taylor expanded in y around 0 75.0%
associate-*r/75.0%
neg-mul-175.0%
Simplified75.0%
div-inv74.9%
add-sqr-sqrt31.6%
sqrt-unprod66.0%
sqr-neg66.0%
sqrt-unprod43.3%
add-sqr-sqrt71.2%
Applied egg-rr71.2%
*-commutative71.2%
associate-*l/71.2%
times-frac70.8%
associate-*l/70.8%
*-lft-identity70.8%
Simplified70.8%
Taylor expanded in t around inf 52.3%
*-commutative52.3%
Simplified52.3%
Final simplification46.1%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -3.7e+45)
(/ (/ x_m z) y)
(if (<= z 4.5e+116) (/ (/ x_m t) y) (/ x_m (* z t))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -3.7e+45) {
tmp = (x_m / z) / y;
} else if (z <= 4.5e+116) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (z * t);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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.7d+45)) then
tmp = (x_m / z) / y
else if (z <= 4.5d+116) then
tmp = (x_m / t) / y
else
tmp = x_m / (z * t)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (z <= -3.7e+45) {
tmp = (x_m / z) / y;
} else if (z <= 4.5e+116) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (z * t);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if z <= -3.7e+45: tmp = (x_m / z) / y elif z <= 4.5e+116: tmp = (x_m / t) / y else: tmp = x_m / (z * t) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (z <= -3.7e+45) tmp = Float64(Float64(x_m / z) / y); elseif (z <= 4.5e+116) tmp = Float64(Float64(x_m / t) / y); else tmp = Float64(x_m / Float64(z * t)); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (z <= -3.7e+45)
tmp = (x_m / z) / y;
elseif (z <= 4.5e+116)
tmp = (x_m / t) / y;
else
tmp = x_m / (z * t);
end
tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[z, -3.7e+45], N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 4.5e+116], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], N[(x$95$m / N[(z * t), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+45}:\\
\;\;\;\;\frac{\frac{x\_m}{z}}{y}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+116}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z \cdot t}\\
\end{array}
\end{array}
if z < -3.69999999999999977e45Initial program 69.7%
Taylor expanded in y around inf 36.9%
*-commutative36.9%
Simplified36.9%
*-un-lft-identity36.9%
times-frac39.3%
Applied egg-rr39.3%
Taylor expanded in t around 0 39.2%
frac-times36.8%
neg-mul-136.8%
add-sqr-sqrt14.8%
sqrt-unprod39.1%
sqr-neg39.1%
sqrt-unprod16.2%
add-sqr-sqrt31.1%
associate-/r*38.3%
Applied egg-rr38.3%
if -3.69999999999999977e45 < z < 4.50000000000000016e116Initial program 92.0%
associate-/l/94.0%
div-inv93.9%
Applied egg-rr93.9%
*-commutative93.9%
clear-num93.8%
un-div-inv93.9%
Applied egg-rr93.9%
Taylor expanded in y around inf 66.6%
associate-/l/69.6%
Simplified69.6%
Taylor expanded in t around inf 49.9%
if 4.50000000000000016e116 < z Initial program 75.0%
Taylor expanded in y around 0 75.0%
associate-*r/75.0%
neg-mul-175.0%
Simplified75.0%
div-inv74.9%
add-sqr-sqrt31.6%
sqrt-unprod66.0%
sqr-neg66.0%
sqrt-unprod43.3%
add-sqr-sqrt71.2%
Applied egg-rr71.2%
*-commutative71.2%
associate-*l/71.2%
times-frac70.8%
associate-*l/70.8%
*-lft-identity70.8%
Simplified70.8%
Taylor expanded in t around inf 52.3%
*-commutative52.3%
Simplified52.3%
Final simplification47.4%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= y -1.46e-76) (/ x_m (* y (- t z))) (/ x_m (* (- y z) t)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -1.46e-76) {
tmp = x_m / (y * (t - z));
} else {
tmp = x_m / ((y - z) * t);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 (y <= (-1.46d-76)) then
tmp = x_m / (y * (t - 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);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -1.46e-76) {
tmp = x_m / (y * (t - z));
} else {
tmp = x_m / ((y - z) * t);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -1.46e-76: tmp = x_m / (y * (t - z)) else: tmp = x_m / ((y - z) * t) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -1.46e-76) tmp = Float64(x_m / Float64(y * Float64(t - 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);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (y <= -1.46e-76)
tmp = x_m / (y * (t - 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]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -1.46e-76], N[(x$95$m / N[(y * N[(t - 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_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.46 \cdot 10^{-76}:\\
\;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -1.45999999999999985e-76Initial program 88.4%
Taylor expanded in y around inf 85.0%
*-commutative85.0%
Simplified85.0%
if -1.45999999999999985e-76 < y Initial program 83.6%
Taylor expanded in t around inf 54.1%
Final simplification62.8%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= y -5.1e-79) (/ x_m (* y (- t z))) (/ (/ x_m t) (- y z)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -5.1e-79) {
tmp = x_m / (y * (t - z));
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 (y <= (-5.1d-79)) then
tmp = x_m / (y * (t - z))
else
tmp = (x_m / t) / (y - z)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -5.1e-79) {
tmp = x_m / (y * (t - z));
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -5.1e-79: tmp = x_m / (y * (t - z)) else: tmp = (x_m / t) / (y - z) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -5.1e-79) tmp = Float64(x_m / Float64(y * Float64(t - z))); else tmp = Float64(Float64(x_m / t) / Float64(y - z)); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (y <= -5.1e-79)
tmp = x_m / (y * (t - z));
else
tmp = (x_m / t) / (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]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -5.1e-79], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{-79}:\\
\;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -5.0999999999999999e-79Initial program 88.4%
Taylor expanded in y around inf 85.0%
*-commutative85.0%
Simplified85.0%
if -5.0999999999999999e-79 < y Initial program 83.6%
associate-/l/96.1%
Simplified96.1%
Taylor expanded in t around inf 55.7%
Final simplification64.0%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= y -6e-79) (/ (/ x_m y) (- t z)) (/ (/ x_m t) (- y z)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -6e-79) {
tmp = (x_m / y) / (t - z);
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 (y <= (-6d-79)) then
tmp = (x_m / y) / (t - z)
else
tmp = (x_m / t) / (y - z)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -6e-79) {
tmp = (x_m / y) / (t - z);
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -6e-79: tmp = (x_m / y) / (t - z) else: tmp = (x_m / t) / (y - z) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -6e-79) tmp = Float64(Float64(x_m / y) / Float64(t - z)); else tmp = Float64(Float64(x_m / t) / Float64(y - z)); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (y <= -6e-79)
tmp = (x_m / y) / (t - z);
else
tmp = (x_m / t) / (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]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -6e-79], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-79}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -5.99999999999999999e-79Initial program 88.4%
associate-/l/95.8%
div-inv95.7%
Applied egg-rr95.7%
Taylor expanded in y around inf 85.0%
associate-/r*89.7%
Simplified89.7%
if -5.99999999999999999e-79 < y Initial program 83.6%
associate-/l/96.1%
Simplified96.1%
Taylor expanded in t around inf 55.7%
Final simplification65.3%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= t 4.7e-30) (/ (/ x_m (- t z)) y) (/ (/ x_m t) (- y z)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= 4.7e-30) {
tmp = (x_m / (t - z)) / y;
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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.7d-30) then
tmp = (x_m / (t - z)) / y
else
tmp = (x_m / t) / (y - z)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= 4.7e-30) {
tmp = (x_m / (t - z)) / y;
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): tmp = 0 if t <= 4.7e-30: tmp = (x_m / (t - z)) / y else: tmp = (x_m / t) / (y - z) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) tmp = 0.0 if (t <= 4.7e-30) tmp = Float64(Float64(x_m / Float64(t - z)) / y); else tmp = Float64(Float64(x_m / t) / Float64(y - z)); end return Float64(x_s * tmp) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
tmp = 0.0;
if (t <= 4.7e-30)
tmp = (x_m / (t - z)) / y;
else
tmp = (x_m / t) / (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]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, 4.7e-30], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq 4.7 \cdot 10^{-30}:\\
\;\;\;\;\frac{\frac{x\_m}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if t < 4.69999999999999969e-30Initial program 88.1%
associate-/l/95.2%
div-inv95.0%
Applied egg-rr95.0%
*-commutative95.0%
clear-num94.9%
un-div-inv95.1%
Applied egg-rr95.1%
Taylor expanded in y around inf 56.9%
associate-/l/59.2%
Simplified59.2%
if 4.69999999999999969e-30 < t Initial program 76.6%
associate-/l/98.3%
Simplified98.3%
Taylor expanded in t around inf 82.2%
Final simplification65.5%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x_s x_m y z t) :precision binary64 (* x_s (/ x_m (* y t))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
return x_s * (x_m / (y * t));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
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 * t))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
return x_s * (x_m / (y * t));
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) [x_m, y, z, t] = sort([x_m, y, z, t]) def code(x_s, x_m, y, z, t): return x_s * (x_m / (y * t))
x\_m = abs(x) x\_s = copysign(1.0, x) x_m, y, z, t = sort([x_m, y, z, t]) function code(x_s, x_m, y, z, t) return Float64(x_s * Float64(x_m / Float64(y * t))) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp = code(x_s, x_m, y, z, t)
tmp = x_s * (x_m / (y * t));
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]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * 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)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \frac{x\_m}{y \cdot t}
\end{array}
Initial program 85.0%
Taylor expanded in z around 0 38.8%
Final simplification38.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
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
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t - z)
if ((x / t_1) < 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = x * (1.0d0 / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (x / t_1) < 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = x * (1.0 / t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (Float64(x / t_1) < 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(x * Float64(1.0 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if ((x / t_1) < 0.0) tmp = (x / (y - z)) / (t - z); else tmp = x * (1.0 / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t\_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024115
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))