
(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 19 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) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (* (/ (sqrt x_m) (- y z)) (/ (sqrt x_m) (- t z)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
return x_s * ((sqrt(x_m) / (y - z)) * (sqrt(x_m) / (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 * ((sqrt(x_m) / (y - z)) * (sqrt(x_m) / (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 * ((Math.sqrt(x_m) / (y - z)) * (Math.sqrt(x_m) / (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 * ((math.sqrt(x_m) / (y - z)) * (math.sqrt(x_m) / (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(Float64(sqrt(x_m) / Float64(y - z)) * Float64(sqrt(x_m) / 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 * ((sqrt(x_m) / (y - z)) * (sqrt(x_m) / (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[(N[(N[Sqrt[x$95$m], $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[x$95$m], $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(\frac{\sqrt{x\_m}}{y - z} \cdot \frac{\sqrt{x\_m}}{t - z}\right)
\end{array}
Initial program 86.9%
add-sqr-sqrt40.8%
times-frac46.6%
Applied egg-rr46.6%
Final simplification46.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -2.8e-6)
(/ (/ x_m y) (- t z))
(if (or (<= y -7.5e-217) (and (not (<= y -3.2e-299)) (<= y 2.2e-155)))
(/ x_m (* z (- z t)))
(/ (/ x_m t) (- 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 (y <= -2.8e-6) {
tmp = (x_m / y) / (t - z);
} else if ((y <= -7.5e-217) || (!(y <= -3.2e-299) && (y <= 2.2e-155))) {
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)
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.8d-6)) then
tmp = (x_m / y) / (t - z)
else if ((y <= (-7.5d-217)) .or. (.not. (y <= (-3.2d-299))) .and. (y <= 2.2d-155)) 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);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -2.8e-6) {
tmp = (x_m / y) / (t - z);
} else if ((y <= -7.5e-217) || (!(y <= -3.2e-299) && (y <= 2.2e-155))) {
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) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -2.8e-6: tmp = (x_m / y) / (t - z) elif (y <= -7.5e-217) or (not (y <= -3.2e-299) and (y <= 2.2e-155)): 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) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -2.8e-6) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif ((y <= -7.5e-217) || (!(y <= -3.2e-299) && (y <= 2.2e-155))) 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); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -2.8e-6) tmp = (x_m / y) / (t - z); elseif ((y <= -7.5e-217) || (~((y <= -3.2e-299)) && (y <= 2.2e-155))) 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]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -2.8e-6], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -7.5e-217], And[N[Not[LessEqual[y, -3.2e-299]], $MachinePrecision], LessEqual[y, 2.2e-155]]], 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\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{-217} \lor \neg \left(y \leq -3.2 \cdot 10^{-299}\right) \land y \leq 2.2 \cdot 10^{-155}:\\
\;\;\;\;\frac{x\_m}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -2.79999999999999987e-6Initial program 81.3%
add-sqr-sqrt37.8%
times-frac46.2%
Applied egg-rr46.2%
Taylor expanded in y around inf 77.9%
associate-/r*84.7%
Simplified84.7%
if -2.79999999999999987e-6 < y < -7.50000000000000031e-217 or -3.20000000000000008e-299 < y < 2.1999999999999999e-155Initial program 93.7%
Taylor expanded in y around 0 80.3%
associate-*r/80.3%
neg-mul-180.3%
Simplified80.3%
if -7.50000000000000031e-217 < y < -3.20000000000000008e-299 or 2.1999999999999999e-155 < y Initial program 84.7%
associate-/l/98.2%
Simplified98.2%
Taylor expanded in t around inf 59.8%
Final simplification71.9%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -2.15e-5)
(/ (/ x_m y) (- t z))
(if (<= y 2.3e-155)
(* (/ -1.0 (- t z)) (/ x_m z))
(/ (/ x_m t) (- 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 (y <= -2.15e-5) {
tmp = (x_m / y) / (t - z);
} else if (y <= 2.3e-155) {
tmp = (-1.0 / (t - z)) * (x_m / z);
} else {
tmp = (x_m / t) / (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 (y <= (-2.15d-5)) then
tmp = (x_m / y) / (t - z)
else if (y <= 2.3d-155) then
tmp = ((-1.0d0) / (t - z)) * (x_m / 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);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -2.15e-5) {
tmp = (x_m / y) / (t - z);
} else if (y <= 2.3e-155) {
tmp = (-1.0 / (t - z)) * (x_m / z);
} else {
tmp = (x_m / t) / (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 y <= -2.15e-5: tmp = (x_m / y) / (t - z) elif y <= 2.3e-155: tmp = (-1.0 / (t - z)) * (x_m / z) else: tmp = (x_m / t) / (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 (y <= -2.15e-5) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif (y <= 2.3e-155) tmp = Float64(Float64(-1.0 / Float64(t - z)) * Float64(x_m / 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); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -2.15e-5) tmp = (x_m / y) / (t - z); elseif (y <= 2.3e-155) tmp = (-1.0 / (t - z)) * (x_m / 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]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -2.15e-5], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e-155], N[(N[(-1.0 / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(x$95$m / 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\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-155}:\\
\;\;\;\;\frac{-1}{t - z} \cdot \frac{x\_m}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -2.1500000000000001e-5Initial program 81.3%
add-sqr-sqrt37.8%
times-frac46.2%
Applied egg-rr46.2%
Taylor expanded in y around inf 77.9%
associate-/r*84.7%
Simplified84.7%
if -2.1500000000000001e-5 < y < 2.30000000000000005e-155Initial program 92.3%
Taylor expanded in x around 0 92.3%
associate-/l/97.7%
Simplified97.7%
Taylor expanded in y around 0 84.1%
mul-1-neg84.1%
Simplified84.1%
add-sqr-sqrt49.7%
sqrt-unprod51.4%
sqr-neg51.4%
sqrt-unprod25.8%
add-sqr-sqrt33.9%
*-un-lft-identity33.9%
associate-/l/34.0%
Applied egg-rr34.0%
*-lft-identity34.0%
*-commutative34.0%
Simplified34.0%
add-sqr-sqrt18.0%
*-commutative18.0%
sqrt-unprod51.3%
sqr-neg51.3%
sqrt-unprod43.2%
add-sqr-sqrt80.3%
neg-mul-180.3%
times-frac84.1%
Applied egg-rr84.1%
if 2.30000000000000005e-155 < y Initial program 85.1%
associate-/l/98.1%
Simplified98.1%
Taylor expanded in t around inf 58.7%
Final simplification73.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= t -2.8e+22)
(/ (/ x_m y) (- t z))
(if (<= t 2.7e+121)
(/ x_m (* (- z t) (- z y)))
(* (/ x_m (- z y)) (/ -1.0 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 <= -2.8e+22) {
tmp = (x_m / y) / (t - z);
} else if (t <= 2.7e+121) {
tmp = x_m / ((z - t) * (z - y));
} else {
tmp = (x_m / (z - y)) * (-1.0 / 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 <= (-2.8d+22)) then
tmp = (x_m / y) / (t - z)
else if (t <= 2.7d+121) then
tmp = x_m / ((z - t) * (z - y))
else
tmp = (x_m / (z - y)) * ((-1.0d0) / 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 <= -2.8e+22) {
tmp = (x_m / y) / (t - z);
} else if (t <= 2.7e+121) {
tmp = x_m / ((z - t) * (z - y));
} else {
tmp = (x_m / (z - y)) * (-1.0 / 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 <= -2.8e+22: tmp = (x_m / y) / (t - z) elif t <= 2.7e+121: tmp = x_m / ((z - t) * (z - y)) else: tmp = (x_m / (z - y)) * (-1.0 / 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 <= -2.8e+22) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif (t <= 2.7e+121) tmp = Float64(x_m / Float64(Float64(z - t) * Float64(z - y))); else tmp = Float64(Float64(x_m / Float64(z - y)) * Float64(-1.0 / 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 <= -2.8e+22) tmp = (x_m / y) / (t - z); elseif (t <= 2.7e+121) tmp = x_m / ((z - t) * (z - y)); else tmp = (x_m / (z - y)) * (-1.0 / 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, -2.8e+22], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+121], N[(x$95$m / N[(N[(z - t), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(z - y), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / 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 -2.8 \cdot 10^{+22}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+121}:\\
\;\;\;\;\frac{x\_m}{\left(z - t\right) \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z - y} \cdot \frac{-1}{t}\\
\end{array}
\end{array}
if t < -2.8e22Initial program 88.4%
add-sqr-sqrt46.9%
times-frac51.5%
Applied egg-rr51.5%
Taylor expanded in y around inf 61.2%
associate-/r*64.1%
Simplified64.1%
if -2.8e22 < t < 2.7000000000000002e121Initial program 89.3%
if 2.7000000000000002e121 < t Initial program 74.0%
Taylor expanded in t around inf 74.0%
*-un-lft-identity74.0%
frac-times92.3%
*-commutative92.3%
Applied egg-rr92.3%
Final simplification83.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= y -3.65e-112) (not (<= y 1.06e-119)))
(/ (/ x_m t) y)
(* (/ x_m z) (/ -1.0 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 ((y <= -3.65e-112) || !(y <= 1.06e-119)) {
tmp = (x_m / t) / y;
} else {
tmp = (x_m / z) * (-1.0 / 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 ((y <= (-3.65d-112)) .or. (.not. (y <= 1.06d-119))) then
tmp = (x_m / t) / y
else
tmp = (x_m / z) * ((-1.0d0) / 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 ((y <= -3.65e-112) || !(y <= 1.06e-119)) {
tmp = (x_m / t) / y;
} else {
tmp = (x_m / z) * (-1.0 / 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 (y <= -3.65e-112) or not (y <= 1.06e-119): tmp = (x_m / t) / y else: tmp = (x_m / z) * (-1.0 / 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 ((y <= -3.65e-112) || !(y <= 1.06e-119)) tmp = Float64(Float64(x_m / t) / y); else tmp = Float64(Float64(x_m / z) * Float64(-1.0 / 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 ((y <= -3.65e-112) || ~((y <= 1.06e-119))) tmp = (x_m / t) / y; else tmp = (x_m / z) * (-1.0 / t); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[y, -3.65e-112], N[Not[LessEqual[y, 1.06e-119]], $MachinePrecision]], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(x$95$m / z), $MachinePrecision] * N[(-1.0 / 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}\;y \leq -3.65 \cdot 10^{-112} \lor \neg \left(y \leq 1.06 \cdot 10^{-119}\right):\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z} \cdot \frac{-1}{t}\\
\end{array}
\end{array}
if y < -3.6499999999999999e-112 or 1.05999999999999999e-119 < y Initial program 84.1%
add-sqr-sqrt40.5%
times-frac47.3%
Applied egg-rr47.3%
Taylor expanded in z around 0 48.0%
associate-/r*52.1%
Simplified52.1%
if -3.6499999999999999e-112 < y < 1.05999999999999999e-119Initial program 93.7%
Taylor expanded in t around inf 59.1%
Taylor expanded in y around 0 52.3%
associate-*r/52.3%
neg-mul-152.3%
*-commutative52.3%
Simplified52.3%
neg-mul-152.3%
*-commutative52.3%
times-frac55.3%
Applied egg-rr55.3%
Final simplification53.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 (or (<= z -3.8e+73) (not (<= z 1.2e+54)))
(/ x_m (* z (- t 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 ((z <= -3.8e+73) || !(z <= 1.2e+54)) {
tmp = x_m / (z * (t - 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 ((z <= (-3.8d+73)) .or. (.not. (z <= 1.2d+54))) then
tmp = x_m / (z * (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);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((z <= -3.8e+73) || !(z <= 1.2e+54)) {
tmp = x_m / (z * (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) def code(x_s, x_m, y, z, t): tmp = 0 if (z <= -3.8e+73) or not (z <= 1.2e+54): tmp = x_m / (z * (t - 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 ((z <= -3.8e+73) || !(z <= 1.2e+54)) tmp = Float64(x_m / Float64(z * 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); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((z <= -3.8e+73) || ~((z <= 1.2e+54))) tmp = x_m / (z * (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]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -3.8e+73], N[Not[LessEqual[z, 1.2e+54]], $MachinePrecision]], N[(x$95$m / N[(z * 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\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+73} \lor \neg \left(z \leq 1.2 \cdot 10^{+54}\right):\\
\;\;\;\;\frac{x\_m}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -3.80000000000000022e73 or 1.19999999999999999e54 < z Initial program 77.9%
Taylor expanded in x around 0 77.9%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in y around 0 91.1%
mul-1-neg91.1%
Simplified91.1%
add-sqr-sqrt56.3%
sqrt-unprod75.8%
sqr-neg75.8%
sqrt-unprod49.3%
add-sqr-sqrt63.9%
*-un-lft-identity63.9%
associate-/l/64.2%
Applied egg-rr64.2%
*-lft-identity64.2%
*-commutative64.2%
Simplified64.2%
if -3.80000000000000022e73 < z < 1.19999999999999999e54Initial program 92.7%
Taylor expanded in t around inf 68.8%
Final simplification67.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 (<= y -2.8e-109)
(* (/ x_m y) (/ 1.0 t))
(if (<= y 3.7e-119) (* (/ x_m z) (/ -1.0 t)) (/ (/ x_m t) y)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -2.8e-109) {
tmp = (x_m / y) * (1.0 / t);
} else if (y <= 3.7e-119) {
tmp = (x_m / z) * (-1.0 / t);
} else {
tmp = (x_m / t) / y;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.8d-109)) then
tmp = (x_m / y) * (1.0d0 / t)
else if (y <= 3.7d-119) then
tmp = (x_m / z) * ((-1.0d0) / t)
else
tmp = (x_m / t) / y
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -2.8e-109) {
tmp = (x_m / y) * (1.0 / t);
} else if (y <= 3.7e-119) {
tmp = (x_m / z) * (-1.0 / t);
} else {
tmp = (x_m / t) / y;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -2.8e-109: tmp = (x_m / y) * (1.0 / t) elif y <= 3.7e-119: tmp = (x_m / z) * (-1.0 / t) else: tmp = (x_m / t) / y return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -2.8e-109) tmp = Float64(Float64(x_m / y) * Float64(1.0 / t)); elseif (y <= 3.7e-119) tmp = Float64(Float64(x_m / z) * Float64(-1.0 / t)); else tmp = Float64(Float64(x_m / t) / y); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -2.8e-109) tmp = (x_m / y) * (1.0 / t); elseif (y <= 3.7e-119) tmp = (x_m / z) * (-1.0 / t); else tmp = (x_m / t) / y; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -2.8e-109], N[(N[(x$95$m / y), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e-119], N[(N[(x$95$m / z), $MachinePrecision] * N[(-1.0 / t), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / y), $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}\;y \leq -2.8 \cdot 10^{-109}:\\
\;\;\;\;\frac{x\_m}{y} \cdot \frac{1}{t}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-119}:\\
\;\;\;\;\frac{x\_m}{z} \cdot \frac{-1}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\end{array}
\end{array}
if y < -2.79999999999999979e-109Initial program 83.9%
Taylor expanded in z around 0 49.9%
*-un-lft-identity49.9%
times-frac56.4%
Applied egg-rr56.4%
if -2.79999999999999979e-109 < y < 3.7000000000000001e-119Initial program 93.7%
Taylor expanded in t around inf 59.1%
Taylor expanded in y around 0 52.3%
associate-*r/52.3%
neg-mul-152.3%
*-commutative52.3%
Simplified52.3%
neg-mul-152.3%
*-commutative52.3%
times-frac55.3%
Applied egg-rr55.3%
if 3.7000000000000001e-119 < y Initial program 84.2%
add-sqr-sqrt39.8%
times-frac47.4%
Applied egg-rr47.4%
Taylor expanded in z around 0 46.4%
associate-/r*49.3%
Simplified49.3%
Final simplification53.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 (<= y -3e-113)
(/ 1.0 (* t (/ y x_m)))
(if (<= y 2.8e-119) (* (/ x_m z) (/ -1.0 t)) (/ (/ x_m t) y)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -3e-113) {
tmp = 1.0 / (t * (y / x_m));
} else if (y <= 2.8e-119) {
tmp = (x_m / z) * (-1.0 / t);
} else {
tmp = (x_m / t) / y;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-3d-113)) then
tmp = 1.0d0 / (t * (y / x_m))
else if (y <= 2.8d-119) then
tmp = (x_m / z) * ((-1.0d0) / t)
else
tmp = (x_m / t) / y
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -3e-113) {
tmp = 1.0 / (t * (y / x_m));
} else if (y <= 2.8e-119) {
tmp = (x_m / z) * (-1.0 / t);
} else {
tmp = (x_m / t) / y;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -3e-113: tmp = 1.0 / (t * (y / x_m)) elif y <= 2.8e-119: tmp = (x_m / z) * (-1.0 / t) else: tmp = (x_m / t) / y return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -3e-113) tmp = Float64(1.0 / Float64(t * Float64(y / x_m))); elseif (y <= 2.8e-119) tmp = Float64(Float64(x_m / z) * Float64(-1.0 / t)); else tmp = Float64(Float64(x_m / t) / y); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -3e-113) tmp = 1.0 / (t * (y / x_m)); elseif (y <= 2.8e-119) tmp = (x_m / z) * (-1.0 / t); else tmp = (x_m / t) / y; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -3e-113], N[(1.0 / N[(t * N[(y / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e-119], N[(N[(x$95$m / z), $MachinePrecision] * N[(-1.0 / t), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / y), $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}\;y \leq -3 \cdot 10^{-113}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y}{x\_m}}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-119}:\\
\;\;\;\;\frac{x\_m}{z} \cdot \frac{-1}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\end{array}
\end{array}
if y < -3.0000000000000001e-113Initial program 83.9%
Taylor expanded in z around 0 49.9%
clear-num50.3%
inv-pow50.3%
associate-/l*60.0%
Applied egg-rr60.0%
unpow-160.0%
Simplified60.0%
if -3.0000000000000001e-113 < y < 2.8e-119Initial program 93.7%
Taylor expanded in t around inf 59.1%
Taylor expanded in y around 0 52.3%
associate-*r/52.3%
neg-mul-152.3%
*-commutative52.3%
Simplified52.3%
neg-mul-152.3%
*-commutative52.3%
times-frac55.3%
Applied egg-rr55.3%
if 2.8e-119 < y Initial program 84.2%
add-sqr-sqrt39.8%
times-frac47.4%
Applied egg-rr47.4%
Taylor expanded in z around 0 46.4%
associate-/r*49.3%
Simplified49.3%
Final simplification54.4%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= t -3.2e-97)
(/ 1.0 (* t (/ y x_m)))
(if (<= t 1.4e-121) (/ x_m (* 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 <= -3.2e-97) {
tmp = 1.0 / (t * (y / x_m));
} else if (t <= 1.4e-121) {
tmp = x_m / (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 <= (-3.2d-97)) then
tmp = 1.0d0 / (t * (y / x_m))
else if (t <= 1.4d-121) then
tmp = x_m / (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 <= -3.2e-97) {
tmp = 1.0 / (t * (y / x_m));
} else if (t <= 1.4e-121) {
tmp = x_m / (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 <= -3.2e-97: tmp = 1.0 / (t * (y / x_m)) elif t <= 1.4e-121: tmp = x_m / (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 <= -3.2e-97) tmp = Float64(1.0 / Float64(t * Float64(y / x_m))); elseif (t <= 1.4e-121) tmp = Float64(x_m / Float64(y * Float64(-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 <= -3.2e-97) tmp = 1.0 / (t * (y / x_m)); elseif (t <= 1.4e-121) tmp = x_m / (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, -3.2e-97], N[(1.0 / N[(t * N[(y / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e-121], N[(x$95$m / N[(y * (-z)), $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 -3.2 \cdot 10^{-97}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y}{x\_m}}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-121}:\\
\;\;\;\;\frac{x\_m}{y \cdot \left(-z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -3.1999999999999998e-97Initial program 89.8%
Taylor expanded in z around 0 54.4%
clear-num54.7%
inv-pow54.7%
associate-/l*57.5%
Applied egg-rr57.5%
unpow-157.5%
Simplified57.5%
if -3.1999999999999998e-97 < t < 1.4000000000000001e-121Initial program 89.6%
associate-/l/97.4%
Simplified97.4%
clear-num97.3%
associate-/r/97.3%
Applied egg-rr97.3%
Taylor expanded in t around 0 87.0%
Taylor expanded in z around 0 44.7%
associate-*r/44.7%
mul-1-neg44.7%
Simplified44.7%
if 1.4000000000000001e-121 < t Initial program 81.6%
Taylor expanded in t around inf 69.9%
Final simplification57.9%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -2e-118)
(/ x_m (* y (- t z)))
(if (<= y -1.9e-194) (/ x_m (* z (- t 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 (y <= -2e-118) {
tmp = x_m / (y * (t - z));
} else if (y <= -1.9e-194) {
tmp = x_m / (z * (t - 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 (y <= (-2d-118)) then
tmp = x_m / (y * (t - z))
else if (y <= (-1.9d-194)) then
tmp = x_m / (z * (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);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -2e-118) {
tmp = x_m / (y * (t - z));
} else if (y <= -1.9e-194) {
tmp = x_m / (z * (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) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -2e-118: tmp = x_m / (y * (t - z)) elif y <= -1.9e-194: tmp = x_m / (z * (t - 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 (y <= -2e-118) tmp = Float64(x_m / Float64(y * Float64(t - z))); elseif (y <= -1.9e-194) tmp = Float64(x_m / Float64(z * 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); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -2e-118) tmp = x_m / (y * (t - z)); elseif (y <= -1.9e-194) tmp = x_m / (z * (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]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -2e-118], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.9e-194], N[(x$95$m / N[(z * 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\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-118}:\\
\;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-194}:\\
\;\;\;\;\frac{x\_m}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -1.99999999999999997e-118Initial program 84.1%
Taylor expanded in y around inf 69.9%
*-commutative69.9%
Simplified69.9%
if -1.99999999999999997e-118 < y < -1.9000000000000001e-194Initial program 99.7%
Taylor expanded in x around 0 99.7%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in y around 0 93.6%
mul-1-neg93.6%
Simplified93.6%
add-sqr-sqrt68.2%
sqrt-unprod81.9%
sqr-neg81.9%
sqrt-unprod38.0%
add-sqr-sqrt52.0%
*-un-lft-identity52.0%
associate-/l/52.0%
Applied egg-rr52.0%
*-lft-identity52.0%
*-commutative52.0%
Simplified52.0%
if -1.9000000000000001e-194 < y Initial program 87.0%
Taylor expanded in t around inf 55.2%
Final simplification59.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 (<= y -2.3e-119)
(/ x_m (* y (- t z)))
(if (<= y -4.8e-195) (/ x_m (* z (- t z))) (/ (/ x_m t) (- 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 (y <= -2.3e-119) {
tmp = x_m / (y * (t - z));
} else if (y <= -4.8e-195) {
tmp = x_m / (z * (t - z));
} else {
tmp = (x_m / t) / (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 (y <= (-2.3d-119)) then
tmp = x_m / (y * (t - z))
else if (y <= (-4.8d-195)) then
tmp = x_m / (z * (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);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -2.3e-119) {
tmp = x_m / (y * (t - z));
} else if (y <= -4.8e-195) {
tmp = x_m / (z * (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) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -2.3e-119: tmp = x_m / (y * (t - z)) elif y <= -4.8e-195: tmp = x_m / (z * (t - z)) else: tmp = (x_m / t) / (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 (y <= -2.3e-119) tmp = Float64(x_m / Float64(y * Float64(t - z))); elseif (y <= -4.8e-195) tmp = Float64(x_m / Float64(z * 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); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -2.3e-119) tmp = x_m / (y * (t - z)); elseif (y <= -4.8e-195) tmp = x_m / (z * (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]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -2.3e-119], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.8e-195], N[(x$95$m / N[(z * 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\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-119}:\\
\;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-195}:\\
\;\;\;\;\frac{x\_m}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -2.29999999999999993e-119Initial program 84.3%
Taylor expanded in y around inf 69.1%
*-commutative69.1%
Simplified69.1%
if -2.29999999999999993e-119 < y < -4.8e-195Initial program 99.7%
Taylor expanded in x around 0 99.7%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in y around 0 93.2%
mul-1-neg93.2%
Simplified93.2%
add-sqr-sqrt66.2%
sqrt-unprod80.8%
sqr-neg80.8%
sqrt-unprod40.5%
add-sqr-sqrt55.2%
*-un-lft-identity55.2%
associate-/l/55.2%
Applied egg-rr55.2%
*-lft-identity55.2%
*-commutative55.2%
Simplified55.2%
if -4.8e-195 < y Initial program 87.0%
associate-/l/97.4%
Simplified97.4%
Taylor expanded in t around inf 57.6%
Final simplification61.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 (<= y -3.2e-119)
(/ (/ x_m y) (- t z))
(if (<= y -1.9e-194) (/ x_m (* z (- t z))) (/ (/ x_m t) (- 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 (y <= -3.2e-119) {
tmp = (x_m / y) / (t - z);
} else if (y <= -1.9e-194) {
tmp = x_m / (z * (t - z));
} else {
tmp = (x_m / t) / (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 (y <= (-3.2d-119)) then
tmp = (x_m / y) / (t - z)
else if (y <= (-1.9d-194)) then
tmp = x_m / (z * (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);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -3.2e-119) {
tmp = (x_m / y) / (t - z);
} else if (y <= -1.9e-194) {
tmp = x_m / (z * (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) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -3.2e-119: tmp = (x_m / y) / (t - z) elif y <= -1.9e-194: tmp = x_m / (z * (t - z)) else: tmp = (x_m / t) / (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 (y <= -3.2e-119) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif (y <= -1.9e-194) tmp = Float64(x_m / Float64(z * 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); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -3.2e-119) tmp = (x_m / y) / (t - z); elseif (y <= -1.9e-194) tmp = x_m / (z * (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]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -3.2e-119], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.9e-194], N[(x$95$m / N[(z * 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\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-119}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-194}:\\
\;\;\;\;\frac{x\_m}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -3.19999999999999993e-119Initial program 84.3%
add-sqr-sqrt40.3%
times-frac46.1%
Applied egg-rr46.1%
Taylor expanded in y around inf 69.1%
associate-/r*73.2%
Simplified73.2%
if -3.19999999999999993e-119 < y < -1.9000000000000001e-194Initial program 99.7%
Taylor expanded in x around 0 99.7%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in y around 0 93.2%
mul-1-neg93.2%
Simplified93.2%
add-sqr-sqrt66.2%
sqrt-unprod80.8%
sqr-neg80.8%
sqrt-unprod40.5%
add-sqr-sqrt55.2%
*-un-lft-identity55.2%
associate-/l/55.2%
Applied egg-rr55.2%
*-lft-identity55.2%
*-commutative55.2%
Simplified55.2%
if -1.9000000000000001e-194 < y Initial program 87.0%
associate-/l/97.4%
Simplified97.4%
Taylor expanded in t around inf 57.6%
Final simplification62.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -4e-7)
(/ (/ x_m y) (- t z))
(if (<= y 6.5e-156) (/ (/ x_m z) (- z t)) (/ (/ x_m t) (- 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 (y <= -4e-7) {
tmp = (x_m / y) / (t - z);
} else if (y <= 6.5e-156) {
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)
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 <= (-4d-7)) then
tmp = (x_m / y) / (t - z)
else if (y <= 6.5d-156) 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);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -4e-7) {
tmp = (x_m / y) / (t - z);
} else if (y <= 6.5e-156) {
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) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -4e-7: tmp = (x_m / y) / (t - z) elif y <= 6.5e-156: 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) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -4e-7) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif (y <= 6.5e-156) 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); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -4e-7) tmp = (x_m / y) / (t - z); elseif (y <= 6.5e-156) 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]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -4e-7], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e-156], 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\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{-7}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-156}:\\
\;\;\;\;\frac{\frac{x\_m}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -3.9999999999999998e-7Initial program 81.3%
add-sqr-sqrt37.8%
times-frac46.2%
Applied egg-rr46.2%
Taylor expanded in y around inf 77.9%
associate-/r*84.7%
Simplified84.7%
if -3.9999999999999998e-7 < y < 6.5000000000000002e-156Initial program 92.3%
Taylor expanded in x around 0 92.3%
associate-/l/97.7%
Simplified97.7%
Taylor expanded in y around 0 84.1%
mul-1-neg84.1%
Simplified84.1%
if 6.5000000000000002e-156 < y Initial program 85.1%
associate-/l/98.1%
Simplified98.1%
Taylor expanded in t around inf 58.7%
Final simplification73.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= y -1.05e-112) (not (<= y 5e-120)))
(/ (/ x_m t) y)
(/ x_m (* t (- z))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((y <= -1.05e-112) || !(y <= 5e-120)) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (t * -z);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.05d-112)) .or. (.not. (y <= 5d-120))) then
tmp = (x_m / t) / y
else
tmp = x_m / (t * -z)
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((y <= -1.05e-112) || !(y <= 5e-120)) {
tmp = (x_m / t) / y;
} else {
tmp = x_m / (t * -z);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (y <= -1.05e-112) or not (y <= 5e-120): tmp = (x_m / t) / y else: tmp = x_m / (t * -z) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((y <= -1.05e-112) || !(y <= 5e-120)) tmp = Float64(Float64(x_m / t) / y); else tmp = Float64(x_m / Float64(t * Float64(-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 ((y <= -1.05e-112) || ~((y <= 5e-120))) tmp = (x_m / t) / y; else tmp = x_m / (t * -z); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[y, -1.05e-112], N[Not[LessEqual[y, 5e-120]], $MachinePrecision]], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], N[(x$95$m / N[(t * (-z)), $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}\;y \leq -1.05 \cdot 10^{-112} \lor \neg \left(y \leq 5 \cdot 10^{-120}\right):\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{t \cdot \left(-z\right)}\\
\end{array}
\end{array}
if y < -1.05e-112 or 5.00000000000000007e-120 < y Initial program 84.2%
add-sqr-sqrt40.8%
times-frac47.6%
Applied egg-rr47.6%
Taylor expanded in z around 0 48.2%
associate-/r*52.4%
Simplified52.4%
if -1.05e-112 < y < 5.00000000000000007e-120Initial program 93.6%
associate-/l/94.7%
Simplified94.7%
Taylor expanded in t around inf 54.8%
Taylor expanded in y around 0 53.0%
associate-*r/53.0%
neg-mul-153.0%
Simplified53.0%
Final simplification52.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -3500.0) (not (<= z 1.8e+124)))
(/ x_m (* z t))
(/ 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 tmp;
if ((z <= -3500.0) || !(z <= 1.8e+124)) {
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)
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 <= (-3500.0d0)) .or. (.not. (z <= 1.8d+124))) 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);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((z <= -3500.0) || !(z <= 1.8e+124)) {
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) def code(x_s, x_m, y, z, t): tmp = 0 if (z <= -3500.0) or not (z <= 1.8e+124): 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) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((z <= -3500.0) || !(z <= 1.8e+124)) 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); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((z <= -3500.0) || ~((z <= 1.8e+124))) 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]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -3500.0], N[Not[LessEqual[z, 1.8e+124]], $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\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3500 \lor \neg \left(z \leq 1.8 \cdot 10^{+124}\right):\\
\;\;\;\;\frac{x\_m}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{y \cdot t}\\
\end{array}
\end{array}
if z < -3500 or 1.79999999999999993e124 < z Initial program 76.0%
Taylor expanded in x around 0 76.0%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in y around 0 87.0%
mul-1-neg87.0%
Simplified87.0%
add-sqr-sqrt51.0%
sqrt-unprod69.5%
sqr-neg69.5%
sqrt-unprod45.4%
add-sqr-sqrt56.7%
*-un-lft-identity56.7%
associate-/l/57.0%
Applied egg-rr57.0%
*-lft-identity57.0%
*-commutative57.0%
Simplified57.0%
Taylor expanded in z around 0 31.8%
*-commutative31.8%
Simplified31.8%
if -3500 < z < 1.79999999999999993e124Initial program 94.4%
Taylor expanded in z around 0 57.0%
Final simplification46.8%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -7e+112) (not (<= z 2.6e+147)))
(/ x_m (* z t))
(/ (/ x_m t) y))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((z <= -7e+112) || !(z <= 2.6e+147)) {
tmp = x_m / (z * t);
} else {
tmp = (x_m / t) / y;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-7d+112)) .or. (.not. (z <= 2.6d+147))) then
tmp = x_m / (z * t)
else
tmp = (x_m / t) / y
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((z <= -7e+112) || !(z <= 2.6e+147)) {
tmp = x_m / (z * t);
} else {
tmp = (x_m / t) / y;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (z <= -7e+112) or not (z <= 2.6e+147): tmp = x_m / (z * t) else: tmp = (x_m / t) / y return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((z <= -7e+112) || !(z <= 2.6e+147)) tmp = Float64(x_m / Float64(z * t)); else tmp = Float64(Float64(x_m / t) / y); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((z <= -7e+112) || ~((z <= 2.6e+147))) tmp = x_m / (z * t); else tmp = (x_m / t) / y; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -7e+112], N[Not[LessEqual[z, 2.6e+147]], $MachinePrecision]], N[(x$95$m / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+112} \lor \neg \left(z \leq 2.6 \cdot 10^{+147}\right):\\
\;\;\;\;\frac{x\_m}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\end{array}
\end{array}
if z < -6.99999999999999994e112 or 2.5999999999999999e147 < z Initial program 78.4%
Taylor expanded in x around 0 78.4%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in y around 0 96.8%
mul-1-neg96.8%
Simplified96.8%
add-sqr-sqrt60.6%
sqrt-unprod83.6%
sqr-neg83.6%
sqrt-unprod61.8%
add-sqr-sqrt74.0%
*-un-lft-identity74.0%
associate-/l/74.4%
Applied egg-rr74.4%
*-lft-identity74.4%
*-commutative74.4%
Simplified74.4%
Taylor expanded in z around 0 42.5%
*-commutative42.5%
Simplified42.5%
if -6.99999999999999994e112 < z < 2.5999999999999999e147Initial program 90.2%
add-sqr-sqrt41.2%
times-frac44.9%
Applied egg-rr44.9%
Taylor expanded in z around 0 48.3%
associate-/r*54.8%
Simplified54.8%
Final simplification51.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 (- t z)) (- y z))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
return x_s * ((x_m / (t - z)) / (y - z));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x_s * ((x_m / (t - z)) / (y - z))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
return x_s * ((x_m / (t - z)) / (y - z));
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): return x_s * ((x_m / (t - z)) / (y - z))
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) return Float64(x_s * Float64(Float64(x_m / Float64(t - z)) / Float64(y - z))) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y, z, t) tmp = x_s * ((x_m / (t - z)) / (y - z)); end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \frac{\frac{x\_m}{t - z}}{y - z}
\end{array}
Initial program 86.9%
associate-/l/97.2%
Simplified97.2%
Final simplification97.2%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (/ (/ x_m (- 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(Float64(x_m / 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[(N[(x$95$m / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \frac{\frac{x\_m}{y - z}}{t - z}
\end{array}
Initial program 86.9%
Taylor expanded in x around 0 86.9%
associate-/l/98.2%
Simplified98.2%
Final simplification98.2%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (/ x_m (* 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) {
return x_s * (x_m / (y * t));
}
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 * t))
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 * t));
}
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 * t))
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(y * t))) 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 * 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]
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\_s \cdot \frac{x\_m}{y \cdot t}
\end{array}
Initial program 86.9%
Taylor expanded in z around 0 39.3%
Final simplification39.3%
(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 2024095
(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))))