
(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 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 90.8%
add-sqr-sqrt43.1%
times-frac47.8%
Applied egg-rr47.8%
Final simplification47.8%
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) y)) (t_2 (/ (- x_m) (* y z))))
(*
x_s
(if (<= y -1.22e+190)
t_2
(if (<= y -2.7e+130)
t_1
(if (<= y -4e+98)
t_2
(if (<= y -8.2e-111)
(/ x_m (* y t))
(if (or (<= y -1.2e-140) (not (<= y 7e-27)))
t_1
(/ (- x_m) (* 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 t_1 = (x_m / t) / y;
double t_2 = -x_m / (y * z);
double tmp;
if (y <= -1.22e+190) {
tmp = t_2;
} else if (y <= -2.7e+130) {
tmp = t_1;
} else if (y <= -4e+98) {
tmp = t_2;
} else if (y <= -8.2e-111) {
tmp = x_m / (y * t);
} else if ((y <= -1.2e-140) || !(y <= 7e-27)) {
tmp = t_1;
} else {
tmp = -x_m / (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x_m / t) / y
t_2 = -x_m / (y * z)
if (y <= (-1.22d+190)) then
tmp = t_2
else if (y <= (-2.7d+130)) then
tmp = t_1
else if (y <= (-4d+98)) then
tmp = t_2
else if (y <= (-8.2d-111)) then
tmp = x_m / (y * t)
else if ((y <= (-1.2d-140)) .or. (.not. (y <= 7d-27))) then
tmp = t_1
else
tmp = -x_m / (z * t)
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (x_m / t) / y;
double t_2 = -x_m / (y * z);
double tmp;
if (y <= -1.22e+190) {
tmp = t_2;
} else if (y <= -2.7e+130) {
tmp = t_1;
} else if (y <= -4e+98) {
tmp = t_2;
} else if (y <= -8.2e-111) {
tmp = x_m / (y * t);
} else if ((y <= -1.2e-140) || !(y <= 7e-27)) {
tmp = t_1;
} else {
tmp = -x_m / (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): t_1 = (x_m / t) / y t_2 = -x_m / (y * z) tmp = 0 if y <= -1.22e+190: tmp = t_2 elif y <= -2.7e+130: tmp = t_1 elif y <= -4e+98: tmp = t_2 elif y <= -8.2e-111: tmp = x_m / (y * t) elif (y <= -1.2e-140) or not (y <= 7e-27): tmp = t_1 else: tmp = -x_m / (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) t_1 = Float64(Float64(x_m / t) / y) t_2 = Float64(Float64(-x_m) / Float64(y * z)) tmp = 0.0 if (y <= -1.22e+190) tmp = t_2; elseif (y <= -2.7e+130) tmp = t_1; elseif (y <= -4e+98) tmp = t_2; elseif (y <= -8.2e-111) tmp = Float64(x_m / Float64(y * t)); elseif ((y <= -1.2e-140) || !(y <= 7e-27)) tmp = t_1; else tmp = Float64(Float64(-x_m) / Float64(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) t_1 = (x_m / t) / y; t_2 = -x_m / (y * z); tmp = 0.0; if (y <= -1.22e+190) tmp = t_2; elseif (y <= -2.7e+130) tmp = t_1; elseif (y <= -4e+98) tmp = t_2; elseif (y <= -8.2e-111) tmp = x_m / (y * t); elseif ((y <= -1.2e-140) || ~((y <= 7e-27))) tmp = t_1; else tmp = -x_m / (z * t); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[((-x$95$m) / N[(y * z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -1.22e+190], t$95$2, If[LessEqual[y, -2.7e+130], t$95$1, If[LessEqual[y, -4e+98], t$95$2, If[LessEqual[y, -8.2e-111], N[(x$95$m / N[(y * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.2e-140], N[Not[LessEqual[y, 7e-27]], $MachinePrecision]], t$95$1, N[((-x$95$m) / N[(z * t), $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{\frac{x_m}{t}}{y}\\
t_2 := \frac{-x_m}{y \cdot z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.22 \cdot 10^{+190}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{+130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4 \cdot 10^{+98}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -8.2 \cdot 10^{-111}:\\
\;\;\;\;\frac{x_m}{y \cdot t}\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-140} \lor \neg \left(y \leq 7 \cdot 10^{-27}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\
\end{array}
\end{array}
\end{array}
if y < -1.21999999999999995e190 or -2.6999999999999998e130 < y < -3.99999999999999999e98Initial program 99.5%
Taylor expanded in y around inf 92.5%
*-commutative92.5%
associate-/r*93.1%
Simplified93.1%
Taylor expanded in t around 0 69.1%
associate-*r/69.1%
neg-mul-169.1%
*-commutative69.1%
Simplified69.1%
if -1.21999999999999995e190 < y < -2.6999999999999998e130 or -8.19999999999999936e-111 < y < -1.19999999999999993e-140 or 7.0000000000000003e-27 < y Initial program 84.4%
Taylor expanded in y around inf 71.4%
*-commutative71.4%
associate-/r*78.3%
Simplified78.3%
Taylor expanded in t around inf 49.6%
if -3.99999999999999999e98 < y < -8.19999999999999936e-111Initial program 95.6%
Taylor expanded in z around 0 37.8%
if -1.19999999999999993e-140 < y < 7.0000000000000003e-27Initial program 91.8%
*-un-lft-identity91.8%
times-frac95.6%
Applied egg-rr95.6%
Taylor expanded in y around 0 72.5%
mul-1-neg72.5%
associate-/r*77.4%
distribute-neg-frac77.4%
distribute-neg-frac77.4%
Simplified77.4%
Taylor expanded in z around 0 43.5%
associate-*r/43.5%
neg-mul-143.5%
Simplified43.5%
Final simplification47.4%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (/ x_m (* z (- t z)))))
(*
x_s
(if (<= z -8.8e+80)
t_1
(if (<= z 3e-9)
(/ x_m (* (- y z) t))
(if (<= z 3.4e+131) (- (/ (/ x_m z) y)) t_1))))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = x_m / (z * (t - z));
double tmp;
if (z <= -8.8e+80) {
tmp = t_1;
} else if (z <= 3e-9) {
tmp = x_m / ((y - z) * t);
} else if (z <= 3.4e+131) {
tmp = -((x_m / z) / y);
} else {
tmp = t_1;
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x_m / (z * (t - z))
if (z <= (-8.8d+80)) then
tmp = t_1
else if (z <= 3d-9) then
tmp = x_m / ((y - z) * t)
else if (z <= 3.4d+131) then
tmp = -((x_m / z) / y)
else
tmp = t_1
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
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 (z <= -8.8e+80) {
tmp = t_1;
} else if (z <= 3e-9) {
tmp = x_m / ((y - z) * t);
} else if (z <= 3.4e+131) {
tmp = -((x_m / z) / y);
} else {
tmp = t_1;
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = x_m / (z * (t - z)) tmp = 0 if z <= -8.8e+80: tmp = t_1 elif z <= 3e-9: tmp = x_m / ((y - z) * t) elif z <= 3.4e+131: tmp = -((x_m / z) / y) else: tmp = t_1 return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(x_m / Float64(z * Float64(t - z))) tmp = 0.0 if (z <= -8.8e+80) tmp = t_1; elseif (z <= 3e-9) tmp = Float64(x_m / Float64(Float64(y - z) * t)); elseif (z <= 3.4e+131) tmp = Float64(-Float64(Float64(x_m / z) / y)); else tmp = t_1; end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = x_m / (z * (t - z)); tmp = 0.0; if (z <= -8.8e+80) tmp = t_1; elseif (z <= 3e-9) tmp = x_m / ((y - z) * t); elseif (z <= 3.4e+131) tmp = -((x_m / z) / y); else tmp = t_1; end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(x$95$m / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -8.8e+80], t$95$1, If[LessEqual[z, 3e-9], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e+131], (-N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision]), t$95$1]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{x_m}{z \cdot \left(t - z\right)}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-9}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+131}:\\
\;\;\;\;-\frac{\frac{x_m}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if z < -8.80000000000000011e80 or 3.39999999999999986e131 < z Initial program 81.6%
*-un-lft-identity81.6%
times-frac99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 80.3%
mul-1-neg80.3%
associate-/r*92.2%
distribute-neg-frac92.2%
distribute-neg-frac92.2%
Simplified92.2%
expm1-log1p-u91.0%
expm1-udef71.4%
associate-/l/71.4%
add-sqr-sqrt42.2%
sqrt-unprod67.2%
sqr-neg67.2%
sqrt-unprod28.2%
add-sqr-sqrt70.4%
*-commutative70.4%
Applied egg-rr70.4%
expm1-def70.1%
expm1-log1p70.1%
Simplified70.1%
if -8.80000000000000011e80 < z < 2.99999999999999998e-9Initial program 96.9%
Taylor expanded in t around inf 71.8%
if 2.99999999999999998e-9 < z < 3.39999999999999986e131Initial program 88.9%
Taylor expanded in y around inf 32.4%
*-commutative32.4%
associate-/r*45.9%
Simplified45.9%
Taylor expanded in t around 0 29.5%
associate-*r/29.5%
neg-mul-129.5%
Simplified29.5%
Final simplification65.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 -1.32e+112) (not (<= z 5.5e+136)))
(/ (/ (- x_m) z) (- t z))
(/ 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) {
double tmp;
if ((z <= -1.32e+112) || !(z <= 5.5e+136)) {
tmp = (-x_m / z) / (t - z);
} else {
tmp = x_m / ((y - z) * (t - z));
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.32d+112)) .or. (.not. (z <= 5.5d+136))) then
tmp = (-x_m / z) / (t - z)
else
tmp = x_m / ((y - z) * (t - z))
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((z <= -1.32e+112) || !(z <= 5.5e+136)) {
tmp = (-x_m / z) / (t - z);
} else {
tmp = x_m / ((y - z) * (t - z));
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (z <= -1.32e+112) or not (z <= 5.5e+136): tmp = (-x_m / z) / (t - z) else: tmp = x_m / ((y - z) * (t - z)) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((z <= -1.32e+112) || !(z <= 5.5e+136)) tmp = Float64(Float64(Float64(-x_m) / z) / Float64(t - z)); else tmp = Float64(x_m / Float64(Float64(y - z) * Float64(t - z))); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((z <= -1.32e+112) || ~((z <= 5.5e+136))) tmp = (-x_m / z) / (t - z); else tmp = x_m / ((y - z) * (t - z)); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -1.32e+112], N[Not[LessEqual[z, 5.5e+136]], $MachinePrecision]], N[(N[((-x$95$m) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.32 \cdot 10^{+112} \lor \neg \left(z \leq 5.5 \cdot 10^{+136}\right):\\
\;\;\;\;\frac{\frac{-x_m}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot \left(t - z\right)}\\
\end{array}
\end{array}
if z < -1.32e112 or 5.50000000000000039e136 < z Initial program 80.2%
*-un-lft-identity80.2%
times-frac99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 80.0%
mul-1-neg80.0%
associate-/r*92.9%
distribute-neg-frac92.9%
distribute-neg-frac92.9%
Simplified92.9%
if -1.32e112 < z < 5.50000000000000039e136Initial program 95.4%
Final simplification94.6%
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.45e+110)
(/ (/ (- x_m) z) (- t z))
(if (<= z 5.6e+123)
(/ x_m (* (- y z) (- t z)))
(/ (/ x_m (+ y z)) (+ 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.45e+110) {
tmp = (-x_m / z) / (t - z);
} else if (z <= 5.6e+123) {
tmp = x_m / ((y - z) * (t - z));
} else {
tmp = (x_m / (y + z)) / (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.45d+110)) then
tmp = (-x_m / z) / (t - z)
else if (z <= 5.6d+123) then
tmp = x_m / ((y - z) * (t - z))
else
tmp = (x_m / (y + z)) / (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.45e+110) {
tmp = (-x_m / z) / (t - z);
} else if (z <= 5.6e+123) {
tmp = x_m / ((y - z) * (t - z));
} else {
tmp = (x_m / (y + z)) / (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.45e+110: tmp = (-x_m / z) / (t - z) elif z <= 5.6e+123: tmp = x_m / ((y - z) * (t - z)) else: tmp = (x_m / (y + z)) / (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.45e+110) tmp = Float64(Float64(Float64(-x_m) / z) / Float64(t - z)); elseif (z <= 5.6e+123) tmp = Float64(x_m / Float64(Float64(y - z) * Float64(t - z))); else tmp = Float64(Float64(x_m / Float64(y + z)) / Float64(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.45e+110) tmp = (-x_m / z) / (t - z); elseif (z <= 5.6e+123) tmp = x_m / ((y - z) * (t - z)); else tmp = (x_m / (y + z)) / (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[z, -2.45e+110], N[(N[((-x$95$m) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e+123], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(y + z), $MachinePrecision]), $MachinePrecision] / N[(z + 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.45 \cdot 10^{+110}:\\
\;\;\;\;\frac{\frac{-x_m}{z}}{t - z}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+123}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{y + z}}{z + t}\\
\end{array}
\end{array}
if z < -2.45000000000000001e110Initial program 74.3%
*-un-lft-identity74.3%
times-frac99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 74.1%
mul-1-neg74.1%
associate-/r*89.7%
distribute-neg-frac89.7%
distribute-neg-frac89.7%
Simplified89.7%
if -2.45000000000000001e110 < z < 5.60000000000000023e123Initial program 96.4%
if 5.60000000000000023e123 < z Initial program 82.1%
add-sqr-sqrt29.5%
times-frac37.6%
Applied egg-rr37.6%
associate-*r/37.7%
associate-*l/37.7%
add-sqr-sqrt99.9%
sub-neg99.9%
add-sqr-sqrt0.0%
sqrt-unprod77.5%
sqr-neg77.5%
sqrt-unprod77.2%
add-sqr-sqrt77.2%
sub-neg77.2%
add-sqr-sqrt0.0%
sqrt-unprod84.0%
sqr-neg84.0%
sqrt-unprod95.0%
add-sqr-sqrt95.1%
Applied egg-rr95.1%
Final simplification95.2%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (<= y -7.5e-16)
(/ (/ x_m (- t z)) y)
(if (<= y 6.5e-88) (/ (- 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 <= -7.5e-16) {
tmp = (x_m / (t - z)) / y;
} else if (y <= 6.5e-88) {
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 <= (-7.5d-16)) then
tmp = (x_m / (t - z)) / y
else if (y <= 6.5d-88) 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 <= -7.5e-16) {
tmp = (x_m / (t - z)) / y;
} else if (y <= 6.5e-88) {
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 <= -7.5e-16: tmp = (x_m / (t - z)) / y elif y <= 6.5e-88: 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 <= -7.5e-16) tmp = Float64(Float64(x_m / Float64(t - z)) / y); elseif (y <= 6.5e-88) tmp = Float64(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 <= -7.5e-16) tmp = (x_m / (t - z)) / y; elseif (y <= 6.5e-88) 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, -7.5e-16], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 6.5e-88], 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 -7.5 \cdot 10^{-16}:\\
\;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-88}:\\
\;\;\;\;\frac{-x_m}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -7.5e-16Initial program 94.9%
Taylor expanded in y around inf 85.7%
*-commutative85.7%
associate-/r*85.9%
Simplified85.9%
if -7.5e-16 < y < 6.50000000000000006e-88Initial program 92.9%
Taylor expanded in y around 0 75.8%
associate-*r/75.8%
neg-mul-175.8%
Simplified75.8%
if 6.50000000000000006e-88 < y Initial program 85.4%
*-un-lft-identity85.4%
times-frac94.5%
Applied egg-rr94.5%
associate-*l/94.6%
*-un-lft-identity94.6%
Applied egg-rr94.6%
Taylor expanded in t around inf 47.0%
associate-/r*51.0%
Simplified51.0%
Final simplification69.6%
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 -2.25e-15)
(/ (/ x_m (- t z)) y)
(if (<= y 2.2e-165) (/ (/ (- 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.25e-15) {
tmp = (x_m / (t - z)) / y;
} else if (y <= 2.2e-165) {
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.25d-15)) then
tmp = (x_m / (t - z)) / y
else if (y <= 2.2d-165) 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.25e-15) {
tmp = (x_m / (t - z)) / y;
} else if (y <= 2.2e-165) {
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.25e-15: tmp = (x_m / (t - z)) / y elif y <= 2.2e-165: 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.25e-15) tmp = Float64(Float64(x_m / Float64(t - z)) / y); elseif (y <= 2.2e-165) tmp = Float64(Float64(Float64(-x_m) / 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.25e-15) tmp = (x_m / (t - z)) / y; elseif (y <= 2.2e-165) 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.25e-15], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 2.2e-165], N[(N[((-x$95$m) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{-15}:\\
\;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-165}:\\
\;\;\;\;\frac{\frac{-x_m}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -2.2499999999999999e-15Initial program 94.9%
Taylor expanded in y around inf 85.7%
*-commutative85.7%
associate-/r*85.9%
Simplified85.9%
if -2.2499999999999999e-15 < y < 2.1999999999999999e-165Initial program 92.8%
*-un-lft-identity92.8%
times-frac95.5%
Applied egg-rr95.5%
Taylor expanded in y around 0 76.0%
mul-1-neg76.0%
associate-/r*79.8%
distribute-neg-frac79.8%
distribute-neg-frac79.8%
Simplified79.8%
if 2.1999999999999999e-165 < y Initial program 86.6%
*-un-lft-identity86.6%
times-frac95.3%
Applied egg-rr95.3%
associate-*l/95.3%
*-un-lft-identity95.3%
Applied egg-rr95.3%
Taylor expanded in t around inf 47.9%
associate-/r*52.2%
Simplified52.2%
Final simplification70.1%
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 -6.2e-37)
(/ (/ x_m t) y)
(if (<= t 1.25e-145) (* (/ -1.0 y) (/ x_m 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 <= -6.2e-37) {
tmp = (x_m / t) / y;
} else if (t <= 1.25e-145) {
tmp = (-1.0 / y) * (x_m / 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 <= (-6.2d-37)) then
tmp = (x_m / t) / y
else if (t <= 1.25d-145) then
tmp = ((-1.0d0) / y) * (x_m / 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 <= -6.2e-37) {
tmp = (x_m / t) / y;
} else if (t <= 1.25e-145) {
tmp = (-1.0 / y) * (x_m / 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 <= -6.2e-37: tmp = (x_m / t) / y elif t <= 1.25e-145: tmp = (-1.0 / y) * (x_m / 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 <= -6.2e-37) tmp = Float64(Float64(x_m / t) / y); elseif (t <= 1.25e-145) tmp = Float64(Float64(-1.0 / y) * Float64(x_m / 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 <= -6.2e-37) tmp = (x_m / t) / y; elseif (t <= 1.25e-145) tmp = (-1.0 / y) * (x_m / 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, -6.2e-37], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.25e-145], N[(N[(-1.0 / y), $MachinePrecision] * N[(x$95$m / 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 -6.2 \cdot 10^{-37}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-145}:\\
\;\;\;\;\frac{-1}{y} \cdot \frac{x_m}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -6.19999999999999987e-37Initial program 88.4%
Taylor expanded in y around inf 56.3%
*-commutative56.3%
associate-/r*58.0%
Simplified58.0%
Taylor expanded in t around inf 56.2%
if -6.19999999999999987e-37 < t < 1.2499999999999999e-145Initial program 94.1%
Taylor expanded in y around inf 58.1%
*-commutative58.1%
associate-/r*61.9%
Simplified61.9%
expm1-log1p-u50.6%
expm1-udef36.6%
associate-/l/38.4%
sub-neg38.4%
add-sqr-sqrt15.0%
sqrt-unprod39.7%
sqr-neg39.7%
sqrt-unprod21.0%
add-sqr-sqrt34.7%
Applied egg-rr34.7%
expm1-def33.5%
expm1-log1p38.2%
associate-/r*37.4%
Simplified37.4%
Taylor expanded in t around 0 23.3%
*-commutative23.3%
Simplified23.3%
*-commutative23.3%
add-sqr-sqrt9.2%
sqrt-unprod31.8%
sqr-neg31.8%
sqrt-unprod23.6%
add-sqr-sqrt43.5%
neg-mul-143.5%
times-frac47.4%
Applied egg-rr47.4%
if 1.2499999999999999e-145 < t Initial program 88.8%
Taylor expanded in t around inf 67.6%
Final simplification56.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 (<= y -1.25e-140) (not (<= y 2.6e-27)))
(/ (/ x_m t) y)
(/ (- x_m) (* 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.25e-140) || !(y <= 2.6e-27)) {
tmp = (x_m / t) / y;
} else {
tmp = -x_m / (z * t);
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
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.25d-140)) .or. (.not. (y <= 2.6d-27))) then
tmp = (x_m / t) / y
else
tmp = -x_m / (z * t)
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((y <= -1.25e-140) || !(y <= 2.6e-27)) {
tmp = (x_m / t) / y;
} else {
tmp = -x_m / (z * t);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (y <= -1.25e-140) or not (y <= 2.6e-27): tmp = (x_m / t) / y else: tmp = -x_m / (z * t) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((y <= -1.25e-140) || !(y <= 2.6e-27)) tmp = Float64(Float64(x_m / t) / y); else tmp = Float64(Float64(-x_m) / Float64(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.25e-140) || ~((y <= 2.6e-27))) tmp = (x_m / t) / y; else tmp = -x_m / (z * t); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[y, -1.25e-140], N[Not[LessEqual[y, 2.6e-27]], $MachinePrecision]], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], N[((-x$95$m) / N[(z * t), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{-140} \lor \neg \left(y \leq 2.6 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\
\end{array}
\end{array}
if y < -1.25000000000000004e-140 or 2.60000000000000017e-27 < y Initial program 90.2%
Taylor expanded in y around inf 69.8%
*-commutative69.8%
associate-/r*73.5%
Simplified73.5%
Taylor expanded in t around inf 47.9%
if -1.25000000000000004e-140 < y < 2.60000000000000017e-27Initial program 91.8%
*-un-lft-identity91.8%
times-frac95.6%
Applied egg-rr95.6%
Taylor expanded in y around 0 72.2%
mul-1-neg72.2%
associate-/r*77.1%
distribute-neg-frac77.1%
distribute-neg-frac77.1%
Simplified77.1%
Taylor expanded in z around 0 43.9%
associate-*r/43.9%
neg-mul-143.9%
Simplified43.9%
Final simplification46.5%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -8e+80) (not (<= z 1.3e-11)))
(- (/ (/ x_m z) y))
(/ (/ 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 <= -8e+80) || !(z <= 1.3e-11)) {
tmp = -((x_m / z) / y);
} 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 <= (-8d+80)) .or. (.not. (z <= 1.3d-11))) then
tmp = -((x_m / z) / y)
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 <= -8e+80) || !(z <= 1.3e-11)) {
tmp = -((x_m / z) / y);
} 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 <= -8e+80) or not (z <= 1.3e-11): tmp = -((x_m / z) / y) 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 <= -8e+80) || !(z <= 1.3e-11)) tmp = Float64(-Float64(Float64(x_m / z) / y)); 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 <= -8e+80) || ~((z <= 1.3e-11))) tmp = -((x_m / z) / y); 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, -8e+80], N[Not[LessEqual[z, 1.3e-11]], $MachinePrecision]], (-N[(N[(x$95$m / z), $MachinePrecision] / y), $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 -8 \cdot 10^{+80} \lor \neg \left(z \leq 1.3 \cdot 10^{-11}\right):\\
\;\;\;\;-\frac{\frac{x_m}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
if z < -8e80 or 1.3e-11 < z Initial program 83.7%
Taylor expanded in y around inf 38.2%
*-commutative38.2%
associate-/r*52.3%
Simplified52.3%
Taylor expanded in t around 0 46.6%
associate-*r/46.6%
neg-mul-146.6%
Simplified46.6%
if -8e80 < z < 1.3e-11Initial program 96.9%
Taylor expanded in y around inf 71.2%
*-commutative71.2%
associate-/r*69.5%
Simplified69.5%
Taylor expanded in t around inf 56.3%
Final simplification51.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 (<= z -9e+80) (not (<= z 0.04))) (/ 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 <= -9e+80) || !(z <= 0.04)) {
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 <= (-9d+80)) .or. (.not. (z <= 0.04d0))) 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 <= -9e+80) || !(z <= 0.04)) {
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 <= -9e+80) or not (z <= 0.04): 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 <= -9e+80) || !(z <= 0.04)) 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 <= -9e+80) || ~((z <= 0.04))) 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, -9e+80], N[Not[LessEqual[z, 0.04]], $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 -9 \cdot 10^{+80} \lor \neg \left(z \leq 0.04\right):\\
\;\;\;\;\frac{x_m}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x_m}{y \cdot t}\\
\end{array}
\end{array}
if z < -9.00000000000000013e80 or 0.0400000000000000008 < z Initial program 83.3%
Taylor expanded in y around inf 38.3%
*-commutative38.3%
associate-/r*52.7%
Simplified52.7%
expm1-log1p-u52.5%
expm1-udef54.9%
associate-/l/54.9%
sub-neg54.9%
add-sqr-sqrt20.8%
sqrt-unprod60.2%
sqr-neg60.2%
sqrt-unprod33.9%
add-sqr-sqrt54.7%
Applied egg-rr54.7%
expm1-def36.2%
expm1-log1p36.5%
associate-/r*38.4%
Simplified38.4%
Taylor expanded in t around 0 34.8%
*-commutative34.8%
Simplified34.8%
if -9.00000000000000013e80 < z < 0.0400000000000000008Initial program 97.0%
Taylor expanded in z around 0 54.9%
Final simplification45.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 (<= z -9.5e+80) (not (<= z 1.76e+105)))
(/ (/ x_m z) y)
(/ (/ 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 <= -9.5e+80) || !(z <= 1.76e+105)) {
tmp = (x_m / z) / y;
} 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 <= (-9.5d+80)) .or. (.not. (z <= 1.76d+105))) then
tmp = (x_m / z) / y
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 <= -9.5e+80) || !(z <= 1.76e+105)) {
tmp = (x_m / z) / y;
} 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 <= -9.5e+80) or not (z <= 1.76e+105): tmp = (x_m / z) / y 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 <= -9.5e+80) || !(z <= 1.76e+105)) tmp = Float64(Float64(x_m / z) / y); 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 <= -9.5e+80) || ~((z <= 1.76e+105))) tmp = (x_m / z) / y; 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, -9.5e+80], N[Not[LessEqual[z, 1.76e+105]], $MachinePrecision]], N[(N[(x$95$m / z), $MachinePrecision] / y), $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 -9.5 \cdot 10^{+80} \lor \neg \left(z \leq 1.76 \cdot 10^{+105}\right):\\
\;\;\;\;\frac{\frac{x_m}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
if z < -9.499999999999999e80 or 1.76e105 < z Initial program 81.4%
Taylor expanded in y around inf 40.7%
*-commutative40.7%
associate-/r*55.5%
Simplified55.5%
expm1-log1p-u54.3%
expm1-udef68.2%
sub-neg68.2%
add-sqr-sqrt29.0%
sqrt-unprod68.1%
sqr-neg68.1%
sqrt-unprod38.9%
add-sqr-sqrt68.1%
Applied egg-rr68.1%
expm1-def50.4%
expm1-log1p50.7%
Simplified50.7%
Taylor expanded in t around 0 47.5%
if -9.499999999999999e80 < z < 1.76e105Initial program 96.1%
Taylor expanded in y around inf 64.5%
*-commutative64.5%
associate-/r*64.9%
Simplified64.9%
Taylor expanded in t around inf 51.6%
Final simplification50.1%
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.5e-109) (/ 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.5e-109) {
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.5d-109)) 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.5e-109) {
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.5e-109: 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.5e-109) 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.5e-109) 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.5e-109], 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.5 \cdot 10^{-109}:\\
\;\;\;\;\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.50000000000000011e-109Initial program 96.3%
Taylor expanded in y around inf 71.3%
*-commutative71.3%
Simplified71.3%
if -1.50000000000000011e-109 < y Initial program 88.1%
Taylor expanded in t around inf 53.1%
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 (<= y -6.5e-112) (/ x_m (* y (- 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 <= -6.5e-112) {
tmp = x_m / (y * (t - z));
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
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.5d-112)) then
tmp = x_m / (y * (t - z))
else
tmp = (x_m / t) / (y - z)
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -6.5e-112) {
tmp = x_m / (y * (t - z));
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -6.5e-112: tmp = x_m / (y * (t - z)) else: tmp = (x_m / t) / (y - z) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -6.5e-112) tmp = Float64(x_m / Float64(y * Float64(t - z))); else tmp = Float64(Float64(x_m / t) / Float64(y - z)); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -6.5e-112) tmp = x_m / (y * (t - z)); else tmp = (x_m / t) / (y - z); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -6.5e-112], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{-112}:\\
\;\;\;\;\frac{x_m}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -6.49999999999999956e-112Initial program 96.3%
Taylor expanded in y around inf 70.6%
*-commutative70.6%
Simplified70.6%
if -6.49999999999999956e-112 < y Initial program 88.0%
*-un-lft-identity88.0%
times-frac95.3%
Applied egg-rr95.3%
associate-*l/95.4%
*-un-lft-identity95.4%
Applied egg-rr95.4%
Taylor expanded in t around inf 53.4%
associate-/r*56.6%
Simplified56.6%
Final simplification61.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 (<= y -5.5e-112) (/ (/ x_m y) (- 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 <= -5.5e-112) {
tmp = (x_m / y) / (t - z);
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.5d-112)) then
tmp = (x_m / y) / (t - z)
else
tmp = (x_m / t) / (y - z)
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -5.5e-112) {
tmp = (x_m / y) / (t - z);
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -5.5e-112: tmp = (x_m / y) / (t - z) else: tmp = (x_m / t) / (y - z) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -5.5e-112) tmp = Float64(Float64(x_m / y) / Float64(t - z)); else tmp = Float64(Float64(x_m / t) / Float64(y - z)); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -5.5e-112) tmp = (x_m / y) / (t - z); else tmp = (x_m / t) / (y - z); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -5.5e-112], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-112}:\\
\;\;\;\;\frac{\frac{x_m}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -5.5e-112Initial program 96.3%
add-sqr-sqrt53.3%
times-frac54.4%
Applied egg-rr54.4%
Taylor expanded in y around inf 70.6%
associate-/r*69.0%
Simplified69.0%
if -5.5e-112 < y Initial program 88.0%
*-un-lft-identity88.0%
times-frac95.3%
Applied egg-rr95.3%
associate-*l/95.4%
*-un-lft-identity95.4%
Applied egg-rr95.4%
Taylor expanded in t around inf 53.4%
associate-/r*56.6%
Simplified56.6%
Final simplification60.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 -7.8e-171) (/ (/ x_m (- t z)) y) (/ (/ 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 <= -7.8e-171) {
tmp = (x_m / (t - z)) / y;
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
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 <= (-7.8d-171)) then
tmp = (x_m / (t - z)) / y
else
tmp = (x_m / t) / (y - z)
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -7.8e-171) {
tmp = (x_m / (t - z)) / y;
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -7.8e-171: tmp = (x_m / (t - z)) / y else: tmp = (x_m / t) / (y - z) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -7.8e-171) tmp = Float64(Float64(x_m / Float64(t - z)) / y); else tmp = Float64(Float64(x_m / t) / Float64(y - z)); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -7.8e-171) tmp = (x_m / (t - z)) / y; else tmp = (x_m / t) / (y - z); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -7.8e-171], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{-171}:\\
\;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -7.7999999999999997e-171Initial program 96.8%
Taylor expanded in y around inf 64.8%
*-commutative64.8%
associate-/r*70.4%
Simplified70.4%
if -7.7999999999999997e-171 < y Initial program 87.0%
*-un-lft-identity87.0%
times-frac95.0%
Applied egg-rr95.0%
associate-*l/95.1%
*-un-lft-identity95.1%
Applied egg-rr95.1%
Taylor expanded in t around inf 51.4%
associate-/r*54.9%
Simplified54.9%
Final simplification60.9%
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 (- 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 90.8%
*-un-lft-identity90.8%
times-frac96.3%
Applied egg-rr96.3%
associate-*l/96.4%
*-un-lft-identity96.4%
Applied egg-rr96.4%
Final simplification96.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 (<= z -1.05e+81) (/ 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 <= -1.05e+81) {
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 <= (-1.05d+81)) 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 <= -1.05e+81) {
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 <= -1.05e+81: 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 <= -1.05e+81) 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 <= -1.05e+81) 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[LessEqual[z, -1.05e+81], 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 -1.05 \cdot 10^{+81}:\\
\;\;\;\;\frac{x_m}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
if z < -1.0499999999999999e81Initial program 78.0%
Taylor expanded in y around inf 35.7%
*-commutative35.7%
associate-/r*49.1%
Simplified49.1%
expm1-log1p-u49.1%
expm1-udef57.5%
associate-/l/57.5%
sub-neg57.5%
add-sqr-sqrt57.5%
sqrt-unprod64.3%
sqr-neg64.3%
sqrt-unprod0.0%
add-sqr-sqrt57.4%
Applied egg-rr57.4%
expm1-def33.7%
expm1-log1p34.0%
associate-/r*32.3%
Simplified32.3%
Taylor expanded in t around 0 33.8%
*-commutative33.8%
Simplified33.8%
if -1.0499999999999999e81 < z Initial program 93.3%
Taylor expanded in y around inf 59.8%
*-commutative59.8%
associate-/r*63.9%
Simplified63.9%
Taylor expanded in t around inf 45.9%
Final simplification44.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 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 90.8%
Taylor expanded in z around 0 38.1%
Final simplification38.1%
(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 2023321
(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))))