
(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 89.7%
add-sqr-sqrt41.7%
times-frac46.6%
Applied egg-rr46.6%
Final simplification46.6%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* (- y z) (- t z))))
(*
x_s
(if (<= t_1 (- INFINITY))
(/ (/ x_m y) (- t z))
(if (<= t_1 1e+294) (/ x_m t_1) (/ (/ -1.0 z) (/ (- t z) x_m)))))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x_m / y) / (t - z);
} else if (t_1 <= 1e+294) {
tmp = x_m / t_1;
} else {
tmp = (-1.0 / z) / ((t - z) / x_m);
}
return x_s * tmp;
}
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x_m / y) / (t - z);
} else if (t_1 <= 1e+294) {
tmp = x_m / t_1;
} else {
tmp = (-1.0 / z) / ((t - z) / x_m);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if t_1 <= -math.inf: tmp = (x_m / y) / (t - z) elif t_1 <= 1e+294: tmp = x_m / t_1 else: tmp = (-1.0 / z) / ((t - z) / x_m) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif (t_1 <= 1e+294) tmp = Float64(x_m / t_1); else tmp = Float64(Float64(-1.0 / z) / Float64(Float64(t - z) / x_m)); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if (t_1 <= -Inf) tmp = (x_m / y) / (t - z); elseif (t_1 <= 1e+294) tmp = x_m / t_1; else tmp = (-1.0 / z) / ((t - z) / x_m); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+294], N[(x$95$m / t$95$1), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{\frac{x_m}{y}}{t - z}\\
\mathbf{elif}\;t_1 \leq 10^{+294}:\\
\;\;\;\;\frac{x_m}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-1}{z}}{\frac{t - z}{x_m}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0Initial program 69.5%
add-sqr-sqrt38.6%
times-frac60.7%
Applied egg-rr60.7%
clear-num60.7%
un-div-inv60.7%
Applied egg-rr60.7%
Taylor expanded in y around inf 55.2%
associate-/r*79.6%
Simplified79.6%
if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 1.00000000000000007e294Initial program 98.5%
if 1.00000000000000007e294 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 76.5%
clear-num76.5%
associate-/r/76.5%
Applied egg-rr76.5%
Taylor expanded in y around 0 67.5%
associate-/r*67.8%
Simplified67.8%
associate-*l/85.3%
associate-/l*87.9%
Applied egg-rr87.9%
Final simplification93.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 (<= z -5.8e+123)
(/ (- (/ x_m z)) (- t z))
(if (<= z 5.2e+112)
(/ x_m (* (- y z) (- t z)))
(* (/ -1.0 (- t z)) (/ x_m 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 <= -5.8e+123) {
tmp = -(x_m / z) / (t - z);
} else if (z <= 5.2e+112) {
tmp = x_m / ((y - z) * (t - z));
} else {
tmp = (-1.0 / (t - z)) * (x_m / 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 <= (-5.8d+123)) then
tmp = -(x_m / z) / (t - z)
else if (z <= 5.2d+112) then
tmp = x_m / ((y - z) * (t - z))
else
tmp = ((-1.0d0) / (t - z)) * (x_m / 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 <= -5.8e+123) {
tmp = -(x_m / z) / (t - z);
} else if (z <= 5.2e+112) {
tmp = x_m / ((y - z) * (t - z));
} else {
tmp = (-1.0 / (t - z)) * (x_m / 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 <= -5.8e+123: tmp = -(x_m / z) / (t - z) elif z <= 5.2e+112: tmp = x_m / ((y - z) * (t - z)) else: tmp = (-1.0 / (t - z)) * (x_m / 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 <= -5.8e+123) tmp = Float64(Float64(-Float64(x_m / z)) / Float64(t - z)); elseif (z <= 5.2e+112) tmp = Float64(x_m / Float64(Float64(y - z) * Float64(t - z))); else tmp = Float64(Float64(-1.0 / Float64(t - z)) * Float64(x_m / 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 <= -5.8e+123) tmp = -(x_m / z) / (t - z); elseif (z <= 5.2e+112) tmp = x_m / ((y - z) * (t - z)); else tmp = (-1.0 / (t - z)) * (x_m / 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, -5.8e+123], N[((-N[(x$95$m / z), $MachinePrecision]) / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+112], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(x$95$m / 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 -5.8 \cdot 10^{+123}:\\
\;\;\;\;\frac{-\frac{x_m}{z}}{t - z}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+112}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{t - z} \cdot \frac{x_m}{z}\\
\end{array}
\end{array}
if z < -5.80000000000000019e123Initial program 76.6%
add-sqr-sqrt33.3%
times-frac41.7%
Applied egg-rr41.7%
Taylor expanded in y around 0 74.6%
mul-1-neg74.6%
associate-/r*93.6%
distribute-neg-frac93.6%
distribute-frac-neg93.6%
Simplified93.6%
if -5.80000000000000019e123 < z < 5.2000000000000001e112Initial program 94.3%
if 5.2000000000000001e112 < z Initial program 79.1%
add-sqr-sqrt48.9%
times-frac62.8%
Applied egg-rr62.8%
Taylor expanded in y around 0 79.1%
mul-1-neg79.1%
associate-/r*96.3%
distribute-neg-frac96.3%
distribute-frac-neg96.3%
Simplified96.3%
associate-/l/79.1%
neg-mul-179.1%
times-frac96.5%
Applied egg-rr96.5%
Final simplification94.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 (<= t -1.3e-85)
(/ (/ x_m y) t)
(if (<= t 2.4e-172)
(/ (- x_m) (* y z))
(if (<= t 5e+258) (/ (/ x_m t) y) (/ (/ x_m (- t)) z))))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= -1.3e-85) {
tmp = (x_m / y) / t;
} else if (t <= 2.4e-172) {
tmp = -x_m / (y * z);
} else if (t <= 5e+258) {
tmp = (x_m / t) / y;
} else {
tmp = (x_m / -t) / z;
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.3d-85)) then
tmp = (x_m / y) / t
else if (t <= 2.4d-172) then
tmp = -x_m / (y * z)
else if (t <= 5d+258) then
tmp = (x_m / t) / y
else
tmp = (x_m / -t) / z
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= -1.3e-85) {
tmp = (x_m / y) / t;
} else if (t <= 2.4e-172) {
tmp = -x_m / (y * z);
} else if (t <= 5e+258) {
tmp = (x_m / t) / y;
} else {
tmp = (x_m / -t) / z;
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if t <= -1.3e-85: tmp = (x_m / y) / t elif t <= 2.4e-172: tmp = -x_m / (y * z) elif t <= 5e+258: tmp = (x_m / t) / y else: tmp = (x_m / -t) / z return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (t <= -1.3e-85) tmp = Float64(Float64(x_m / y) / t); elseif (t <= 2.4e-172) tmp = Float64(Float64(-x_m) / Float64(y * z)); elseif (t <= 5e+258) tmp = Float64(Float64(x_m / t) / y); else tmp = Float64(Float64(x_m / 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 (t <= -1.3e-85) tmp = (x_m / y) / t; elseif (t <= 2.4e-172) tmp = -x_m / (y * z); elseif (t <= 5e+258) tmp = (x_m / t) / y; else tmp = (x_m / -t) / z; end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, -1.3e-85], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 2.4e-172], N[((-x$95$m) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+258], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(x$95$m / (-t)), $MachinePrecision] / z), $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.3 \cdot 10^{-85}:\\
\;\;\;\;\frac{\frac{x_m}{y}}{t}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-172}:\\
\;\;\;\;\frac{-x_m}{y \cdot z}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+258}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{-t}}{z}\\
\end{array}
\end{array}
if t < -1.30000000000000006e-85Initial program 89.0%
Taylor expanded in z around 0 49.6%
*-un-lft-identity49.6%
times-frac53.0%
Applied egg-rr53.0%
associate-*l/53.0%
*-un-lft-identity53.0%
Applied egg-rr53.0%
if -1.30000000000000006e-85 < t < 2.4000000000000001e-172Initial program 91.9%
Taylor expanded in y around inf 61.8%
*-commutative61.8%
associate-/r*60.5%
Simplified60.5%
Taylor expanded in t around 0 54.0%
associate-*r/54.0%
neg-mul-154.0%
*-commutative54.0%
Simplified54.0%
if 2.4000000000000001e-172 < t < 5e258Initial program 91.5%
Taylor expanded in y around inf 58.5%
*-commutative58.5%
associate-/r*64.1%
Simplified64.1%
Taylor expanded in t around inf 50.4%
if 5e258 < t Initial program 69.0%
add-sqr-sqrt43.6%
times-frac66.5%
Applied egg-rr66.5%
Taylor expanded in y around 0 45.4%
mul-1-neg45.4%
associate-/r*75.9%
distribute-neg-frac75.9%
distribute-frac-neg75.9%
Simplified75.9%
Taylor expanded in z around 0 45.4%
associate-/r*84.0%
associate-*r/84.0%
metadata-eval84.0%
times-frac84.0%
*-lft-identity84.0%
neg-mul-184.0%
Simplified84.0%
Final simplification53.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 (<= z -1.4e+164)
(/ (/ x_m (- t)) z)
(if (<= z -8.8e-55)
(/ (- (/ x_m z)) y)
(if (<= z 5.6e-35) (/ (/ 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 (z <= -1.4e+164) {
tmp = (x_m / -t) / z;
} else if (z <= -8.8e-55) {
tmp = -(x_m / z) / y;
} else if (z <= 5.6e-35) {
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 (z <= (-1.4d+164)) then
tmp = (x_m / -t) / z
else if (z <= (-8.8d-55)) then
tmp = -(x_m / z) / y
else if (z <= 5.6d-35) 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 (z <= -1.4e+164) {
tmp = (x_m / -t) / z;
} else if (z <= -8.8e-55) {
tmp = -(x_m / z) / y;
} else if (z <= 5.6e-35) {
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 z <= -1.4e+164: tmp = (x_m / -t) / z elif z <= -8.8e-55: tmp = -(x_m / z) / y elif z <= 5.6e-35: 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 (z <= -1.4e+164) tmp = Float64(Float64(x_m / Float64(-t)) / z); elseif (z <= -8.8e-55) tmp = Float64(Float64(-Float64(x_m / z)) / y); elseif (z <= 5.6e-35) 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 (z <= -1.4e+164) tmp = (x_m / -t) / z; elseif (z <= -8.8e-55) tmp = -(x_m / z) / y; elseif (z <= 5.6e-35) 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[LessEqual[z, -1.4e+164], N[(N[(x$95$m / (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -8.8e-55], N[((-N[(x$95$m / z), $MachinePrecision]) / y), $MachinePrecision], If[LessEqual[z, 5.6e-35], 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}\;z \leq -1.4 \cdot 10^{+164}:\\
\;\;\;\;\frac{\frac{x_m}{-t}}{z}\\
\mathbf{elif}\;z \leq -8.8 \cdot 10^{-55}:\\
\;\;\;\;\frac{-\frac{x_m}{z}}{y}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-35}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\
\end{array}
\end{array}
if z < -1.4000000000000001e164Initial program 69.9%
add-sqr-sqrt27.8%
times-frac39.8%
Applied egg-rr39.8%
Taylor expanded in y around 0 69.9%
mul-1-neg69.9%
associate-/r*93.9%
distribute-neg-frac93.9%
distribute-frac-neg93.9%
Simplified93.9%
Taylor expanded in z around 0 49.2%
associate-/r*55.0%
associate-*r/55.0%
metadata-eval55.0%
times-frac55.0%
*-lft-identity55.0%
neg-mul-155.0%
Simplified55.0%
if -1.4000000000000001e164 < z < -8.7999999999999998e-55Initial program 91.7%
Taylor expanded in y around inf 38.6%
*-commutative38.6%
associate-/r*51.6%
Simplified51.6%
Taylor expanded in t around 0 36.8%
associate-*r/36.8%
neg-mul-136.8%
Simplified36.8%
if -8.7999999999999998e-55 < z < 5.5999999999999999e-35Initial program 93.6%
Taylor expanded in y around inf 81.5%
*-commutative81.5%
associate-/r*84.0%
Simplified84.0%
Taylor expanded in t around inf 69.1%
if 5.5999999999999999e-35 < z Initial program 90.7%
Taylor expanded in z around 0 52.6%
distribute-lft-out52.6%
mul-1-neg52.6%
distribute-rgt-neg-in52.6%
unsub-neg52.6%
Simplified52.6%
Taylor expanded in y around 0 31.9%
associate-*r/31.9%
neg-mul-131.9%
Simplified31.9%
Final simplification51.7%
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 -8.5e-66)
(/ (/ x_m y) (- t z))
(if (<= y 1.55e-215) (/ (- 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 <= -8.5e-66) {
tmp = (x_m / y) / (t - z);
} else if (y <= 1.55e-215) {
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 <= (-8.5d-66)) then
tmp = (x_m / y) / (t - z)
else if (y <= 1.55d-215) 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 <= -8.5e-66) {
tmp = (x_m / y) / (t - z);
} else if (y <= 1.55e-215) {
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 <= -8.5e-66: tmp = (x_m / y) / (t - z) elif y <= 1.55e-215: 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 <= -8.5e-66) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif (y <= 1.55e-215) 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 <= -8.5e-66) tmp = (x_m / y) / (t - z); elseif (y <= 1.55e-215) 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, -8.5e-66], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-215], 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 -8.5 \cdot 10^{-66}:\\
\;\;\;\;\frac{\frac{x_m}{y}}{t - z}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-215}:\\
\;\;\;\;\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 < -8.49999999999999966e-66Initial program 91.3%
add-sqr-sqrt43.7%
times-frac47.6%
Applied egg-rr47.6%
clear-num47.6%
un-div-inv47.6%
Applied egg-rr47.6%
Taylor expanded in y around inf 85.8%
associate-/r*86.2%
Simplified86.2%
if -8.49999999999999966e-66 < y < 1.54999999999999997e-215Initial program 93.3%
Taylor expanded in y around 0 85.1%
associate-*r/85.1%
neg-mul-185.1%
Simplified85.1%
if 1.54999999999999997e-215 < y Initial program 86.6%
Taylor expanded in t around inf 52.6%
Final simplification70.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 -6.2e-66)
(/ (/ x_m y) (- t z))
(if (<= y 1.25e-217) (/ (- (/ 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 <= -6.2e-66) {
tmp = (x_m / y) / (t - z);
} else if (y <= 1.25e-217) {
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 <= (-6.2d-66)) then
tmp = (x_m / y) / (t - z)
else if (y <= 1.25d-217) 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 <= -6.2e-66) {
tmp = (x_m / y) / (t - z);
} else if (y <= 1.25e-217) {
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 <= -6.2e-66: tmp = (x_m / y) / (t - z) elif y <= 1.25e-217: 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 <= -6.2e-66) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif (y <= 1.25e-217) tmp = Float64(Float64(-Float64(x_m / 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 <= -6.2e-66) tmp = (x_m / y) / (t - z); elseif (y <= 1.25e-217) 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, -6.2e-66], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e-217], N[((-N[(x$95$m / z), $MachinePrecision]) / N[(t - 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}\;y \leq -6.2 \cdot 10^{-66}:\\
\;\;\;\;\frac{\frac{x_m}{y}}{t - z}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-217}:\\
\;\;\;\;\frac{-\frac{x_m}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -6.1999999999999995e-66Initial program 91.3%
add-sqr-sqrt43.7%
times-frac47.6%
Applied egg-rr47.6%
clear-num47.6%
un-div-inv47.6%
Applied egg-rr47.6%
Taylor expanded in y around inf 85.8%
associate-/r*86.2%
Simplified86.2%
if -6.1999999999999995e-66 < y < 1.2500000000000001e-217Initial program 93.3%
add-sqr-sqrt47.8%
times-frac50.4%
Applied egg-rr50.4%
Taylor expanded in y around 0 85.1%
mul-1-neg85.1%
associate-/r*89.9%
distribute-neg-frac89.9%
distribute-frac-neg89.9%
Simplified89.9%
if 1.2500000000000001e-217 < y Initial program 86.6%
Taylor expanded in t around inf 52.6%
Final simplification72.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 -5e-139)
(/ (/ x_m y) (- t z))
(if (<= t 5.4e+26) (/ (- (/ 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 <= -5e-139) {
tmp = (x_m / y) / (t - z);
} else if (t <= 5.4e+26) {
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 <= (-5d-139)) then
tmp = (x_m / y) / (t - z)
else if (t <= 5.4d+26) 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 <= -5e-139) {
tmp = (x_m / y) / (t - z);
} else if (t <= 5.4e+26) {
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 <= -5e-139: tmp = (x_m / y) / (t - z) elif t <= 5.4e+26: 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 <= -5e-139) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif (t <= 5.4e+26) 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 <= -5e-139) tmp = (x_m / y) / (t - z); elseif (t <= 5.4e+26) 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, -5e-139], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e+26], 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 -5 \cdot 10^{-139}:\\
\;\;\;\;\frac{\frac{x_m}{y}}{t - z}\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+26}:\\
\;\;\;\;\frac{-\frac{x_m}{z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -5.00000000000000034e-139Initial program 88.5%
add-sqr-sqrt43.0%
times-frac48.2%
Applied egg-rr48.2%
clear-num48.1%
un-div-inv48.2%
Applied egg-rr48.2%
Taylor expanded in y around inf 58.8%
associate-/r*63.7%
Simplified63.7%
if -5.00000000000000034e-139 < t < 5.4e26Initial program 91.6%
add-sqr-sqrt39.5%
times-frac42.3%
Applied egg-rr42.3%
Taylor expanded in t around 0 72.3%
mul-1-neg72.3%
associate-/r*77.5%
distribute-neg-frac77.5%
distribute-frac-neg77.5%
Simplified77.5%
if 5.4e26 < t Initial program 88.5%
Taylor expanded in t around inf 82.7%
Final simplification73.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 (<= t -6.5e-83)
(/ (/ x_m y) t)
(if (<= t 4.2e-150) (/ (- x_m) (* y z)) (/ x_m (* (- y z) t))))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= -6.5e-83) {
tmp = (x_m / y) / t;
} else if (t <= 4.2e-150) {
tmp = -x_m / (y * z);
} else {
tmp = x_m / ((y - z) * t);
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-6.5d-83)) then
tmp = (x_m / y) / t
else if (t <= 4.2d-150) then
tmp = -x_m / (y * z)
else
tmp = x_m / ((y - z) * t)
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= -6.5e-83) {
tmp = (x_m / y) / t;
} else if (t <= 4.2e-150) {
tmp = -x_m / (y * z);
} else {
tmp = x_m / ((y - z) * t);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if t <= -6.5e-83: tmp = (x_m / y) / t elif t <= 4.2e-150: tmp = -x_m / (y * z) else: tmp = x_m / ((y - z) * t) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (t <= -6.5e-83) tmp = Float64(Float64(x_m / y) / t); elseif (t <= 4.2e-150) tmp = Float64(Float64(-x_m) / 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 <= -6.5e-83) tmp = (x_m / y) / t; elseif (t <= 4.2e-150) tmp = -x_m / (y * z); else tmp = x_m / ((y - z) * t); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, -6.5e-83], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 4.2e-150], N[((-x$95$m) / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-83}:\\
\;\;\;\;\frac{\frac{x_m}{y}}{t}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-150}:\\
\;\;\;\;\frac{-x_m}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -6.5e-83Initial program 89.0%
Taylor expanded in z around 0 49.6%
*-un-lft-identity49.6%
times-frac53.0%
Applied egg-rr53.0%
associate-*l/53.0%
*-un-lft-identity53.0%
Applied egg-rr53.0%
if -6.5e-83 < t < 4.2000000000000002e-150Initial program 92.6%
Taylor expanded in y around inf 64.0%
*-commutative64.0%
associate-/r*62.8%
Simplified62.8%
Taylor expanded in t around 0 52.4%
associate-*r/52.4%
neg-mul-152.4%
*-commutative52.4%
Simplified52.4%
if 4.2000000000000002e-150 < t Initial program 88.0%
Taylor expanded in t around inf 69.7%
Final simplification58.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 -2.2e-43) (not (<= z 6e-35)))
(/ (- 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 <= -2.2e-43) || !(z <= 6e-35)) {
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 <= (-2.2d-43)) .or. (.not. (z <= 6d-35))) 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 <= -2.2e-43) || !(z <= 6e-35)) {
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 <= -2.2e-43) or not (z <= 6e-35): 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 <= -2.2e-43) || !(z <= 6e-35)) 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 <= -2.2e-43) || ~((z <= 6e-35))) 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, -2.2e-43], N[Not[LessEqual[z, 6e-35]], $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 -2.2 \cdot 10^{-43} \lor \neg \left(z \leq 6 \cdot 10^{-35}\right):\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
if z < -2.19999999999999997e-43 or 5.99999999999999978e-35 < z Initial program 86.5%
Taylor expanded in z around 0 56.9%
distribute-lft-out56.9%
mul-1-neg56.9%
distribute-rgt-neg-in56.9%
unsub-neg56.9%
Simplified56.9%
Taylor expanded in y around 0 36.7%
associate-*r/36.7%
neg-mul-136.7%
Simplified36.7%
if -2.19999999999999997e-43 < z < 5.99999999999999978e-35Initial program 93.7%
Taylor expanded in y around inf 81.2%
*-commutative81.2%
associate-/r*83.5%
Simplified83.5%
Taylor expanded in t around inf 69.0%
Final simplification51.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 -1.1e-82)
(/ (/ x_m y) t)
(if (<= t 2.4e-172) (/ (- 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 (t <= -1.1e-82) {
tmp = (x_m / y) / t;
} else if (t <= 2.4e-172) {
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 (t <= (-1.1d-82)) then
tmp = (x_m / y) / t
else if (t <= 2.4d-172) 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 (t <= -1.1e-82) {
tmp = (x_m / y) / t;
} else if (t <= 2.4e-172) {
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 t <= -1.1e-82: tmp = (x_m / y) / t elif t <= 2.4e-172: 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 (t <= -1.1e-82) tmp = Float64(Float64(x_m / y) / t); elseif (t <= 2.4e-172) tmp = Float64(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 (t <= -1.1e-82) tmp = (x_m / y) / t; elseif (t <= 2.4e-172) 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[t, -1.1e-82], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 2.4e-172], 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}\;t \leq -1.1 \cdot 10^{-82}:\\
\;\;\;\;\frac{\frac{x_m}{y}}{t}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-172}:\\
\;\;\;\;\frac{-x_m}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
if t < -1.09999999999999993e-82Initial program 89.0%
Taylor expanded in z around 0 49.6%
*-un-lft-identity49.6%
times-frac53.0%
Applied egg-rr53.0%
associate-*l/53.0%
*-un-lft-identity53.0%
Applied egg-rr53.0%
if -1.09999999999999993e-82 < t < 2.4000000000000001e-172Initial program 91.9%
Taylor expanded in y around inf 61.8%
*-commutative61.8%
associate-/r*60.5%
Simplified60.5%
Taylor expanded in t around 0 54.0%
associate-*r/54.0%
neg-mul-154.0%
*-commutative54.0%
Simplified54.0%
if 2.4000000000000001e-172 < t Initial program 88.8%
Taylor expanded in y around inf 56.7%
*-commutative56.7%
associate-/r*61.7%
Simplified61.7%
Taylor expanded in t around inf 49.6%
Final simplification51.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 -3.6e+16) (not (<= z 8.8e+90)))
(/ 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 <= -3.6e+16) || !(z <= 8.8e+90)) {
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 <= (-3.6d+16)) .or. (.not. (z <= 8.8d+90))) 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 <= -3.6e+16) || !(z <= 8.8e+90)) {
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 <= -3.6e+16) or not (z <= 8.8e+90): 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 <= -3.6e+16) || !(z <= 8.8e+90)) 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 <= -3.6e+16) || ~((z <= 8.8e+90))) 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, -3.6e+16], N[Not[LessEqual[z, 8.8e+90]], $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 -3.6 \cdot 10^{+16} \lor \neg \left(z \leq 8.8 \cdot 10^{+90}\right):\\
\;\;\;\;\frac{x_m}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x_m}{y \cdot t}\\
\end{array}
\end{array}
if z < -3.6e16 or 8.79999999999999961e90 < z Initial program 81.3%
Taylor expanded in y around inf 39.0%
*-commutative39.0%
associate-/r*47.9%
Simplified47.9%
Taylor expanded in t around 0 42.3%
associate-*r/42.3%
neg-mul-142.3%
Simplified42.3%
expm1-log1p-u41.9%
expm1-udef53.3%
associate-/l/53.3%
add-sqr-sqrt28.3%
sqrt-unprod49.1%
sqr-neg49.1%
sqrt-unprod25.2%
add-sqr-sqrt53.4%
Applied egg-rr53.4%
expm1-def35.1%
expm1-log1p35.5%
*-commutative35.5%
Simplified35.5%
if -3.6e16 < z < 8.79999999999999961e90Initial program 95.3%
Taylor expanded in z around 0 52.7%
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 -8.2e+105) (not (<= z 8.2e+90)))
(/ 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 <= -8.2e+105) || !(z <= 8.2e+90)) {
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 <= (-8.2d+105)) .or. (.not. (z <= 8.2d+90))) 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 <= -8.2e+105) || !(z <= 8.2e+90)) {
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 <= -8.2e+105) or not (z <= 8.2e+90): 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 <= -8.2e+105) || !(z <= 8.2e+90)) 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 <= -8.2e+105) || ~((z <= 8.2e+90))) 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, -8.2e+105], N[Not[LessEqual[z, 8.2e+90]], $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 -8.2 \cdot 10^{+105} \lor \neg \left(z \leq 8.2 \cdot 10^{+90}\right):\\
\;\;\;\;\frac{x_m}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\
\end{array}
\end{array}
if z < -8.2000000000000005e105 or 8.20000000000000083e90 < z Initial program 79.2%
Taylor expanded in y around inf 40.8%
*-commutative40.8%
associate-/r*48.2%
Simplified48.2%
Taylor expanded in t around 0 46.9%
associate-*r/46.9%
neg-mul-146.9%
Simplified46.9%
expm1-log1p-u46.5%
expm1-udef62.4%
associate-/l/62.4%
add-sqr-sqrt30.7%
sqrt-unprod57.0%
sqr-neg57.0%
sqrt-unprod31.8%
add-sqr-sqrt62.5%
Applied egg-rr62.5%
expm1-def39.7%
expm1-log1p39.9%
*-commutative39.9%
Simplified39.9%
if -8.2000000000000005e105 < z < 8.20000000000000083e90Initial program 94.5%
Taylor expanded in y around inf 66.2%
*-commutative66.2%
associate-/r*69.5%
Simplified69.5%
Taylor expanded in t around inf 51.8%
Final simplification48.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 5.2e-150) (/ 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 <= 5.2e-150) {
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 <= 5.2d-150) 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 <= 5.2e-150) {
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 <= 5.2e-150: 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 <= 5.2e-150) 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 <= 5.2e-150) 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, 5.2e-150], 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 5.2 \cdot 10^{-150}:\\
\;\;\;\;\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 < 5.1999999999999995e-150Initial program 90.7%
Taylor expanded in y around inf 60.4%
*-commutative60.4%
Simplified60.4%
if 5.1999999999999995e-150 < t Initial program 88.0%
Taylor expanded in t around inf 69.7%
Final simplification63.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 5.2e-150) (/ (/ 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 <= 5.2e-150) {
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 <= 5.2d-150) 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 <= 5.2e-150) {
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 <= 5.2e-150: 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 <= 5.2e-150) tmp = Float64(Float64(x_m / 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 <= 5.2e-150) 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, 5.2e-150], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - 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 5.2 \cdot 10^{-150}:\\
\;\;\;\;\frac{\frac{x_m}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 5.1999999999999995e-150Initial program 90.7%
add-sqr-sqrt41.1%
times-frac45.4%
Applied egg-rr45.4%
clear-num45.4%
un-div-inv45.4%
Applied egg-rr45.4%
Taylor expanded in y around inf 60.4%
associate-/r*61.1%
Simplified61.1%
if 5.1999999999999995e-150 < t Initial program 88.0%
Taylor expanded in t around inf 69.7%
Final simplification64.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 (<= t 8e-103) (/ (/ x_m (- t z)) y) (/ 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 <= 8e-103) {
tmp = (x_m / (t - z)) / y;
} 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 <= 8d-103) then
tmp = (x_m / (t - z)) / y
else
tmp = x_m / ((y - z) * t)
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= 8e-103) {
tmp = (x_m / (t - z)) / y;
} else {
tmp = x_m / ((y - z) * t);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if t <= 8e-103: tmp = (x_m / (t - z)) / y 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 <= 8e-103) tmp = Float64(Float64(x_m / Float64(t - z)) / y); else tmp = Float64(x_m / Float64(Float64(y - z) * t)); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (t <= 8e-103) tmp = (x_m / (t - z)) / y; else tmp = x_m / ((y - z) * t); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, 8e-103], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq 8 \cdot 10^{-103}:\\
\;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 7.99999999999999966e-103Initial program 90.2%
Taylor expanded in y around inf 60.1%
*-commutative60.1%
associate-/r*64.2%
Simplified64.2%
if 7.99999999999999966e-103 < t Initial program 88.7%
Taylor expanded in t around inf 74.8%
Final simplification67.6%
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 89.7%
add-sqr-sqrt41.7%
times-frac46.6%
Applied egg-rr46.6%
frac-times41.7%
add-sqr-sqrt89.7%
*-commutative89.7%
associate-/r*97.8%
Applied egg-rr97.8%
Final simplification97.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 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 89.7%
add-sqr-sqrt41.7%
times-frac46.6%
Applied egg-rr46.6%
associate-*r/46.3%
associate-*l/46.2%
add-sqr-sqrt97.1%
Applied egg-rr97.1%
Final simplification97.1%
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 89.7%
Taylor expanded in z around 0 39.1%
Final simplification39.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 2024010
(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))))