
(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 87.9%
add-sqr-sqrt47.4%
times-frac52.5%
Applied egg-rr52.5%
Final simplification52.5%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* (- y z) (- t z))))
(*
x_s
(if (<= t_1 -4e+277)
(/ (/ x_m (- t z)) y)
(if (<= t_1 5e+298) (/ x_m t_1) (/ (/ (- x_m) (- y z)) z))))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= -4e+277) {
tmp = (x_m / (t - z)) / y;
} else if (t_1 <= 5e+298) {
tmp = x_m / t_1;
} else {
tmp = (-x_m / (y - z)) / z;
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t - z)
if (t_1 <= (-4d+277)) then
tmp = (x_m / (t - z)) / y
else if (t_1 <= 5d+298) then
tmp = x_m / t_1
else
tmp = (-x_m / (y - z)) / z
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= -4e+277) {
tmp = (x_m / (t - z)) / y;
} else if (t_1 <= 5e+298) {
tmp = x_m / t_1;
} else {
tmp = (-x_m / (y - z)) / z;
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if t_1 <= -4e+277: tmp = (x_m / (t - z)) / y elif t_1 <= 5e+298: tmp = x_m / t_1 else: tmp = (-x_m / (y - z)) / z return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (t_1 <= -4e+277) tmp = Float64(Float64(x_m / Float64(t - z)) / y); elseif (t_1 <= 5e+298) tmp = Float64(x_m / t_1); else tmp = Float64(Float64(Float64(-x_m) / Float64(y - z)) / z); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if (t_1 <= -4e+277) tmp = (x_m / (t - z)) / y; elseif (t_1 <= 5e+298) tmp = x_m / t_1; else tmp = (-x_m / (y - z)) / z; end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, -4e+277], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 5e+298], N[(x$95$m / t$95$1), $MachinePrecision], N[(N[((-x$95$m) / N[(y - z), $MachinePrecision]), $MachinePrecision] / z), $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 -4 \cdot 10^{+277}:\\
\;\;\;\;\frac{\frac{x\_m}{t - z}}{y}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;\frac{x\_m}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-x\_m}{y - z}}{z}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -4.00000000000000001e277Initial program 71.6%
Taylor expanded in y around inf 56.0%
*-commutative56.0%
associate-/r*90.4%
Simplified90.4%
if -4.00000000000000001e277 < (*.f64 (-.f64 y z) (-.f64 t z)) < 5.0000000000000003e298Initial program 98.4%
if 5.0000000000000003e298 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 76.0%
add-sqr-sqrt45.1%
times-frac56.5%
Applied egg-rr56.5%
frac-times45.1%
add-sqr-sqrt76.0%
*-rgt-identity76.0%
frac-times99.9%
clear-num99.8%
frac-times99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in t around 0 66.9%
mul-1-neg66.9%
associate-/l/85.9%
distribute-neg-frac85.9%
Simplified85.9%
Final simplification93.3%
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 -4e+277)
(/ (/ x_m (- t z)) y)
(if (<= t_1 2e+293) (/ x_m t_1) (/ (/ -1.0 z) (/ (- y 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 <= -4e+277) {
tmp = (x_m / (t - z)) / y;
} else if (t_1 <= 2e+293) {
tmp = x_m / t_1;
} else {
tmp = (-1.0 / z) / ((y - z) / x_m);
}
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 = (y - z) * (t - z)
if (t_1 <= (-4d+277)) then
tmp = (x_m / (t - z)) / y
else if (t_1 <= 2d+293) then
tmp = x_m / t_1
else
tmp = ((-1.0d0) / z) / ((y - z) / x_m)
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 = (y - z) * (t - z);
double tmp;
if (t_1 <= -4e+277) {
tmp = (x_m / (t - z)) / y;
} else if (t_1 <= 2e+293) {
tmp = x_m / t_1;
} else {
tmp = (-1.0 / z) / ((y - 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 <= -4e+277: tmp = (x_m / (t - z)) / y elif t_1 <= 2e+293: tmp = x_m / t_1 else: tmp = (-1.0 / z) / ((y - 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 <= -4e+277) tmp = Float64(Float64(x_m / Float64(t - z)) / y); elseif (t_1 <= 2e+293) tmp = Float64(x_m / t_1); else tmp = Float64(Float64(-1.0 / z) / Float64(Float64(y - 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 <= -4e+277) tmp = (x_m / (t - z)) / y; elseif (t_1 <= 2e+293) tmp = x_m / t_1; else tmp = (-1.0 / z) / ((y - 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, -4e+277], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 2e+293], N[(x$95$m / t$95$1), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] / N[(N[(y - 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 -4 \cdot 10^{+277}:\\
\;\;\;\;\frac{\frac{x\_m}{t - z}}{y}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+293}:\\
\;\;\;\;\frac{x\_m}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-1}{z}}{\frac{y - z}{x\_m}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -4.00000000000000001e277Initial program 71.6%
Taylor expanded in y around inf 56.0%
*-commutative56.0%
associate-/r*90.4%
Simplified90.4%
if -4.00000000000000001e277 < (*.f64 (-.f64 y z) (-.f64 t z)) < 1.9999999999999998e293Initial program 98.3%
if 1.9999999999999998e293 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 76.6%
add-sqr-sqrt45.2%
times-frac56.3%
Applied egg-rr56.3%
*-commutative56.3%
frac-times45.2%
add-sqr-sqrt76.6%
*-un-lft-identity76.6%
frac-times99.9%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 85.2%
Final simplification93.0%
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 (* y z))))
(*
x_s
(if (<= z -1.6e+63)
t_1
(if (<= z -1.15e-301)
(/ (/ x_m y) t)
(if (<= z 2.15e+108) (/ (/ x_m t) 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 / (y * z);
double tmp;
if (z <= -1.6e+63) {
tmp = t_1;
} else if (z <= -1.15e-301) {
tmp = (x_m / y) / t;
} else if (z <= 2.15e+108) {
tmp = (x_m / t) / 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 / (y * z)
if (z <= (-1.6d+63)) then
tmp = t_1
else if (z <= (-1.15d-301)) then
tmp = (x_m / y) / t
else if (z <= 2.15d+108) then
tmp = (x_m / t) / y
else
tmp = t_1
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = x_m / (y * z);
double tmp;
if (z <= -1.6e+63) {
tmp = t_1;
} else if (z <= -1.15e-301) {
tmp = (x_m / y) / t;
} else if (z <= 2.15e+108) {
tmp = (x_m / t) / y;
} else {
tmp = t_1;
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = x_m / (y * z) tmp = 0 if z <= -1.6e+63: tmp = t_1 elif z <= -1.15e-301: tmp = (x_m / y) / t elif z <= 2.15e+108: tmp = (x_m / t) / 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(y * z)) tmp = 0.0 if (z <= -1.6e+63) tmp = t_1; elseif (z <= -1.15e-301) tmp = Float64(Float64(x_m / y) / t); elseif (z <= 2.15e+108) tmp = Float64(Float64(x_m / t) / y); else tmp = t_1; end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = x_m / (y * z); tmp = 0.0; if (z <= -1.6e+63) tmp = t_1; elseif (z <= -1.15e-301) tmp = (x_m / y) / t; elseif (z <= 2.15e+108) tmp = (x_m / t) / y; else tmp = t_1; end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(x$95$m / N[(y * z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.6e+63], t$95$1, If[LessEqual[z, -1.15e-301], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 2.15e+108], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{x\_m}{y \cdot z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-301}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+108}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if z < -1.60000000000000006e63 or 2.14999999999999998e108 < z Initial program 82.6%
Taylor expanded in y around inf 40.4%
*-commutative40.4%
associate-/r*54.1%
Simplified54.1%
Taylor expanded in t around 0 51.1%
associate-*r/51.1%
neg-mul-151.1%
Simplified51.1%
expm1-log1p-u50.9%
expm1-udef62.7%
associate-/l/62.7%
add-sqr-sqrt26.6%
sqrt-unprod58.3%
sqr-neg58.3%
sqrt-unprod35.8%
add-sqr-sqrt62.5%
Applied egg-rr62.5%
expm1-def37.0%
expm1-log1p37.5%
*-commutative37.5%
Simplified37.5%
if -1.60000000000000006e63 < z < -1.1500000000000001e-301Initial program 91.8%
Taylor expanded in z around 0 57.7%
associate-/r*65.6%
div-inv65.6%
Applied egg-rr65.6%
associate-*l/69.1%
un-div-inv69.2%
Applied egg-rr69.2%
if -1.1500000000000001e-301 < z < 2.14999999999999998e108Initial program 91.1%
add-sqr-sqrt42.6%
times-frac45.8%
Applied egg-rr45.8%
*-commutative45.8%
frac-times42.6%
add-sqr-sqrt91.1%
*-un-lft-identity91.1%
frac-times96.3%
clear-num96.2%
un-div-inv97.0%
Applied egg-rr97.0%
Taylor expanded in z around 0 42.7%
associate-/r*49.2%
Simplified49.2%
Final simplification49.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 (/ (/ x_m z) y)))
(*
x_s
(if (<= z -3e+62)
t_1
(if (<= z -5.6e-301)
(/ (/ x_m y) t)
(if (<= z 6.2e+27) (/ (/ x_m t) 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) / y;
double tmp;
if (z <= -3e+62) {
tmp = t_1;
} else if (z <= -5.6e-301) {
tmp = (x_m / y) / t;
} else if (z <= 6.2e+27) {
tmp = (x_m / t) / 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) / y
if (z <= (-3d+62)) then
tmp = t_1
else if (z <= (-5.6d-301)) then
tmp = (x_m / y) / t
else if (z <= 6.2d+27) then
tmp = (x_m / t) / y
else
tmp = t_1
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (x_m / z) / y;
double tmp;
if (z <= -3e+62) {
tmp = t_1;
} else if (z <= -5.6e-301) {
tmp = (x_m / y) / t;
} else if (z <= 6.2e+27) {
tmp = (x_m / t) / y;
} else {
tmp = t_1;
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = (x_m / z) / y tmp = 0 if z <= -3e+62: tmp = t_1 elif z <= -5.6e-301: tmp = (x_m / y) / t elif z <= 6.2e+27: tmp = (x_m / t) / 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(Float64(x_m / z) / y) tmp = 0.0 if (z <= -3e+62) tmp = t_1; elseif (z <= -5.6e-301) tmp = Float64(Float64(x_m / y) / t); elseif (z <= 6.2e+27) tmp = Float64(Float64(x_m / t) / y); else tmp = t_1; end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = (x_m / z) / y; tmp = 0.0; if (z <= -3e+62) tmp = t_1; elseif (z <= -5.6e-301) tmp = (x_m / y) / t; elseif (z <= 6.2e+27) tmp = (x_m / t) / y; else tmp = t_1; end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m / z), $MachinePrecision] / y), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -3e+62], t$95$1, If[LessEqual[z, -5.6e-301], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 6.2e+27], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{\frac{x\_m}{z}}{y}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-301}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+27}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if z < -3e62 or 6.19999999999999992e27 < z Initial program 83.9%
Taylor expanded in y around inf 38.5%
*-commutative38.5%
associate-/r*54.5%
Simplified54.5%
Taylor expanded in t around 0 49.6%
associate-*r/49.6%
neg-mul-149.6%
Simplified49.6%
expm1-log1p-u48.6%
expm1-udef59.0%
associate-/l/59.0%
add-sqr-sqrt26.5%
sqrt-unprod55.4%
sqr-neg55.4%
sqrt-unprod32.3%
add-sqr-sqrt58.8%
Applied egg-rr58.8%
expm1-def33.2%
expm1-log1p33.7%
*-lft-identity33.7%
times-frac43.7%
associate-*l/43.7%
*-lft-identity43.7%
Simplified43.7%
if -3e62 < z < -5.6000000000000002e-301Initial program 91.8%
Taylor expanded in z around 0 57.7%
associate-/r*65.6%
div-inv65.6%
Applied egg-rr65.6%
associate-*l/69.1%
un-div-inv69.2%
Applied egg-rr69.2%
if -5.6000000000000002e-301 < z < 6.19999999999999992e27Initial program 91.3%
add-sqr-sqrt46.3%
times-frac49.0%
Applied egg-rr49.0%
*-commutative49.0%
frac-times46.3%
add-sqr-sqrt91.3%
*-un-lft-identity91.3%
frac-times95.3%
clear-num95.1%
un-div-inv96.1%
Applied egg-rr96.1%
Taylor expanded in z around 0 51.2%
associate-/r*56.9%
Simplified56.9%
Final simplification53.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-54)
(/ (/ x_m y) (- t z))
(if (<= y 7e-207) (/ (- 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 <= -8.5e-54) {
tmp = (x_m / y) / (t - z);
} else if (y <= 7e-207) {
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 <= (-8.5d-54)) then
tmp = (x_m / y) / (t - z)
else if (y <= 7d-207) 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 <= -8.5e-54) {
tmp = (x_m / y) / (t - z);
} else if (y <= 7e-207) {
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 <= -8.5e-54: tmp = (x_m / y) / (t - z) elif y <= 7e-207: 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 <= -8.5e-54) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif (y <= 7e-207) 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 <= -8.5e-54) tmp = (x_m / y) / (t - z); elseif (y <= 7e-207) 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, -8.5e-54], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e-207], 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 -8.5 \cdot 10^{-54}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-207}:\\
\;\;\;\;\frac{-x\_m}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -8.5e-54Initial program 82.2%
add-sqr-sqrt41.8%
times-frac49.7%
Applied egg-rr49.7%
Taylor expanded in x around 0 82.2%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in y around inf 82.2%
if -8.5e-54 < y < 7.0000000000000003e-207Initial program 90.4%
Taylor expanded in y around 0 71.5%
associate-*r/71.5%
neg-mul-171.5%
Simplified71.5%
if 7.0000000000000003e-207 < y Initial program 89.7%
add-sqr-sqrt53.0%
times-frac59.2%
Applied egg-rr59.2%
Taylor expanded in t around inf 57.9%
associate-/r*63.6%
Simplified63.6%
Final simplification71.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 -4.4e-67)
(/ (/ x_m y) (- t z))
(if (<= t 30000000000.0)
(/ (/ (- x_m) (- y z)) 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 (t <= -4.4e-67) {
tmp = (x_m / y) / (t - z);
} else if (t <= 30000000000.0) {
tmp = (-x_m / (y - z)) / 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 (t <= (-4.4d-67)) then
tmp = (x_m / y) / (t - z)
else if (t <= 30000000000.0d0) then
tmp = (-x_m / (y - z)) / 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 (t <= -4.4e-67) {
tmp = (x_m / y) / (t - z);
} else if (t <= 30000000000.0) {
tmp = (-x_m / (y - z)) / 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 t <= -4.4e-67: tmp = (x_m / y) / (t - z) elif t <= 30000000000.0: tmp = (-x_m / (y - z)) / 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 (t <= -4.4e-67) tmp = Float64(Float64(x_m / y) / Float64(t - z)); elseif (t <= 30000000000.0) tmp = Float64(Float64(Float64(-x_m) / Float64(y - z)) / 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 (t <= -4.4e-67) tmp = (x_m / y) / (t - z); elseif (t <= 30000000000.0) tmp = (-x_m / (y - z)) / 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[t, -4.4e-67], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 30000000000.0], N[(N[((-x$95$m) / N[(y - z), $MachinePrecision]), $MachinePrecision] / z), $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}\;t \leq -4.4 \cdot 10^{-67}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\
\mathbf{elif}\;t \leq 30000000000:\\
\;\;\;\;\frac{\frac{-x\_m}{y - z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if t < -4.4000000000000002e-67Initial program 87.3%
add-sqr-sqrt48.2%
times-frac56.3%
Applied egg-rr56.3%
Taylor expanded in x around 0 87.3%
associate-/l/97.8%
Simplified97.8%
Taylor expanded in y around inf 62.8%
if -4.4000000000000002e-67 < t < 3e10Initial program 90.3%
add-sqr-sqrt48.2%
times-frac51.8%
Applied egg-rr51.8%
frac-times48.2%
add-sqr-sqrt90.3%
*-rgt-identity90.3%
frac-times98.7%
clear-num98.7%
frac-times98.3%
metadata-eval98.3%
Applied egg-rr98.3%
Taylor expanded in t around 0 76.6%
mul-1-neg76.6%
associate-/l/85.6%
distribute-neg-frac85.6%
Simplified85.6%
if 3e10 < t Initial program 84.9%
add-sqr-sqrt45.0%
times-frac48.2%
Applied egg-rr48.2%
Taylor expanded in t around inf 76.5%
associate-/r*85.6%
Simplified85.6%
Final simplification77.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 -5.2e-70)
(/ (/ x_m y) t)
(if (<= t 1.75e-84) (/ (/ (- x_m) 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 <= -5.2e-70) {
tmp = (x_m / y) / t;
} else if (t <= 1.75e-84) {
tmp = (-x_m / z) / y;
} else {
tmp = x_m / ((y - z) * t);
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
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-70)) then
tmp = (x_m / y) / t
else if (t <= 1.75d-84) then
tmp = (-x_m / z) / y
else
tmp = x_m / ((y - z) * t)
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= -5.2e-70) {
tmp = (x_m / y) / t;
} else if (t <= 1.75e-84) {
tmp = (-x_m / z) / y;
} else {
tmp = x_m / ((y - z) * t);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if t <= -5.2e-70: tmp = (x_m / y) / t elif t <= 1.75e-84: tmp = (-x_m / z) / y else: tmp = x_m / ((y - z) * t) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (t <= -5.2e-70) tmp = Float64(Float64(x_m / y) / t); elseif (t <= 1.75e-84) tmp = Float64(Float64(Float64(-x_m) / 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 <= -5.2e-70) tmp = (x_m / y) / t; elseif (t <= 1.75e-84) tmp = (-x_m / z) / y; else tmp = x_m / ((y - z) * t); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, -5.2e-70], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 1.75e-84], N[(N[((-x$95$m) / z), $MachinePrecision] / y), $MachinePrecision], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{-70}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t}\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-84}:\\
\;\;\;\;\frac{\frac{-x\_m}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -5.20000000000000004e-70Initial program 87.5%
Taylor expanded in z around 0 52.8%
associate-/r*62.2%
div-inv62.1%
Applied egg-rr62.1%
associate-*l/54.1%
un-div-inv54.1%
Applied egg-rr54.1%
if -5.20000000000000004e-70 < t < 1.7500000000000001e-84Initial program 92.4%
Taylor expanded in y around inf 54.1%
*-commutative54.1%
associate-/r*57.9%
Simplified57.9%
Taylor expanded in t around 0 52.2%
associate-*r/52.2%
neg-mul-152.2%
Simplified52.2%
if 1.7500000000000001e-84 < t Initial program 84.3%
Taylor expanded in t around inf 69.2%
Final simplification58.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 (or (<= z -3.3e-25) (not (<= z 2.4e-14)))
(/ (/ (- 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 <= -3.3e-25) || !(z <= 2.4e-14)) {
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 <= (-3.3d-25)) .or. (.not. (z <= 2.4d-14))) 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 <= -3.3e-25) || !(z <= 2.4e-14)) {
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 <= -3.3e-25) or not (z <= 2.4e-14): 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 <= -3.3e-25) || !(z <= 2.4e-14)) 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 <= -3.3e-25) || ~((z <= 2.4e-14))) 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, -3.3e-25], N[Not[LessEqual[z, 2.4e-14]], $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 -3.3 \cdot 10^{-25} \lor \neg \left(z \leq 2.4 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{\frac{-x\_m}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\end{array}
\end{array}
if z < -3.2999999999999998e-25 or 2.4e-14 < z Initial program 84.9%
Taylor expanded in y around inf 40.1%
*-commutative40.1%
associate-/r*56.3%
Simplified56.3%
Taylor expanded in t around 0 48.9%
associate-*r/48.9%
neg-mul-148.9%
Simplified48.9%
if -3.2999999999999998e-25 < z < 2.4e-14Initial program 91.7%
add-sqr-sqrt49.7%
times-frac51.5%
Applied egg-rr51.5%
*-commutative51.5%
frac-times49.7%
add-sqr-sqrt91.7%
*-un-lft-identity91.7%
frac-times95.3%
clear-num95.2%
un-div-inv95.8%
Applied egg-rr95.8%
Taylor expanded in z around 0 60.8%
associate-/r*65.5%
Simplified65.5%
Final simplification56.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 (or (<= z -5.4e-15) (not (<= z 6.5e+108)))
(/ 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 <= -5.4e-15) || !(z <= 6.5e+108)) {
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 <= (-5.4d-15)) .or. (.not. (z <= 6.5d+108))) 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 <= -5.4e-15) || !(z <= 6.5e+108)) {
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 <= -5.4e-15) or not (z <= 6.5e+108): 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 <= -5.4e-15) || !(z <= 6.5e+108)) 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 <= -5.4e-15) || ~((z <= 6.5e+108))) 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, -5.4e-15], N[Not[LessEqual[z, 6.5e+108]], $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 -5.4 \cdot 10^{-15} \lor \neg \left(z \leq 6.5 \cdot 10^{+108}\right):\\
\;\;\;\;\frac{x\_m}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{y \cdot t}\\
\end{array}
\end{array}
if z < -5.40000000000000018e-15 or 6.4999999999999996e108 < z Initial program 83.1%
Taylor expanded in y around inf 41.8%
*-commutative41.8%
associate-/r*57.0%
Simplified57.0%
Taylor expanded in t around 0 50.3%
associate-*r/50.3%
neg-mul-150.3%
Simplified50.3%
expm1-log1p-u50.1%
expm1-udef60.5%
associate-/l/60.5%
add-sqr-sqrt26.1%
sqrt-unprod56.8%
sqr-neg56.8%
sqrt-unprod34.4%
add-sqr-sqrt60.5%
Applied egg-rr60.5%
expm1-def35.6%
expm1-log1p35.9%
*-commutative35.9%
Simplified35.9%
if -5.40000000000000018e-15 < z < 6.4999999999999996e108Initial program 91.9%
Taylor expanded in z around 0 51.9%
Final simplification44.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 (or (<= z -4e+63) (not (<= z 1.25e+109)))
(/ 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 <= -4e+63) || !(z <= 1.25e+109)) {
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 <= (-4d+63)) .or. (.not. (z <= 1.25d+109))) 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 <= -4e+63) || !(z <= 1.25e+109)) {
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 <= -4e+63) or not (z <= 1.25e+109): 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 <= -4e+63) || !(z <= 1.25e+109)) 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 <= -4e+63) || ~((z <= 1.25e+109))) 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, -4e+63], N[Not[LessEqual[z, 1.25e+109]], $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 -4 \cdot 10^{+63} \lor \neg \left(z \leq 1.25 \cdot 10^{+109}\right):\\
\;\;\;\;\frac{x\_m}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
\end{array}
\end{array}
if z < -4.00000000000000023e63 or 1.25e109 < z Initial program 82.6%
Taylor expanded in y around inf 40.4%
*-commutative40.4%
associate-/r*54.1%
Simplified54.1%
Taylor expanded in t around 0 51.1%
associate-*r/51.1%
neg-mul-151.1%
Simplified51.1%
expm1-log1p-u50.9%
expm1-udef62.7%
associate-/l/62.7%
add-sqr-sqrt26.6%
sqrt-unprod58.3%
sqr-neg58.3%
sqrt-unprod35.8%
add-sqr-sqrt62.5%
Applied egg-rr62.5%
expm1-def37.0%
expm1-log1p37.5%
*-commutative37.5%
Simplified37.5%
if -4.00000000000000023e63 < z < 1.25e109Initial program 91.4%
add-sqr-sqrt47.0%
times-frac50.1%
Applied egg-rr50.1%
*-commutative50.1%
frac-times47.0%
add-sqr-sqrt91.4%
*-un-lft-identity91.4%
frac-times96.5%
clear-num96.4%
un-div-inv96.8%
Applied egg-rr96.8%
Taylor expanded in z around 0 49.2%
associate-/r*56.3%
Simplified56.3%
Final simplification48.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 -9.2e-76) (/ 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 <= -9.2e-76) {
tmp = x_m / (y * (t - z));
} else {
tmp = x_m / ((y - z) * t);
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-9.2d-76)) then
tmp = x_m / (y * (t - z))
else
tmp = x_m / ((y - z) * t)
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -9.2e-76) {
tmp = x_m / (y * (t - z));
} else {
tmp = x_m / ((y - z) * t);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -9.2e-76: tmp = x_m / (y * (t - z)) else: tmp = x_m / ((y - z) * t) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -9.2e-76) tmp = Float64(x_m / Float64(y * Float64(t - z))); else tmp = Float64(x_m / Float64(Float64(y - z) * t)); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -9.2e-76) tmp = x_m / (y * (t - z)); else tmp = x_m / ((y - z) * t); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -9.2e-76], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-76}:\\
\;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -9.20000000000000025e-76Initial program 83.2%
Taylor expanded in y around inf 75.5%
*-commutative75.5%
Simplified75.5%
if -9.20000000000000025e-76 < y Initial program 89.8%
Taylor expanded in t around inf 58.2%
Final simplification63.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 17000000000.0) (/ 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 (t <= 17000000000.0) {
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 (t <= 17000000000.0d0) 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 (t <= 17000000000.0) {
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 t <= 17000000000.0: 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 (t <= 17000000000.0) 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 (t <= 17000000000.0) 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[t, 17000000000.0], 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}\;t \leq 17000000000:\\
\;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if t < 1.7e10Initial program 88.8%
Taylor expanded in y around inf 56.1%
*-commutative56.1%
Simplified56.1%
if 1.7e10 < t Initial program 84.9%
add-sqr-sqrt45.0%
times-frac48.2%
Applied egg-rr48.2%
Taylor expanded in t around inf 76.5%
associate-/r*85.6%
Simplified85.6%
Final simplification63.5%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (if (<= y -4.7e-79) (/ (/ 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 <= -4.7e-79) {
tmp = (x_m / y) / (t - z);
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
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 <= (-4.7d-79)) then
tmp = (x_m / y) / (t - z)
else
tmp = (x_m / t) / (y - z)
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (y <= -4.7e-79) {
tmp = (x_m / y) / (t - z);
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if y <= -4.7e-79: tmp = (x_m / y) / (t - z) else: tmp = (x_m / t) / (y - z) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (y <= -4.7e-79) tmp = Float64(Float64(x_m / y) / Float64(t - z)); else tmp = Float64(Float64(x_m / t) / Float64(y - z)); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (y <= -4.7e-79) tmp = (x_m / y) / (t - z); else tmp = (x_m / t) / (y - z); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -4.7e-79], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{-79}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if y < -4.7000000000000002e-79Initial program 83.2%
add-sqr-sqrt43.6%
times-frac51.0%
Applied egg-rr51.0%
Taylor expanded in x around 0 83.2%
associate-/l/98.6%
Simplified98.6%
Taylor expanded in y around inf 80.6%
if -4.7000000000000002e-79 < y Initial program 89.8%
add-sqr-sqrt48.9%
times-frac53.1%
Applied egg-rr53.1%
Taylor expanded in t around inf 58.2%
associate-/r*61.9%
Simplified61.9%
Final simplification67.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 (<= t 5.8e+30) (/ (/ 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 (t <= 5.8e+30) {
tmp = (x_m / (t - z)) / y;
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
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.8d+30) then
tmp = (x_m / (t - z)) / y
else
tmp = (x_m / t) / (y - z)
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if (t <= 5.8e+30) {
tmp = (x_m / (t - z)) / y;
} else {
tmp = (x_m / t) / (y - z);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if t <= 5.8e+30: tmp = (x_m / (t - z)) / y else: tmp = (x_m / t) / (y - z) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if (t <= 5.8e+30) tmp = Float64(Float64(x_m / Float64(t - z)) / y); else tmp = Float64(Float64(x_m / t) / Float64(y - z)); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if (t <= 5.8e+30) tmp = (x_m / (t - z)) / y; else tmp = (x_m / t) / (y - z); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, 5.8e+30], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq 5.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{\frac{x\_m}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
\end{array}
\end{array}
if t < 5.7999999999999996e30Initial program 89.0%
Taylor expanded in y around inf 55.8%
*-commutative55.8%
associate-/r*64.8%
Simplified64.8%
if 5.7999999999999996e30 < t Initial program 84.2%
add-sqr-sqrt44.0%
times-frac47.3%
Applied egg-rr47.3%
Taylor expanded in t around inf 75.4%
associate-/r*84.9%
Simplified84.9%
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 (* (/ 1.0 (- y z)) (/ 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 * ((1.0 / (y - z)) * (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 * ((1.0d0 / (y - z)) * (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 * ((1.0 / (y - z)) * (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 * ((1.0 / (y - z)) * (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(1.0 / Float64(y - z)) * Float64(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 * ((1.0 / (y - z)) * (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[(1.0 / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(x$95$m / 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{1}{y - z} \cdot \frac{x\_m}{t - z}\right)
\end{array}
Initial program 87.9%
*-un-lft-identity87.9%
times-frac97.6%
Applied egg-rr97.6%
Final simplification97.6%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (/ (/ 1.0 (- t z)) (/ (- y 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) {
return x_s * ((1.0 / (t - z)) / ((y - z) / x_m));
}
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 * ((1.0d0 / (t - z)) / ((y - z) / x_m))
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 * ((1.0 / (t - z)) / ((y - z) / x_m));
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): return x_s * ((1.0 / (t - z)) / ((y - z) / x_m))
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(1.0 / Float64(t - z)) / Float64(Float64(y - z) / x_m))) 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 * ((1.0 / (t - z)) / ((y - z) / x_m)); 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[(1.0 / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(N[(y - z), $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \frac{\frac{1}{t - z}}{\frac{y - z}{x\_m}}
\end{array}
Initial program 87.9%
add-sqr-sqrt47.4%
times-frac52.5%
Applied egg-rr52.5%
*-commutative52.5%
frac-times47.4%
add-sqr-sqrt87.9%
*-un-lft-identity87.9%
frac-times97.9%
clear-num97.7%
un-div-inv98.0%
Applied egg-rr98.0%
Final simplification98.0%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (/ (/ x_m (- y z)) (- t z))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
return x_s * ((x_m / (y - z)) / (t - z));
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x_s * ((x_m / (y - z)) / (t - z))
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
return x_s * ((x_m / (y - z)) / (t - z));
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): return x_s * ((x_m / (y - z)) / (t - z))
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) return Float64(x_s * Float64(Float64(x_m / Float64(y - z)) / Float64(t - z))) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y, z, t) tmp = x_s * ((x_m / (y - z)) / (t - z)); end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * N[(N[(x$95$m / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \frac{\frac{x\_m}{y - z}}{t - z}
\end{array}
Initial program 87.9%
add-sqr-sqrt47.4%
times-frac52.5%
Applied egg-rr52.5%
Taylor expanded in x around 0 87.9%
associate-/l/98.0%
Simplified98.0%
Final simplification98.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 87.9%
Taylor expanded in z around 0 36.4%
Final simplification36.4%
(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 2024031
(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))))