
(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 21 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 1 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 88.6%
add-sqr-sqrt45.8%
times-frac51.5%
Applied egg-rr51.5%
Final simplification51.5%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (/ (/ (- x_m) z) (- t z))))
(*
x_s
(if (<= y -7.2e+196)
(/ (/ x_m (- t z)) y)
(if (<= y -7200000.0)
(/ x_m (* y (- t z)))
(if (<= y 1.45e-251)
t_1
(if (<= y 8e-205)
(/ x_m (* (- y z) t))
(if (<= y 1.1e+28) t_1 (/ (/ 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 t_1 = (-x_m / z) / (t - z);
double tmp;
if (y <= -7.2e+196) {
tmp = (x_m / (t - z)) / y;
} else if (y <= -7200000.0) {
tmp = x_m / (y * (t - z));
} else if (y <= 1.45e-251) {
tmp = t_1;
} else if (y <= 8e-205) {
tmp = x_m / ((y - z) * t);
} else if (y <= 1.1e+28) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-x_m / z) / (t - z)
if (y <= (-7.2d+196)) then
tmp = (x_m / (t - z)) / y
else if (y <= (-7200000.0d0)) then
tmp = x_m / (y * (t - z))
else if (y <= 1.45d-251) then
tmp = t_1
else if (y <= 8d-205) then
tmp = x_m / ((y - z) * t)
else if (y <= 1.1d+28) then
tmp = t_1
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 t_1 = (-x_m / z) / (t - z);
double tmp;
if (y <= -7.2e+196) {
tmp = (x_m / (t - z)) / y;
} else if (y <= -7200000.0) {
tmp = x_m / (y * (t - z));
} else if (y <= 1.45e-251) {
tmp = t_1;
} else if (y <= 8e-205) {
tmp = x_m / ((y - z) * t);
} else if (y <= 1.1e+28) {
tmp = t_1;
} 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): t_1 = (-x_m / z) / (t - z) tmp = 0 if y <= -7.2e+196: tmp = (x_m / (t - z)) / y elif y <= -7200000.0: tmp = x_m / (y * (t - z)) elif y <= 1.45e-251: tmp = t_1 elif y <= 8e-205: tmp = x_m / ((y - z) * t) elif y <= 1.1e+28: tmp = t_1 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) t_1 = Float64(Float64(Float64(-x_m) / z) / Float64(t - z)) tmp = 0.0 if (y <= -7.2e+196) tmp = Float64(Float64(x_m / Float64(t - z)) / y); elseif (y <= -7200000.0) tmp = Float64(x_m / Float64(y * Float64(t - z))); elseif (y <= 1.45e-251) tmp = t_1; elseif (y <= 8e-205) tmp = Float64(x_m / Float64(Float64(y - z) * t)); elseif (y <= 1.1e+28) tmp = t_1; 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) t_1 = (-x_m / z) / (t - z); tmp = 0.0; if (y <= -7.2e+196) tmp = (x_m / (t - z)) / y; elseif (y <= -7200000.0) tmp = x_m / (y * (t - z)); elseif (y <= 1.45e-251) tmp = t_1; elseif (y <= 8e-205) tmp = x_m / ((y - z) * t); elseif (y <= 1.1e+28) tmp = t_1; 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_] := Block[{t$95$1 = N[(N[((-x$95$m) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -7.2e+196], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -7200000.0], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e-251], t$95$1, If[LessEqual[y, 8e-205], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+28], t$95$1, 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)
\\
\begin{array}{l}
t_1 := \frac{\frac{-x_m}{z}}{t - z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+196}:\\
\;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\
\mathbf{elif}\;y \leq -7200000:\\
\;\;\;\;\frac{x_m}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-251}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-205}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
\end{array}
if y < -7.20000000000000015e196Initial program 84.1%
Taylor expanded in y around inf 84.1%
*-commutative84.1%
associate-/r*100.0%
Simplified100.0%
if -7.20000000000000015e196 < y < -7.2e6Initial program 84.8%
Taylor expanded in y around inf 75.3%
*-commutative75.3%
Simplified75.3%
if -7.2e6 < y < 1.45e-251 or 8e-205 < y < 1.09999999999999993e28Initial program 89.4%
add-sqr-sqrt49.3%
times-frac56.4%
Applied egg-rr56.4%
associate-*r/54.9%
associate-*l/54.8%
add-sqr-sqrt98.3%
Applied egg-rr98.3%
Taylor expanded in y around 0 81.3%
associate-*r/81.3%
neg-mul-181.3%
Simplified81.3%
if 1.45e-251 < y < 8e-205Initial program 99.4%
Taylor expanded in t around inf 79.4%
if 1.09999999999999993e28 < y Initial program 89.6%
Taylor expanded in y around inf 86.7%
*-commutative86.7%
associate-/r*87.1%
Simplified87.1%
Taylor expanded in t around inf 54.3%
Final simplification74.5%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -1.85e+184)
(/ (/ (- x_m) y) z)
(if (<= y -5.6e+65)
(/ x_m (* y t))
(if (<= y -2.8e-24)
(/ (- x_m) (* y z))
(if (<= y 2.2e+16) (/ (- 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 (y <= -1.85e+184) {
tmp = (-x_m / y) / z;
} else if (y <= -5.6e+65) {
tmp = x_m / (y * t);
} else if (y <= -2.8e-24) {
tmp = -x_m / (y * z);
} else if (y <= 2.2e+16) {
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 (y <= (-1.85d+184)) then
tmp = (-x_m / y) / z
else if (y <= (-5.6d+65)) then
tmp = x_m / (y * t)
else if (y <= (-2.8d-24)) then
tmp = -x_m / (y * z)
else if (y <= 2.2d+16) 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 (y <= -1.85e+184) {
tmp = (-x_m / y) / z;
} else if (y <= -5.6e+65) {
tmp = x_m / (y * t);
} else if (y <= -2.8e-24) {
tmp = -x_m / (y * z);
} else if (y <= 2.2e+16) {
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 y <= -1.85e+184: tmp = (-x_m / y) / z elif y <= -5.6e+65: tmp = x_m / (y * t) elif y <= -2.8e-24: tmp = -x_m / (y * z) elif y <= 2.2e+16: 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 (y <= -1.85e+184) tmp = Float64(Float64(Float64(-x_m) / y) / z); elseif (y <= -5.6e+65) tmp = Float64(x_m / Float64(y * t)); elseif (y <= -2.8e-24) tmp = Float64(Float64(-x_m) / Float64(y * z)); elseif (y <= 2.2e+16) tmp = Float64(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 (y <= -1.85e+184) tmp = (-x_m / y) / z; elseif (y <= -5.6e+65) tmp = x_m / (y * t); elseif (y <= -2.8e-24) tmp = -x_m / (y * z); elseif (y <= 2.2e+16) 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[LessEqual[y, -1.85e+184], N[(N[((-x$95$m) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -5.6e+65], N[(x$95$m / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.8e-24], N[((-x$95$m) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+16], 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}\;y \leq -1.85 \cdot 10^{+184}:\\
\;\;\;\;\frac{\frac{-x_m}{y}}{z}\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{+65}:\\
\;\;\;\;\frac{x_m}{y \cdot t}\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-24}:\\
\;\;\;\;\frac{-x_m}{y \cdot z}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+16}:\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
if y < -1.8499999999999999e184Initial program 85.7%
Taylor expanded in y around inf 85.7%
*-commutative85.7%
associate-/r*99.9%
Simplified99.9%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
Taylor expanded in t around 0 60.3%
mul-1-neg60.3%
associate-/r*79.1%
distribute-neg-frac79.1%
distribute-frac-neg79.1%
Simplified79.1%
if -1.8499999999999999e184 < y < -5.5999999999999998e65Initial program 75.7%
Taylor expanded in z around 0 37.3%
if -5.5999999999999998e65 < y < -2.8000000000000002e-24Initial program 99.0%
Taylor expanded in y around inf 75.1%
*-commutative75.1%
associate-/r*70.3%
Simplified70.3%
Taylor expanded in t around 0 44.4%
associate-*r/44.4%
neg-mul-144.4%
*-commutative44.4%
Simplified44.4%
if -2.8000000000000002e-24 < y < 2.2e16Initial program 89.1%
Taylor expanded in y around 0 74.7%
associate-*r/74.7%
neg-mul-174.7%
Simplified74.7%
Taylor expanded in z around 0 33.4%
associate-*r/33.4%
neg-mul-133.4%
Simplified33.4%
if 2.2e16 < y Initial program 90.1%
Taylor expanded in y around inf 86.6%
*-commutative86.6%
associate-/r*85.7%
Simplified85.7%
Taylor expanded in t around inf 52.9%
Final simplification43.5%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -9.8e+190)
(/ (/ (- x_m) z) y)
(if (<= y -1.05e+66)
(/ x_m (* y t))
(if (<= y -3.3e-24)
(/ (- x_m) (* y z))
(if (<= y 2.2e+16) (/ (- 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 (y <= -9.8e+190) {
tmp = (-x_m / z) / y;
} else if (y <= -1.05e+66) {
tmp = x_m / (y * t);
} else if (y <= -3.3e-24) {
tmp = -x_m / (y * z);
} else if (y <= 2.2e+16) {
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 (y <= (-9.8d+190)) then
tmp = (-x_m / z) / y
else if (y <= (-1.05d+66)) then
tmp = x_m / (y * t)
else if (y <= (-3.3d-24)) then
tmp = -x_m / (y * z)
else if (y <= 2.2d+16) 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 (y <= -9.8e+190) {
tmp = (-x_m / z) / y;
} else if (y <= -1.05e+66) {
tmp = x_m / (y * t);
} else if (y <= -3.3e-24) {
tmp = -x_m / (y * z);
} else if (y <= 2.2e+16) {
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 y <= -9.8e+190: tmp = (-x_m / z) / y elif y <= -1.05e+66: tmp = x_m / (y * t) elif y <= -3.3e-24: tmp = -x_m / (y * z) elif y <= 2.2e+16: 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 (y <= -9.8e+190) tmp = Float64(Float64(Float64(-x_m) / z) / y); elseif (y <= -1.05e+66) tmp = Float64(x_m / Float64(y * t)); elseif (y <= -3.3e-24) tmp = Float64(Float64(-x_m) / Float64(y * z)); elseif (y <= 2.2e+16) tmp = Float64(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 (y <= -9.8e+190) tmp = (-x_m / z) / y; elseif (y <= -1.05e+66) tmp = x_m / (y * t); elseif (y <= -3.3e-24) tmp = -x_m / (y * z); elseif (y <= 2.2e+16) 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[LessEqual[y, -9.8e+190], N[(N[((-x$95$m) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -1.05e+66], N[(x$95$m / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.3e-24], N[((-x$95$m) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+16], 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}\;y \leq -9.8 \cdot 10^{+190}:\\
\;\;\;\;\frac{\frac{-x_m}{z}}{y}\\
\mathbf{elif}\;y \leq -1.05 \cdot 10^{+66}:\\
\;\;\;\;\frac{x_m}{y \cdot t}\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{-24}:\\
\;\;\;\;\frac{-x_m}{y \cdot z}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+16}:\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
if y < -9.7999999999999993e190Initial program 85.7%
Taylor expanded in y around inf 85.7%
*-commutative85.7%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in t around 0 74.5%
associate-*r/74.5%
neg-mul-174.5%
Simplified74.5%
if -9.7999999999999993e190 < y < -1.05000000000000003e66Initial program 75.7%
Taylor expanded in z around 0 37.3%
if -1.05000000000000003e66 < y < -3.29999999999999984e-24Initial program 99.0%
Taylor expanded in y around inf 75.1%
*-commutative75.1%
associate-/r*70.3%
Simplified70.3%
Taylor expanded in t around 0 44.4%
associate-*r/44.4%
neg-mul-144.4%
*-commutative44.4%
Simplified44.4%
if -3.29999999999999984e-24 < y < 2.2e16Initial program 89.1%
Taylor expanded in y around 0 74.7%
associate-*r/74.7%
neg-mul-174.7%
Simplified74.7%
Taylor expanded in z around 0 33.4%
associate-*r/33.4%
neg-mul-133.4%
Simplified33.4%
if 2.2e16 < y Initial program 90.1%
Taylor expanded in y around inf 86.6%
*-commutative86.6%
associate-/r*85.7%
Simplified85.7%
Taylor expanded in t around inf 52.9%
Final simplification43.2%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -6.4e+194)
(/ (/ (- x_m) z) y)
(if (<= y -1.3e+66)
(/ 1.0 (* t (/ y x_m)))
(if (<= y -3.3e-24)
(/ (- x_m) (* y z))
(if (<= y 6.4e+16) (/ (- 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 (y <= -6.4e+194) {
tmp = (-x_m / z) / y;
} else if (y <= -1.3e+66) {
tmp = 1.0 / (t * (y / x_m));
} else if (y <= -3.3e-24) {
tmp = -x_m / (y * z);
} else if (y <= 6.4e+16) {
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 (y <= (-6.4d+194)) then
tmp = (-x_m / z) / y
else if (y <= (-1.3d+66)) then
tmp = 1.0d0 / (t * (y / x_m))
else if (y <= (-3.3d-24)) then
tmp = -x_m / (y * z)
else if (y <= 6.4d+16) 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 (y <= -6.4e+194) {
tmp = (-x_m / z) / y;
} else if (y <= -1.3e+66) {
tmp = 1.0 / (t * (y / x_m));
} else if (y <= -3.3e-24) {
tmp = -x_m / (y * z);
} else if (y <= 6.4e+16) {
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 y <= -6.4e+194: tmp = (-x_m / z) / y elif y <= -1.3e+66: tmp = 1.0 / (t * (y / x_m)) elif y <= -3.3e-24: tmp = -x_m / (y * z) elif y <= 6.4e+16: 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 (y <= -6.4e+194) tmp = Float64(Float64(Float64(-x_m) / z) / y); elseif (y <= -1.3e+66) tmp = Float64(1.0 / Float64(t * Float64(y / x_m))); elseif (y <= -3.3e-24) tmp = Float64(Float64(-x_m) / Float64(y * z)); elseif (y <= 6.4e+16) tmp = Float64(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 (y <= -6.4e+194) tmp = (-x_m / z) / y; elseif (y <= -1.3e+66) tmp = 1.0 / (t * (y / x_m)); elseif (y <= -3.3e-24) tmp = -x_m / (y * z); elseif (y <= 6.4e+16) 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[LessEqual[y, -6.4e+194], N[(N[((-x$95$m) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -1.3e+66], N[(1.0 / N[(t * N[(y / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.3e-24], N[((-x$95$m) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e+16], 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}\;y \leq -6.4 \cdot 10^{+194}:\\
\;\;\;\;\frac{\frac{-x_m}{z}}{y}\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{+66}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y}{x_m}}\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{-24}:\\
\;\;\;\;\frac{-x_m}{y \cdot z}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+16}:\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
if y < -6.40000000000000042e194Initial program 85.0%
Taylor expanded in y around inf 85.0%
*-commutative85.0%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in t around 0 73.2%
associate-*r/73.2%
neg-mul-173.2%
Simplified73.2%
if -6.40000000000000042e194 < y < -1.30000000000000006e66Initial program 76.7%
Taylor expanded in z around 0 35.9%
clear-num35.9%
inv-pow35.9%
*-commutative35.9%
associate-/l*43.9%
Applied egg-rr43.9%
unpow-143.9%
associate-/r/55.8%
Simplified55.8%
if -1.30000000000000006e66 < y < -3.29999999999999984e-24Initial program 99.0%
Taylor expanded in y around inf 75.1%
*-commutative75.1%
associate-/r*70.3%
Simplified70.3%
Taylor expanded in t around 0 44.4%
associate-*r/44.4%
neg-mul-144.4%
*-commutative44.4%
Simplified44.4%
if -3.29999999999999984e-24 < y < 6.4e16Initial program 89.1%
Taylor expanded in y around 0 74.7%
associate-*r/74.7%
neg-mul-174.7%
Simplified74.7%
Taylor expanded in z around 0 33.4%
associate-*r/33.4%
neg-mul-133.4%
Simplified33.4%
if 6.4e16 < y Initial program 90.1%
Taylor expanded in y around inf 86.6%
*-commutative86.6%
associate-/r*85.7%
Simplified85.7%
Taylor expanded in t around inf 52.9%
Final simplification44.7%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (/ x_m (- t z))))
(*
x_s
(if (<= y -2.6e+197)
(/ t_1 y)
(if (<= y -8200000.0)
(/ x_m (* y (- t z)))
(if (<= y 3.9e+32) (* (/ -1.0 z) t_1) (/ (/ 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 t_1 = x_m / (t - z);
double tmp;
if (y <= -2.6e+197) {
tmp = t_1 / y;
} else if (y <= -8200000.0) {
tmp = x_m / (y * (t - z));
} else if (y <= 3.9e+32) {
tmp = (-1.0 / z) * t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x_m / (t - z)
if (y <= (-2.6d+197)) then
tmp = t_1 / y
else if (y <= (-8200000.0d0)) then
tmp = x_m / (y * (t - z))
else if (y <= 3.9d+32) then
tmp = ((-1.0d0) / z) * t_1
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 t_1 = x_m / (t - z);
double tmp;
if (y <= -2.6e+197) {
tmp = t_1 / y;
} else if (y <= -8200000.0) {
tmp = x_m / (y * (t - z));
} else if (y <= 3.9e+32) {
tmp = (-1.0 / z) * t_1;
} 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): t_1 = x_m / (t - z) tmp = 0 if y <= -2.6e+197: tmp = t_1 / y elif y <= -8200000.0: tmp = x_m / (y * (t - z)) elif y <= 3.9e+32: tmp = (-1.0 / z) * t_1 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) t_1 = Float64(x_m / Float64(t - z)) tmp = 0.0 if (y <= -2.6e+197) tmp = Float64(t_1 / y); elseif (y <= -8200000.0) tmp = Float64(x_m / Float64(y * Float64(t - z))); elseif (y <= 3.9e+32) tmp = Float64(Float64(-1.0 / z) * t_1); 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) t_1 = x_m / (t - z); tmp = 0.0; if (y <= -2.6e+197) tmp = t_1 / y; elseif (y <= -8200000.0) tmp = x_m / (y * (t - z)); elseif (y <= 3.9e+32) tmp = (-1.0 / z) * t_1; 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_] := Block[{t$95$1 = N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -2.6e+197], N[(t$95$1 / y), $MachinePrecision], If[LessEqual[y, -8200000.0], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+32], N[(N[(-1.0 / z), $MachinePrecision] * t$95$1), $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)
\\
\begin{array}{l}
t_1 := \frac{x_m}{t - z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+197}:\\
\;\;\;\;\frac{t_1}{y}\\
\mathbf{elif}\;y \leq -8200000:\\
\;\;\;\;\frac{x_m}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+32}:\\
\;\;\;\;\frac{-1}{z} \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
\end{array}
if y < -2.59999999999999987e197Initial program 84.1%
Taylor expanded in y around inf 84.1%
*-commutative84.1%
associate-/r*100.0%
Simplified100.0%
if -2.59999999999999987e197 < y < -8.2e6Initial program 84.8%
Taylor expanded in y around inf 75.3%
*-commutative75.3%
Simplified75.3%
if -8.2e6 < y < 3.8999999999999999e32Initial program 89.9%
Taylor expanded in y around 0 73.0%
associate-*r/73.0%
neg-mul-173.0%
Simplified73.0%
neg-mul-173.0%
times-frac82.5%
Applied egg-rr82.5%
if 3.8999999999999999e32 < y Initial program 89.5%
Taylor expanded in y around inf 86.5%
*-commutative86.5%
associate-/r*86.9%
Simplified86.9%
Taylor expanded in t around inf 55.1%
Final simplification75.5%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -3e+200)
(/ (/ x_m (- t z)) y)
(if (<= y -10000000.0)
(/ x_m (* y (- t z)))
(if (<= y 1.62e-59) (/ (- 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 <= -3e+200) {
tmp = (x_m / (t - z)) / y;
} else if (y <= -10000000.0) {
tmp = x_m / (y * (t - z));
} else if (y <= 1.62e-59) {
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 <= (-3d+200)) then
tmp = (x_m / (t - z)) / y
else if (y <= (-10000000.0d0)) then
tmp = x_m / (y * (t - z))
else if (y <= 1.62d-59) 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 <= -3e+200) {
tmp = (x_m / (t - z)) / y;
} else if (y <= -10000000.0) {
tmp = x_m / (y * (t - z));
} else if (y <= 1.62e-59) {
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 <= -3e+200: tmp = (x_m / (t - z)) / y elif y <= -10000000.0: tmp = x_m / (y * (t - z)) elif y <= 1.62e-59: 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 <= -3e+200) tmp = Float64(Float64(x_m / Float64(t - z)) / y); elseif (y <= -10000000.0) tmp = Float64(x_m / Float64(y * Float64(t - z))); elseif (y <= 1.62e-59) tmp = Float64(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 <= -3e+200) tmp = (x_m / (t - z)) / y; elseif (y <= -10000000.0) tmp = x_m / (y * (t - z)); elseif (y <= 1.62e-59) 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, -3e+200], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -10000000.0], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.62e-59], 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 -3 \cdot 10^{+200}:\\
\;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\
\mathbf{elif}\;y \leq -10000000:\\
\;\;\;\;\frac{x_m}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 1.62 \cdot 10^{-59}:\\
\;\;\;\;\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 < -2.99999999999999991e200Initial program 84.1%
Taylor expanded in y around inf 84.1%
*-commutative84.1%
associate-/r*100.0%
Simplified100.0%
if -2.99999999999999991e200 < y < -1e7Initial program 84.8%
Taylor expanded in y around inf 75.3%
*-commutative75.3%
Simplified75.3%
if -1e7 < y < 1.61999999999999989e-59Initial program 90.9%
Taylor expanded in y around 0 75.7%
associate-*r/75.7%
neg-mul-175.7%
Simplified75.7%
if 1.61999999999999989e-59 < y Initial program 88.2%
Taylor expanded in t around inf 52.7%
Final simplification69.8%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -1.4e+66)
(/ (/ x_m y) t)
(if (<= y -2.6e-24)
(/ (- x_m) (* y z))
(if (<= y 3.6e+16) (/ (- 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 (y <= -1.4e+66) {
tmp = (x_m / y) / t;
} else if (y <= -2.6e-24) {
tmp = -x_m / (y * z);
} else if (y <= 3.6e+16) {
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 (y <= (-1.4d+66)) then
tmp = (x_m / y) / t
else if (y <= (-2.6d-24)) then
tmp = -x_m / (y * z)
else if (y <= 3.6d+16) 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 (y <= -1.4e+66) {
tmp = (x_m / y) / t;
} else if (y <= -2.6e-24) {
tmp = -x_m / (y * z);
} else if (y <= 3.6e+16) {
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 y <= -1.4e+66: tmp = (x_m / y) / t elif y <= -2.6e-24: tmp = -x_m / (y * z) elif y <= 3.6e+16: 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 (y <= -1.4e+66) tmp = Float64(Float64(x_m / y) / t); elseif (y <= -2.6e-24) tmp = Float64(Float64(-x_m) / Float64(y * z)); elseif (y <= 3.6e+16) tmp = Float64(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 (y <= -1.4e+66) tmp = (x_m / y) / t; elseif (y <= -2.6e-24) tmp = -x_m / (y * z); elseif (y <= 3.6e+16) 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[LessEqual[y, -1.4e+66], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, -2.6e-24], N[((-x$95$m) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+16], 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}\;y \leq -1.4 \cdot 10^{+66}:\\
\;\;\;\;\frac{\frac{x_m}{y}}{t}\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-24}:\\
\;\;\;\;\frac{-x_m}{y \cdot z}\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+16}:\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
if y < -1.4e66Initial program 80.4%
Taylor expanded in z around 0 42.1%
associate-/r*46.5%
div-inv46.3%
Applied egg-rr46.3%
associate-*l/50.3%
un-div-inv50.4%
Applied egg-rr50.4%
if -1.4e66 < y < -2.6e-24Initial program 99.0%
Taylor expanded in y around inf 75.1%
*-commutative75.1%
associate-/r*70.3%
Simplified70.3%
Taylor expanded in t around 0 44.4%
associate-*r/44.4%
neg-mul-144.4%
*-commutative44.4%
Simplified44.4%
if -2.6e-24 < y < 3.6e16Initial program 89.1%
Taylor expanded in y around 0 74.7%
associate-*r/74.7%
neg-mul-174.7%
Simplified74.7%
Taylor expanded in z around 0 33.4%
associate-*r/33.4%
neg-mul-133.4%
Simplified33.4%
if 3.6e16 < y Initial program 90.1%
Taylor expanded in y around inf 86.6%
*-commutative86.6%
associate-/r*85.7%
Simplified85.7%
Taylor expanded in t around inf 52.9%
Final simplification42.5%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (/ (- x_m) z)))
(*
x_s
(if (<= z -2.45e+81)
(/ t_1 (- t z))
(if (<= z 6e+65) (/ x_m (* (- y z) (- t z))) (/ t_1 (- 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 t_1 = -x_m / z;
double tmp;
if (z <= -2.45e+81) {
tmp = t_1 / (t - z);
} else if (z <= 6e+65) {
tmp = x_m / ((y - z) * (t - z));
} else {
tmp = t_1 / (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) :: t_1
real(8) :: tmp
t_1 = -x_m / z
if (z <= (-2.45d+81)) then
tmp = t_1 / (t - z)
else if (z <= 6d+65) then
tmp = x_m / ((y - z) * (t - z))
else
tmp = t_1 / (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 t_1 = -x_m / z;
double tmp;
if (z <= -2.45e+81) {
tmp = t_1 / (t - z);
} else if (z <= 6e+65) {
tmp = x_m / ((y - z) * (t - z));
} else {
tmp = t_1 / (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): t_1 = -x_m / z tmp = 0 if z <= -2.45e+81: tmp = t_1 / (t - z) elif z <= 6e+65: tmp = x_m / ((y - z) * (t - z)) else: tmp = t_1 / (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) t_1 = Float64(Float64(-x_m) / z) tmp = 0.0 if (z <= -2.45e+81) tmp = Float64(t_1 / Float64(t - z)); elseif (z <= 6e+65) tmp = Float64(x_m / Float64(Float64(y - z) * Float64(t - z))); else tmp = Float64(t_1 / 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) t_1 = -x_m / z; tmp = 0.0; if (z <= -2.45e+81) tmp = t_1 / (t - z); elseif (z <= 6e+65) tmp = x_m / ((y - z) * (t - z)); else tmp = t_1 / (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_] := Block[{t$95$1 = N[((-x$95$m) / z), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -2.45e+81], N[(t$95$1 / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+65], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(y - z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{-x_m}{z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+81}:\\
\;\;\;\;\frac{t_1}{t - z}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+65}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{y - z}\\
\end{array}
\end{array}
\end{array}
if z < -2.45000000000000011e81Initial program 75.6%
add-sqr-sqrt35.4%
times-frac47.6%
Applied egg-rr47.6%
associate-*r/47.6%
associate-*l/47.5%
add-sqr-sqrt99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 89.4%
associate-*r/89.4%
neg-mul-189.4%
Simplified89.4%
if -2.45000000000000011e81 < z < 6.0000000000000004e65Initial program 97.0%
if 6.0000000000000004e65 < z Initial program 77.4%
add-sqr-sqrt42.0%
times-frac55.8%
Applied egg-rr55.8%
Taylor expanded in t around 0 75.8%
mul-1-neg75.8%
associate-/r*89.9%
distribute-neg-frac89.9%
distribute-frac-neg89.9%
Simplified89.9%
Final simplification94.0%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -2.65e+81)
(/ (/ -1.0 z) (/ (- t z) x_m))
(if (<= z 6e+65) (/ x_m (* (- y z) (- t z))) (/ (/ (- x_m) 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) {
double tmp;
if (z <= -2.65e+81) {
tmp = (-1.0 / z) / ((t - z) / x_m);
} else if (z <= 6e+65) {
tmp = x_m / ((y - z) * (t - z));
} else {
tmp = (-x_m / z) / (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 (z <= (-2.65d+81)) then
tmp = ((-1.0d0) / z) / ((t - z) / x_m)
else if (z <= 6d+65) then
tmp = x_m / ((y - z) * (t - z))
else
tmp = (-x_m / z) / (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 (z <= -2.65e+81) {
tmp = (-1.0 / z) / ((t - z) / x_m);
} else if (z <= 6e+65) {
tmp = x_m / ((y - z) * (t - z));
} else {
tmp = (-x_m / z) / (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 z <= -2.65e+81: tmp = (-1.0 / z) / ((t - z) / x_m) elif z <= 6e+65: tmp = x_m / ((y - z) * (t - z)) else: tmp = (-x_m / z) / (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 (z <= -2.65e+81) tmp = Float64(Float64(-1.0 / z) / Float64(Float64(t - z) / x_m)); elseif (z <= 6e+65) tmp = Float64(x_m / Float64(Float64(y - z) * Float64(t - z))); else tmp = Float64(Float64(Float64(-x_m) / z) / 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 (z <= -2.65e+81) tmp = (-1.0 / z) / ((t - z) / x_m); elseif (z <= 6e+65) tmp = x_m / ((y - z) * (t - z)); else tmp = (-x_m / z) / (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[z, -2.65e+81], N[(N[(-1.0 / z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+65], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-x$95$m) / z), $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}\;z \leq -2.65 \cdot 10^{+81}:\\
\;\;\;\;\frac{\frac{-1}{z}}{\frac{t - z}{x_m}}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+65}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-x_m}{z}}{y - z}\\
\end{array}
\end{array}
if z < -2.65000000000000014e81Initial program 75.6%
add-sqr-sqrt35.4%
times-frac47.6%
Applied egg-rr47.6%
frac-times35.4%
add-sqr-sqrt75.6%
associate-/l/99.7%
clear-num99.6%
associate-/l/99.8%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 89.5%
if -2.65000000000000014e81 < z < 6.0000000000000004e65Initial program 97.0%
if 6.0000000000000004e65 < z Initial program 77.4%
add-sqr-sqrt42.0%
times-frac55.8%
Applied egg-rr55.8%
Taylor expanded in t around 0 75.8%
mul-1-neg75.8%
associate-/r*89.9%
distribute-neg-frac89.9%
distribute-frac-neg89.9%
Simplified89.9%
Final simplification94.0%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= t -8.5e-116)
(/ x_m (* y (- t z)))
(if (<= t 1.85e+48) (/ (/ (- x_m) z) (- 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 <= -8.5e-116) {
tmp = x_m / (y * (t - z));
} else if (t <= 1.85e+48) {
tmp = (-x_m / z) / (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 <= (-8.5d-116)) then
tmp = x_m / (y * (t - z))
else if (t <= 1.85d+48) then
tmp = (-x_m / z) / (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 <= -8.5e-116) {
tmp = x_m / (y * (t - z));
} else if (t <= 1.85e+48) {
tmp = (-x_m / z) / (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 <= -8.5e-116: tmp = x_m / (y * (t - z)) elif t <= 1.85e+48: tmp = (-x_m / z) / (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 <= -8.5e-116) tmp = Float64(x_m / Float64(y * Float64(t - z))); elseif (t <= 1.85e+48) tmp = Float64(Float64(Float64(-x_m) / z) / Float64(y - z)); else tmp = Float64(x_m / Float64(Float64(y - z) * t)); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (t <= -8.5e-116) tmp = x_m / (y * (t - z)); elseif (t <= 1.85e+48) tmp = (-x_m / z) / (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, -8.5e-116], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+48], N[(N[((-x$95$m) / z), $MachinePrecision] / 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 -8.5 \cdot 10^{-116}:\\
\;\;\;\;\frac{x_m}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+48}:\\
\;\;\;\;\frac{\frac{-x_m}{z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -8.4999999999999995e-116Initial program 88.0%
Taylor expanded in y around inf 57.4%
*-commutative57.4%
Simplified57.4%
if -8.4999999999999995e-116 < t < 1.85e48Initial program 89.3%
add-sqr-sqrt44.2%
times-frac49.4%
Applied egg-rr49.4%
Taylor expanded in t around 0 73.0%
mul-1-neg73.0%
associate-/r*79.9%
distribute-neg-frac79.9%
distribute-frac-neg79.9%
Simplified79.9%
if 1.85e48 < t Initial program 87.7%
Taylor expanded in t around inf 86.6%
Final simplification73.8%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= t -1.55e-117) (not (<= t 3e-130)))
(/ x_m (* (- y z) t))
(/ (/ (- x_m) z) y))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((t <= -1.55e-117) || !(t <= 3e-130)) {
tmp = x_m / ((y - z) * t);
} else {
tmp = (-x_m / z) / y;
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-1.55d-117)) .or. (.not. (t <= 3d-130))) then
tmp = x_m / ((y - z) * t)
else
tmp = (-x_m / z) / y
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((t <= -1.55e-117) || !(t <= 3e-130)) {
tmp = x_m / ((y - z) * t);
} else {
tmp = (-x_m / z) / y;
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (t <= -1.55e-117) or not (t <= 3e-130): tmp = x_m / ((y - z) * t) else: tmp = (-x_m / z) / y return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((t <= -1.55e-117) || !(t <= 3e-130)) tmp = Float64(x_m / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(Float64(-x_m) / z) / y); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((t <= -1.55e-117) || ~((t <= 3e-130))) tmp = x_m / ((y - z) * t); else tmp = (-x_m / z) / y; end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[t, -1.55e-117], N[Not[LessEqual[t, 3e-130]], $MachinePrecision]], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[((-x$95$m) / z), $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}\;t \leq -1.55 \cdot 10^{-117} \lor \neg \left(t \leq 3 \cdot 10^{-130}\right):\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-x_m}{z}}{y}\\
\end{array}
\end{array}
if t < -1.55000000000000005e-117 or 2.99999999999999986e-130 < t Initial program 88.8%
Taylor expanded in t around inf 68.5%
if -1.55000000000000005e-117 < t < 2.99999999999999986e-130Initial program 88.3%
Taylor expanded in y around inf 54.4%
*-commutative54.4%
associate-/r*52.7%
Simplified52.7%
Taylor expanded in t around 0 41.8%
associate-*r/41.8%
neg-mul-141.8%
Simplified41.8%
Final simplification59.2%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -2.75e+130) (not (<= z 1.5e+71)))
(/ 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 <= -2.75e+130) || !(z <= 1.5e+71)) {
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 <= (-2.75d+130)) .or. (.not. (z <= 1.5d+71))) 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 <= -2.75e+130) || !(z <= 1.5e+71)) {
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 <= -2.75e+130) or not (z <= 1.5e+71): 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 <= -2.75e+130) || !(z <= 1.5e+71)) 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 <= -2.75e+130) || ~((z <= 1.5e+71))) 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, -2.75e+130], N[Not[LessEqual[z, 1.5e+71]], $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 -2.75 \cdot 10^{+130} \lor \neg \left(z \leq 1.5 \cdot 10^{+71}\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 < -2.7499999999999999e130 or 1.50000000000000006e71 < z Initial program 76.8%
Taylor expanded in y around 0 74.6%
associate-*r/74.6%
neg-mul-174.6%
Simplified74.6%
expm1-log1p-u74.5%
expm1-udef72.5%
add-sqr-sqrt34.0%
sqrt-unprod57.4%
sqr-neg57.4%
sqrt-unprod37.3%
add-sqr-sqrt71.4%
associate-/r*71.4%
Applied egg-rr71.4%
expm1-def68.9%
expm1-log1p68.9%
associate-/r*70.4%
Simplified70.4%
if -2.7499999999999999e130 < z < 1.50000000000000006e71Initial program 94.9%
Taylor expanded in t around inf 56.8%
Final simplification61.5%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= z -1.35e+130)
(/ x_m (* z (- t z)))
(if (<= z 2.5e+65) (/ x_m (* (- y z) t)) (/ x_m (* 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) {
double tmp;
if (z <= -1.35e+130) {
tmp = x_m / (z * (t - z));
} else if (z <= 2.5e+65) {
tmp = x_m / ((y - z) * t);
} else {
tmp = x_m / (z * (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 (z <= (-1.35d+130)) then
tmp = x_m / (z * (t - z))
else if (z <= 2.5d+65) then
tmp = x_m / ((y - z) * t)
else
tmp = x_m / (z * (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 (z <= -1.35e+130) {
tmp = x_m / (z * (t - z));
} else if (z <= 2.5e+65) {
tmp = x_m / ((y - z) * t);
} else {
tmp = x_m / (z * (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 z <= -1.35e+130: tmp = x_m / (z * (t - z)) elif z <= 2.5e+65: tmp = x_m / ((y - z) * t) else: tmp = x_m / (z * (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 (z <= -1.35e+130) tmp = Float64(x_m / Float64(z * Float64(t - z))); elseif (z <= 2.5e+65) tmp = Float64(x_m / Float64(Float64(y - z) * t)); else tmp = Float64(x_m / Float64(z * 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 (z <= -1.35e+130) tmp = x_m / (z * (t - z)); elseif (z <= 2.5e+65) tmp = x_m / ((y - z) * t); else tmp = x_m / (z * (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[z, -1.35e+130], N[(x$95$m / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+65], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x$95$m / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+130}:\\
\;\;\;\;\frac{x_m}{z \cdot \left(t - z\right)}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+65}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x_m}{z \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if z < -1.3499999999999999e130Initial program 74.8%
Taylor expanded in y around 0 74.7%
associate-*r/74.7%
neg-mul-174.7%
Simplified74.7%
expm1-log1p-u74.7%
expm1-udef74.8%
add-sqr-sqrt40.4%
sqrt-unprod52.3%
sqr-neg52.3%
sqrt-unprod34.4%
add-sqr-sqrt74.8%
associate-/r*74.8%
Applied egg-rr74.8%
expm1-def71.7%
expm1-log1p71.7%
associate-/r*74.8%
Simplified74.8%
if -1.3499999999999999e130 < z < 2.49999999999999986e65Initial program 95.4%
Taylor expanded in t around inf 57.8%
if 2.49999999999999986e65 < z Initial program 77.4%
add-sqr-sqrt42.0%
times-frac55.8%
Applied egg-rr55.8%
Taylor expanded in t around 0 75.8%
mul-1-neg75.8%
associate-/r*89.9%
distribute-neg-frac89.9%
distribute-frac-neg89.9%
Simplified89.9%
expm1-log1p-u88.0%
expm1-udef68.0%
associate-/l/67.5%
add-sqr-sqrt28.8%
sqrt-unprod57.4%
sqr-neg57.4%
sqrt-unprod37.1%
add-sqr-sqrt66.0%
*-commutative66.0%
Applied egg-rr66.0%
expm1-def65.8%
expm1-log1p65.8%
Simplified65.8%
Final simplification61.8%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -1.7e+198)
(/ (/ x_m (- t z)) y)
(if (<= y -1.46e-30) (/ x_m (* y (- 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 <= -1.7e+198) {
tmp = (x_m / (t - z)) / y;
} else if (y <= -1.46e-30) {
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)
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.7d+198)) then
tmp = (x_m / (t - z)) / y
else if (y <= (-1.46d-30)) 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);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -1.7e+198) {
tmp = (x_m / (t - z)) / y;
} else if (y <= -1.46e-30) {
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) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -1.7e+198: tmp = (x_m / (t - z)) / y elif y <= -1.46e-30: 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) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -1.7e+198) tmp = Float64(Float64(x_m / Float64(t - z)) / y); elseif (y <= -1.46e-30) 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); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -1.7e+198) tmp = (x_m / (t - z)) / y; elseif (y <= -1.46e-30) 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]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -1.7e+198], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -1.46e-30], 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_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+198}:\\
\;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\
\mathbf{elif}\;y \leq -1.46 \cdot 10^{-30}:\\
\;\;\;\;\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.7e198Initial program 84.1%
Taylor expanded in y around inf 84.1%
*-commutative84.1%
associate-/r*100.0%
Simplified100.0%
if -1.7e198 < y < -1.4600000000000001e-30Initial program 87.2%
Taylor expanded in y around inf 75.0%
*-commutative75.0%
Simplified75.0%
if -1.4600000000000001e-30 < y Initial program 89.4%
Taylor expanded in t around inf 49.2%
Final simplification57.3%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -22000.0) (not (<= z 1.8e-51)))
(/ (- 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 <= -22000.0) || !(z <= 1.8e-51)) {
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 <= (-22000.0d0)) .or. (.not. (z <= 1.8d-51))) 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 <= -22000.0) || !(z <= 1.8e-51)) {
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 <= -22000.0) or not (z <= 1.8e-51): 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 <= -22000.0) || !(z <= 1.8e-51)) tmp = Float64(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 <= -22000.0) || ~((z <= 1.8e-51))) 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, -22000.0], N[Not[LessEqual[z, 1.8e-51]], $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 -22000 \lor \neg \left(z \leq 1.8 \cdot 10^{-51}\right):\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
if z < -22000 or 1.8e-51 < z Initial program 83.8%
Taylor expanded in y around 0 68.4%
associate-*r/68.4%
neg-mul-168.4%
Simplified68.4%
Taylor expanded in z around 0 31.4%
associate-*r/31.4%
neg-mul-131.4%
Simplified31.4%
if -22000 < z < 1.8e-51Initial program 96.1%
Taylor expanded in y around inf 70.9%
*-commutative70.9%
associate-/r*70.5%
Simplified70.5%
Taylor expanded in t around inf 60.7%
Final simplification42.9%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -1e+61) (not (<= z 1.7e+63)))
(/ x_m (* y z))
(/ 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 <= -1e+61) || !(z <= 1.7e+63)) {
tmp = x_m / (y * z);
} 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 <= (-1d+61)) .or. (.not. (z <= 1.7d+63))) then
tmp = x_m / (y * z)
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 <= -1e+61) || !(z <= 1.7e+63)) {
tmp = x_m / (y * z);
} 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 <= -1e+61) or not (z <= 1.7e+63): tmp = x_m / (y * z) 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 <= -1e+61) || !(z <= 1.7e+63)) tmp = Float64(x_m / Float64(y * z)); 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 <= -1e+61) || ~((z <= 1.7e+63))) tmp = x_m / (y * z); 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, -1e+61], N[Not[LessEqual[z, 1.7e+63]], $MachinePrecision]], N[(x$95$m / N[(y * z), $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 -1 \cdot 10^{+61} \lor \neg \left(z \leq 1.7 \cdot 10^{+63}\right):\\
\;\;\;\;\frac{x_m}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x_m}{y \cdot t}\\
\end{array}
\end{array}
if z < -9.99999999999999949e60 or 1.6999999999999999e63 < z Initial program 77.9%
Taylor expanded in y around inf 41.0%
*-commutative41.0%
associate-/r*45.3%
Simplified45.3%
Taylor expanded in t around 0 43.0%
associate-*r/43.0%
neg-mul-143.0%
Simplified43.0%
expm1-log1p-u42.6%
expm1-udef52.9%
associate-/l/52.7%
add-sqr-sqrt26.8%
sqrt-unprod44.2%
sqr-neg44.2%
sqrt-unprod25.8%
add-sqr-sqrt52.6%
Applied egg-rr52.6%
expm1-def37.7%
expm1-log1p38.1%
*-commutative38.1%
Simplified38.1%
if -9.99999999999999949e60 < z < 1.6999999999999999e63Initial program 96.8%
Taylor expanded in z around 0 47.4%
Final simplification43.4%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -5.4e+105) (not (<= z 2.2e+65)))
(/ x_m (* y z))
(/ (/ 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 <= -5.4e+105) || !(z <= 2.2e+65)) {
tmp = x_m / (y * z);
} 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 <= (-5.4d+105)) .or. (.not. (z <= 2.2d+65))) then
tmp = x_m / (y * z)
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 <= -5.4e+105) || !(z <= 2.2e+65)) {
tmp = x_m / (y * z);
} 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 <= -5.4e+105) or not (z <= 2.2e+65): tmp = x_m / (y * z) 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 <= -5.4e+105) || !(z <= 2.2e+65)) tmp = Float64(x_m / Float64(y * z)); 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 <= -5.4e+105) || ~((z <= 2.2e+65))) tmp = x_m / (y * z); 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, -5.4e+105], N[Not[LessEqual[z, 2.2e+65]], $MachinePrecision]], N[(x$95$m / N[(y * z), $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 -5.4 \cdot 10^{+105} \lor \neg \left(z \leq 2.2 \cdot 10^{+65}\right):\\
\;\;\;\;\frac{x_m}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
if z < -5.40000000000000033e105 or 2.1999999999999998e65 < z Initial program 77.7%
Taylor expanded in y around inf 43.3%
*-commutative43.3%
associate-/r*46.3%
Simplified46.3%
Taylor expanded in t around 0 44.6%
associate-*r/44.6%
neg-mul-144.6%
Simplified44.6%
expm1-log1p-u44.4%
expm1-udef57.3%
associate-/l/57.0%
add-sqr-sqrt28.5%
sqrt-unprod47.4%
sqr-neg47.4%
sqrt-unprod28.4%
add-sqr-sqrt56.9%
Applied egg-rr56.9%
expm1-def41.0%
expm1-log1p41.3%
*-commutative41.3%
Simplified41.3%
if -5.40000000000000033e105 < z < 2.1999999999999998e65Initial program 95.3%
Taylor expanded in y around inf 62.2%
*-commutative62.2%
associate-/r*64.1%
Simplified64.1%
Taylor expanded in t around inf 46.9%
Final simplification44.8%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= t 8.5e-101) (/ x_m (* y (- 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 (t <= 8.5e-101) {
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)
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 <= 8.5d-101) 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);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= 8.5e-101) {
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) def code(x_s, x_m, y, z, t): tmp = 0 if t <= 8.5e-101: 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) function code(x_s, x_m, y, z, t) tmp = 0.0 if (t <= 8.5e-101) 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); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (t <= 8.5e-101) 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]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, 8.5e-101], 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_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq 8.5 \cdot 10^{-101}:\\
\;\;\;\;\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 t < 8.49999999999999941e-101Initial program 88.5%
Taylor expanded in y around inf 54.9%
*-commutative54.9%
Simplified54.9%
if 8.49999999999999941e-101 < t Initial program 88.9%
Taylor expanded in t around inf 67.8%
Final simplification59.0%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (/ (/ x_m (- y z)) (- t z))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
return x_s * ((x_m / (y - z)) / (t - z));
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x_s * ((x_m / (y - z)) / (t - z))
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
return x_s * ((x_m / (y - z)) / (t - z));
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): return x_s * ((x_m / (y - z)) / (t - z))
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) return Float64(x_s * Float64(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 88.6%
add-sqr-sqrt45.8%
times-frac51.5%
Applied egg-rr51.5%
associate-*r/49.9%
associate-*l/49.8%
add-sqr-sqrt96.8%
Applied egg-rr96.8%
Final simplification96.8%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (/ x_m (* y 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 88.6%
Taylor expanded in z around 0 34.0%
Final simplification34.0%
(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 2024019
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:herbie-target
(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))))