
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
double code(double x, double y, double z, double t) {
return 1.0 - (x / ((y - z) * (y - t)));
}
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 = 1.0d0 - (x / ((y - z) * (y - t)))
end function
public static double code(double x, double y, double z, double t) {
return 1.0 - (x / ((y - z) * (y - t)));
}
def code(x, y, z, t): return 1.0 - (x / ((y - z) * (y - t)))
function code(x, y, z, t) return Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t)))) end
function tmp = code(x, y, z, t) tmp = 1.0 - (x / ((y - z) * (y - t))); end
code[x_, y_, z_, t_] := N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
double code(double x, double y, double z, double t) {
return 1.0 - (x / ((y - z) * (y - t)));
}
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 = 1.0d0 - (x / ((y - z) * (y - t)))
end function
public static double code(double x, double y, double z, double t) {
return 1.0 - (x / ((y - z) * (y - t)));
}
def code(x, y, z, t): return 1.0 - (x / ((y - z) * (y - t)))
function code(x, y, z, t) return Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t)))) end
function tmp = code(x, y, z, t) tmp = 1.0 - (x / ((y - z) * (y - t))); end
code[x_, y_, z_, t_] := N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (- 1.0 (pow (* (- z y) (/ (- t y) x)) -1.0)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0 - pow(((z - y) * ((t - y) / x)), -1.0);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 = 1.0d0 - (((z - y) * ((t - y) / x)) ** (-1.0d0))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return 1.0 - Math.pow(((z - y) * ((t - y) / x)), -1.0);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0 - math.pow(((z - y) * ((t - y) / x)), -1.0)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(1.0 - (Float64(Float64(z - y) * Float64(Float64(t - y) / x)) ^ -1.0)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 - (((z - y) * ((t - y) / x)) ^ -1.0);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(1.0 - N[Power[N[(N[(z - y), $MachinePrecision] * N[(N[(t - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 - {\left(\left(z - y\right) \cdot \frac{t - y}{x}\right)}^{-1}
\end{array}
Initial program 98.3%
clear-num98.3%
inv-pow98.3%
associate-/l*97.8%
Applied egg-rr97.8%
Final simplification97.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -9.2e-39)
(+ 1.0 (* x (/ (/ -1.0 t) z)))
(if (<= t 9.8e-51)
(- 1.0 (/ x (* y (- y z))))
(if (<= t 1.75e-25)
(/ x (* (- y z) t))
(if (<= t 0.048)
(/ (- z (/ x t)) z)
(if (<= t 1.45e+31)
(+ 1.0 (/ x (* y (- t y))))
(if (<= t 2.4e+65) (- 1.0 (/ x (* z t))) 1.0)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -9.2e-39) {
tmp = 1.0 + (x * ((-1.0 / t) / z));
} else if (t <= 9.8e-51) {
tmp = 1.0 - (x / (y * (y - z)));
} else if (t <= 1.75e-25) {
tmp = x / ((y - z) * t);
} else if (t <= 0.048) {
tmp = (z - (x / t)) / z;
} else if (t <= 1.45e+31) {
tmp = 1.0 + (x / (y * (t - y)));
} else if (t <= 2.4e+65) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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) :: tmp
if (t <= (-9.2d-39)) then
tmp = 1.0d0 + (x * (((-1.0d0) / t) / z))
else if (t <= 9.8d-51) then
tmp = 1.0d0 - (x / (y * (y - z)))
else if (t <= 1.75d-25) then
tmp = x / ((y - z) * t)
else if (t <= 0.048d0) then
tmp = (z - (x / t)) / z
else if (t <= 1.45d+31) then
tmp = 1.0d0 + (x / (y * (t - y)))
else if (t <= 2.4d+65) then
tmp = 1.0d0 - (x / (z * t))
else
tmp = 1.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -9.2e-39) {
tmp = 1.0 + (x * ((-1.0 / t) / z));
} else if (t <= 9.8e-51) {
tmp = 1.0 - (x / (y * (y - z)));
} else if (t <= 1.75e-25) {
tmp = x / ((y - z) * t);
} else if (t <= 0.048) {
tmp = (z - (x / t)) / z;
} else if (t <= 1.45e+31) {
tmp = 1.0 + (x / (y * (t - y)));
} else if (t <= 2.4e+65) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -9.2e-39: tmp = 1.0 + (x * ((-1.0 / t) / z)) elif t <= 9.8e-51: tmp = 1.0 - (x / (y * (y - z))) elif t <= 1.75e-25: tmp = x / ((y - z) * t) elif t <= 0.048: tmp = (z - (x / t)) / z elif t <= 1.45e+31: tmp = 1.0 + (x / (y * (t - y))) elif t <= 2.4e+65: tmp = 1.0 - (x / (z * t)) else: tmp = 1.0 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -9.2e-39) tmp = Float64(1.0 + Float64(x * Float64(Float64(-1.0 / t) / z))); elseif (t <= 9.8e-51) tmp = Float64(1.0 - Float64(x / Float64(y * Float64(y - z)))); elseif (t <= 1.75e-25) tmp = Float64(x / Float64(Float64(y - z) * t)); elseif (t <= 0.048) tmp = Float64(Float64(z - Float64(x / t)) / z); elseif (t <= 1.45e+31) tmp = Float64(1.0 + Float64(x / Float64(y * Float64(t - y)))); elseif (t <= 2.4e+65) tmp = Float64(1.0 - Float64(x / Float64(z * t))); else tmp = 1.0; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -9.2e-39)
tmp = 1.0 + (x * ((-1.0 / t) / z));
elseif (t <= 9.8e-51)
tmp = 1.0 - (x / (y * (y - z)));
elseif (t <= 1.75e-25)
tmp = x / ((y - z) * t);
elseif (t <= 0.048)
tmp = (z - (x / t)) / z;
elseif (t <= 1.45e+31)
tmp = 1.0 + (x / (y * (t - y)));
elseif (t <= 2.4e+65)
tmp = 1.0 - (x / (z * t));
else
tmp = 1.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -9.2e-39], N[(1.0 + N[(x * N[(N[(-1.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.8e-51], N[(1.0 - N[(x / N[(y * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e-25], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.048], N[(N[(z - N[(x / t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 1.45e+31], N[(1.0 + N[(x / N[(y * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e+65], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{-39}:\\
\;\;\;\;1 + x \cdot \frac{\frac{-1}{t}}{z}\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-51}:\\
\;\;\;\;1 - \frac{x}{y \cdot \left(y - z\right)}\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;t \leq 0.048:\\
\;\;\;\;\frac{z - \frac{x}{t}}{z}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+31}:\\
\;\;\;\;1 + \frac{x}{y \cdot \left(t - y\right)}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+65}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -9.20000000000000033e-39Initial program 99.9%
Taylor expanded in y around 0 78.3%
clear-num78.4%
inv-pow78.4%
*-commutative78.4%
associate-/l*78.4%
Applied egg-rr78.4%
unpow-178.4%
associate-*r/78.4%
*-commutative78.4%
associate-/l*76.9%
Simplified76.9%
associate-/r*77.0%
associate-/r/78.4%
Applied egg-rr78.4%
if -9.20000000000000033e-39 < t < 9.79999999999999948e-51Initial program 96.4%
Taylor expanded in t around 0 80.0%
if 9.79999999999999948e-51 < t < 1.7500000000000001e-25Initial program 99.4%
Taylor expanded in t around inf 87.1%
associate-*r/87.1%
neg-mul-187.1%
Simplified87.1%
Taylor expanded in x around inf 62.8%
if 1.7500000000000001e-25 < t < 0.048000000000000001Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in z around 0 100.0%
if 0.048000000000000001 < t < 1.45e31Initial program 99.7%
Taylor expanded in z around 0 83.3%
if 1.45e31 < t < 2.4000000000000002e65Initial program 99.7%
Taylor expanded in y around 0 99.7%
if 2.4000000000000002e65 < t Initial program 99.6%
Taylor expanded in y around 0 73.1%
Taylor expanded in x around 0 90.4%
Final simplification82.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -8.4e-39)
(+ 1.0 (* x (/ (/ -1.0 t) z)))
(if (<= t 2.9e-124)
(+ 1.0 (/ (/ x y) (- z y)))
(if (or (<= t 860000000000.0) (not (<= t 6.2e+29)))
(- 1.0 (/ x (* t (- z y))))
(+ 1.0 (/ x (* y (- t y))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.4e-39) {
tmp = 1.0 + (x * ((-1.0 / t) / z));
} else if (t <= 2.9e-124) {
tmp = 1.0 + ((x / y) / (z - y));
} else if ((t <= 860000000000.0) || !(t <= 6.2e+29)) {
tmp = 1.0 - (x / (t * (z - y)));
} else {
tmp = 1.0 + (x / (y * (t - y)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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) :: tmp
if (t <= (-8.4d-39)) then
tmp = 1.0d0 + (x * (((-1.0d0) / t) / z))
else if (t <= 2.9d-124) then
tmp = 1.0d0 + ((x / y) / (z - y))
else if ((t <= 860000000000.0d0) .or. (.not. (t <= 6.2d+29))) then
tmp = 1.0d0 - (x / (t * (z - y)))
else
tmp = 1.0d0 + (x / (y * (t - y)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.4e-39) {
tmp = 1.0 + (x * ((-1.0 / t) / z));
} else if (t <= 2.9e-124) {
tmp = 1.0 + ((x / y) / (z - y));
} else if ((t <= 860000000000.0) || !(t <= 6.2e+29)) {
tmp = 1.0 - (x / (t * (z - y)));
} else {
tmp = 1.0 + (x / (y * (t - y)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -8.4e-39: tmp = 1.0 + (x * ((-1.0 / t) / z)) elif t <= 2.9e-124: tmp = 1.0 + ((x / y) / (z - y)) elif (t <= 860000000000.0) or not (t <= 6.2e+29): tmp = 1.0 - (x / (t * (z - y))) else: tmp = 1.0 + (x / (y * (t - y))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -8.4e-39) tmp = Float64(1.0 + Float64(x * Float64(Float64(-1.0 / t) / z))); elseif (t <= 2.9e-124) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(z - y))); elseif ((t <= 860000000000.0) || !(t <= 6.2e+29)) tmp = Float64(1.0 - Float64(x / Float64(t * Float64(z - y)))); else tmp = Float64(1.0 + Float64(x / Float64(y * Float64(t - y)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -8.4e-39)
tmp = 1.0 + (x * ((-1.0 / t) / z));
elseif (t <= 2.9e-124)
tmp = 1.0 + ((x / y) / (z - y));
elseif ((t <= 860000000000.0) || ~((t <= 6.2e+29)))
tmp = 1.0 - (x / (t * (z - y)));
else
tmp = 1.0 + (x / (y * (t - y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -8.4e-39], N[(1.0 + N[(x * N[(N[(-1.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e-124], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 860000000000.0], N[Not[LessEqual[t, 6.2e+29]], $MachinePrecision]], N[(1.0 - N[(x / N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x / N[(y * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.4 \cdot 10^{-39}:\\
\;\;\;\;1 + x \cdot \frac{\frac{-1}{t}}{z}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-124}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{z - y}\\
\mathbf{elif}\;t \leq 860000000000 \lor \neg \left(t \leq 6.2 \cdot 10^{+29}\right):\\
\;\;\;\;1 - \frac{x}{t \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{x}{y \cdot \left(t - y\right)}\\
\end{array}
\end{array}
if t < -8.39999999999999973e-39Initial program 99.9%
Taylor expanded in y around 0 78.3%
clear-num78.4%
inv-pow78.4%
*-commutative78.4%
associate-/l*78.4%
Applied egg-rr78.4%
unpow-178.4%
associate-*r/78.4%
*-commutative78.4%
associate-/l*76.9%
Simplified76.9%
associate-/r*77.0%
associate-/r/78.4%
Applied egg-rr78.4%
if -8.39999999999999973e-39 < t < 2.9000000000000002e-124Initial program 96.1%
Taylor expanded in t around 0 80.7%
associate-/r*79.9%
Simplified79.9%
if 2.9000000000000002e-124 < t < 8.6e11 or 6.1999999999999998e29 < t Initial program 99.7%
Taylor expanded in t around inf 96.1%
associate-*r/96.1%
neg-mul-196.1%
Simplified96.1%
if 8.6e11 < t < 6.1999999999999998e29Initial program 99.6%
Taylor expanded in z around 0 74.9%
Final simplification84.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -2e-162)
(+ 1.0 (* (/ x z) (/ -1.0 (- t y))))
(if (<= t 2.2e-192)
(+ 1.0 (/ (/ x y) (- z y)))
(if (<= t 4.2e-142)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= t 3e-32)
(+ 1.0 (/ (/ x y) (- t y)))
(- 1.0 (/ x (* t (- z y)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2e-162) {
tmp = 1.0 + ((x / z) * (-1.0 / (t - y)));
} else if (t <= 2.2e-192) {
tmp = 1.0 + ((x / y) / (z - y));
} else if (t <= 4.2e-142) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (t <= 3e-32) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 - (x / (t * (z - y)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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) :: tmp
if (t <= (-2d-162)) then
tmp = 1.0d0 + ((x / z) * ((-1.0d0) / (t - y)))
else if (t <= 2.2d-192) then
tmp = 1.0d0 + ((x / y) / (z - y))
else if (t <= 4.2d-142) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (t <= 3d-32) then
tmp = 1.0d0 + ((x / y) / (t - y))
else
tmp = 1.0d0 - (x / (t * (z - y)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2e-162) {
tmp = 1.0 + ((x / z) * (-1.0 / (t - y)));
} else if (t <= 2.2e-192) {
tmp = 1.0 + ((x / y) / (z - y));
} else if (t <= 4.2e-142) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (t <= 3e-32) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 - (x / (t * (z - y)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -2e-162: tmp = 1.0 + ((x / z) * (-1.0 / (t - y))) elif t <= 2.2e-192: tmp = 1.0 + ((x / y) / (z - y)) elif t <= 4.2e-142: tmp = 1.0 + ((x / z) / (y - t)) elif t <= 3e-32: tmp = 1.0 + ((x / y) / (t - y)) else: tmp = 1.0 - (x / (t * (z - y))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -2e-162) tmp = Float64(1.0 + Float64(Float64(x / z) * Float64(-1.0 / Float64(t - y)))); elseif (t <= 2.2e-192) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(z - y))); elseif (t <= 4.2e-142) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (t <= 3e-32) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(t - y))); else tmp = Float64(1.0 - Float64(x / Float64(t * Float64(z - y)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -2e-162)
tmp = 1.0 + ((x / z) * (-1.0 / (t - y)));
elseif (t <= 2.2e-192)
tmp = 1.0 + ((x / y) / (z - y));
elseif (t <= 4.2e-142)
tmp = 1.0 + ((x / z) / (y - t));
elseif (t <= 3e-32)
tmp = 1.0 + ((x / y) / (t - y));
else
tmp = 1.0 - (x / (t * (z - y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -2e-162], N[(1.0 + N[(N[(x / z), $MachinePrecision] * N[(-1.0 / N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e-192], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-142], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-32], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-162}:\\
\;\;\;\;1 + \frac{x}{z} \cdot \frac{-1}{t - y}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-192}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{z - y}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-142}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-32}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{t - y}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{t \cdot \left(z - y\right)}\\
\end{array}
\end{array}
if t < -1.99999999999999991e-162Initial program 99.9%
Taylor expanded in z around inf 79.4%
associate-*r/79.4%
neg-mul-179.4%
*-commutative79.4%
Simplified79.4%
neg-mul-179.4%
times-frac78.5%
Applied egg-rr78.5%
if -1.99999999999999991e-162 < t < 2.20000000000000006e-192Initial program 93.4%
Taylor expanded in t around 0 85.0%
associate-/r*85.2%
Simplified85.2%
if 2.20000000000000006e-192 < t < 4.1999999999999999e-142Initial program 99.1%
Taylor expanded in z around inf 99.1%
mul-1-neg99.1%
associate-/r*100.0%
distribute-neg-frac100.0%
Simplified100.0%
if 4.1999999999999999e-142 < t < 3e-32Initial program 99.7%
Taylor expanded in z around 0 64.4%
associate-/r*64.8%
Simplified64.8%
if 3e-32 < t Initial program 99.7%
Taylor expanded in t around inf 96.4%
associate-*r/96.4%
neg-mul-196.4%
Simplified96.4%
Final simplification84.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -4.3e-162)
(- 1.0 (/ x (* z (- t y))))
(if (<= t 1.4e-189)
(+ 1.0 (/ (/ x y) (- z y)))
(if (<= t 1.35e-141)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= t 1.86e-31)
(+ 1.0 (/ (/ x y) (- t y)))
(- 1.0 (/ x (* t (- z y)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.3e-162) {
tmp = 1.0 - (x / (z * (t - y)));
} else if (t <= 1.4e-189) {
tmp = 1.0 + ((x / y) / (z - y));
} else if (t <= 1.35e-141) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (t <= 1.86e-31) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 - (x / (t * (z - y)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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) :: tmp
if (t <= (-4.3d-162)) then
tmp = 1.0d0 - (x / (z * (t - y)))
else if (t <= 1.4d-189) then
tmp = 1.0d0 + ((x / y) / (z - y))
else if (t <= 1.35d-141) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (t <= 1.86d-31) then
tmp = 1.0d0 + ((x / y) / (t - y))
else
tmp = 1.0d0 - (x / (t * (z - y)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.3e-162) {
tmp = 1.0 - (x / (z * (t - y)));
} else if (t <= 1.4e-189) {
tmp = 1.0 + ((x / y) / (z - y));
} else if (t <= 1.35e-141) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (t <= 1.86e-31) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 - (x / (t * (z - y)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -4.3e-162: tmp = 1.0 - (x / (z * (t - y))) elif t <= 1.4e-189: tmp = 1.0 + ((x / y) / (z - y)) elif t <= 1.35e-141: tmp = 1.0 + ((x / z) / (y - t)) elif t <= 1.86e-31: tmp = 1.0 + ((x / y) / (t - y)) else: tmp = 1.0 - (x / (t * (z - y))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -4.3e-162) tmp = Float64(1.0 - Float64(x / Float64(z * Float64(t - y)))); elseif (t <= 1.4e-189) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(z - y))); elseif (t <= 1.35e-141) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (t <= 1.86e-31) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(t - y))); else tmp = Float64(1.0 - Float64(x / Float64(t * Float64(z - y)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -4.3e-162)
tmp = 1.0 - (x / (z * (t - y)));
elseif (t <= 1.4e-189)
tmp = 1.0 + ((x / y) / (z - y));
elseif (t <= 1.35e-141)
tmp = 1.0 + ((x / z) / (y - t));
elseif (t <= 1.86e-31)
tmp = 1.0 + ((x / y) / (t - y));
else
tmp = 1.0 - (x / (t * (z - y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -4.3e-162], N[(1.0 - N[(x / N[(z * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e-189], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-141], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.86e-31], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.3 \cdot 10^{-162}:\\
\;\;\;\;1 - \frac{x}{z \cdot \left(t - y\right)}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-189}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{z - y}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-141}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;t \leq 1.86 \cdot 10^{-31}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{t - y}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{t \cdot \left(z - y\right)}\\
\end{array}
\end{array}
if t < -4.29999999999999996e-162Initial program 99.9%
Taylor expanded in z around inf 79.4%
associate-*r/79.4%
neg-mul-179.4%
*-commutative79.4%
Simplified79.4%
if -4.29999999999999996e-162 < t < 1.4e-189Initial program 93.4%
Taylor expanded in t around 0 85.0%
associate-/r*85.2%
Simplified85.2%
if 1.4e-189 < t < 1.3500000000000001e-141Initial program 99.1%
Taylor expanded in z around inf 99.1%
mul-1-neg99.1%
associate-/r*100.0%
distribute-neg-frac100.0%
Simplified100.0%
if 1.3500000000000001e-141 < t < 1.85999999999999995e-31Initial program 99.7%
Taylor expanded in z around 0 64.4%
associate-/r*64.8%
Simplified64.8%
if 1.85999999999999995e-31 < t Initial program 99.7%
Taylor expanded in t around inf 96.4%
associate-*r/96.4%
neg-mul-196.4%
Simplified96.4%
Final simplification84.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -1.45e-60)
(+ 1.0 (/ (/ x y) (- z y)))
(if (<= y -8e-204)
(- 1.0 (/ 1.0 (* t (/ z x))))
(if (<= y -1.86e-211)
(/ x (* (- y z) t))
(if (<= y 2.6e-188) (/ (- z (/ x t)) z) (+ 1.0 (/ x (* y (- t y)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e-60) {
tmp = 1.0 + ((x / y) / (z - y));
} else if (y <= -8e-204) {
tmp = 1.0 - (1.0 / (t * (z / x)));
} else if (y <= -1.86e-211) {
tmp = x / ((y - z) * t);
} else if (y <= 2.6e-188) {
tmp = (z - (x / t)) / z;
} else {
tmp = 1.0 + (x / (y * (t - y)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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) :: tmp
if (y <= (-1.45d-60)) then
tmp = 1.0d0 + ((x / y) / (z - y))
else if (y <= (-8d-204)) then
tmp = 1.0d0 - (1.0d0 / (t * (z / x)))
else if (y <= (-1.86d-211)) then
tmp = x / ((y - z) * t)
else if (y <= 2.6d-188) then
tmp = (z - (x / t)) / z
else
tmp = 1.0d0 + (x / (y * (t - y)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e-60) {
tmp = 1.0 + ((x / y) / (z - y));
} else if (y <= -8e-204) {
tmp = 1.0 - (1.0 / (t * (z / x)));
} else if (y <= -1.86e-211) {
tmp = x / ((y - z) * t);
} else if (y <= 2.6e-188) {
tmp = (z - (x / t)) / z;
} else {
tmp = 1.0 + (x / (y * (t - y)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -1.45e-60: tmp = 1.0 + ((x / y) / (z - y)) elif y <= -8e-204: tmp = 1.0 - (1.0 / (t * (z / x))) elif y <= -1.86e-211: tmp = x / ((y - z) * t) elif y <= 2.6e-188: tmp = (z - (x / t)) / z else: tmp = 1.0 + (x / (y * (t - y))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -1.45e-60) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(z - y))); elseif (y <= -8e-204) tmp = Float64(1.0 - Float64(1.0 / Float64(t * Float64(z / x)))); elseif (y <= -1.86e-211) tmp = Float64(x / Float64(Float64(y - z) * t)); elseif (y <= 2.6e-188) tmp = Float64(Float64(z - Float64(x / t)) / z); else tmp = Float64(1.0 + Float64(x / Float64(y * Float64(t - y)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -1.45e-60)
tmp = 1.0 + ((x / y) / (z - y));
elseif (y <= -8e-204)
tmp = 1.0 - (1.0 / (t * (z / x)));
elseif (y <= -1.86e-211)
tmp = x / ((y - z) * t);
elseif (y <= 2.6e-188)
tmp = (z - (x / t)) / z;
else
tmp = 1.0 + (x / (y * (t - y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -1.45e-60], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8e-204], N[(1.0 - N[(1.0 / N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.86e-211], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e-188], N[(N[(z - N[(x / t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(1.0 + N[(x / N[(y * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{-60}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{z - y}\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-204}:\\
\;\;\;\;1 - \frac{1}{t \cdot \frac{z}{x}}\\
\mathbf{elif}\;y \leq -1.86 \cdot 10^{-211}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-188}:\\
\;\;\;\;\frac{z - \frac{x}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{x}{y \cdot \left(t - y\right)}\\
\end{array}
\end{array}
if y < -1.45e-60Initial program 99.7%
Taylor expanded in t around 0 90.3%
associate-/r*90.3%
Simplified90.3%
if -1.45e-60 < y < -8.00000000000000001e-204Initial program 99.7%
Taylor expanded in y around 0 71.8%
clear-num71.8%
inv-pow71.8%
*-commutative71.8%
associate-/l*69.7%
Applied egg-rr69.7%
unpow-169.7%
associate-*r/71.8%
*-commutative71.8%
associate-/l*69.6%
Simplified69.6%
if -8.00000000000000001e-204 < y < -1.85999999999999993e-211Initial program 99.4%
Taylor expanded in t around inf 61.0%
associate-*r/61.0%
neg-mul-161.0%
Simplified61.0%
Taylor expanded in x around inf 61.0%
if -1.85999999999999993e-211 < y < 2.6000000000000001e-188Initial program 91.5%
Taylor expanded in y around 0 85.2%
Taylor expanded in z around 0 83.4%
if 2.6000000000000001e-188 < y Initial program 99.9%
Taylor expanded in z around 0 80.3%
Final simplification81.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ 1.0 (/ x (* y (- t y))))))
(if (<= y -1.85e-59)
t_1
(if (<= y -9.6e-211)
(- 1.0 (/ x (* z t)))
(if (<= y 3.5e-188) (/ (- z (/ x t)) z) t_1)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = 1.0 + (x / (y * (t - y)));
double tmp;
if (y <= -1.85e-59) {
tmp = t_1;
} else if (y <= -9.6e-211) {
tmp = 1.0 - (x / (z * t));
} else if (y <= 3.5e-188) {
tmp = (z - (x / t)) / z;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 = 1.0d0 + (x / (y * (t - y)))
if (y <= (-1.85d-59)) then
tmp = t_1
else if (y <= (-9.6d-211)) then
tmp = 1.0d0 - (x / (z * t))
else if (y <= 3.5d-188) then
tmp = (z - (x / t)) / z
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 + (x / (y * (t - y)));
double tmp;
if (y <= -1.85e-59) {
tmp = t_1;
} else if (y <= -9.6e-211) {
tmp = 1.0 - (x / (z * t));
} else if (y <= 3.5e-188) {
tmp = (z - (x / t)) / z;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = 1.0 + (x / (y * (t - y))) tmp = 0 if y <= -1.85e-59: tmp = t_1 elif y <= -9.6e-211: tmp = 1.0 - (x / (z * t)) elif y <= 3.5e-188: tmp = (z - (x / t)) / z else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(1.0 + Float64(x / Float64(y * Float64(t - y)))) tmp = 0.0 if (y <= -1.85e-59) tmp = t_1; elseif (y <= -9.6e-211) tmp = Float64(1.0 - Float64(x / Float64(z * t))); elseif (y <= 3.5e-188) tmp = Float64(Float64(z - Float64(x / t)) / z); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = 1.0 + (x / (y * (t - y)));
tmp = 0.0;
if (y <= -1.85e-59)
tmp = t_1;
elseif (y <= -9.6e-211)
tmp = 1.0 - (x / (z * t));
elseif (y <= 3.5e-188)
tmp = (z - (x / t)) / z;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 + N[(x / N[(y * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.85e-59], t$95$1, If[LessEqual[y, -9.6e-211], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-188], N[(N[(z - N[(x / t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := 1 + \frac{x}{y \cdot \left(t - y\right)}\\
\mathbf{if}\;y \leq -1.85 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9.6 \cdot 10^{-211}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-188}:\\
\;\;\;\;\frac{z - \frac{x}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.85e-59 or 3.5e-188 < y Initial program 99.8%
Taylor expanded in z around 0 86.4%
if -1.85e-59 < y < -9.6000000000000008e-211Initial program 99.7%
Taylor expanded in y around 0 70.0%
if -9.6000000000000008e-211 < y < 3.5e-188Initial program 91.7%
Taylor expanded in y around 0 83.4%
Taylor expanded in z around 0 81.7%
Final simplification82.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= x -1.9e+178)
(+ 1.0 (* x (/ (/ -1.0 t) z)))
(if (<= x 7.5e+171)
1.0
(if (<= x 3e+201) (+ 1.0 (/ x (* y t))) (- 1.0 (/ (/ x y) y))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.9e+178) {
tmp = 1.0 + (x * ((-1.0 / t) / z));
} else if (x <= 7.5e+171) {
tmp = 1.0;
} else if (x <= 3e+201) {
tmp = 1.0 + (x / (y * t));
} else {
tmp = 1.0 - ((x / y) / y);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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) :: tmp
if (x <= (-1.9d+178)) then
tmp = 1.0d0 + (x * (((-1.0d0) / t) / z))
else if (x <= 7.5d+171) then
tmp = 1.0d0
else if (x <= 3d+201) then
tmp = 1.0d0 + (x / (y * t))
else
tmp = 1.0d0 - ((x / y) / y)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.9e+178) {
tmp = 1.0 + (x * ((-1.0 / t) / z));
} else if (x <= 7.5e+171) {
tmp = 1.0;
} else if (x <= 3e+201) {
tmp = 1.0 + (x / (y * t));
} else {
tmp = 1.0 - ((x / y) / y);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= -1.9e+178: tmp = 1.0 + (x * ((-1.0 / t) / z)) elif x <= 7.5e+171: tmp = 1.0 elif x <= 3e+201: tmp = 1.0 + (x / (y * t)) else: tmp = 1.0 - ((x / y) / y) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= -1.9e+178) tmp = Float64(1.0 + Float64(x * Float64(Float64(-1.0 / t) / z))); elseif (x <= 7.5e+171) tmp = 1.0; elseif (x <= 3e+201) tmp = Float64(1.0 + Float64(x / Float64(y * t))); else tmp = Float64(1.0 - Float64(Float64(x / y) / y)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= -1.9e+178)
tmp = 1.0 + (x * ((-1.0 / t) / z));
elseif (x <= 7.5e+171)
tmp = 1.0;
elseif (x <= 3e+201)
tmp = 1.0 + (x / (y * t));
else
tmp = 1.0 - ((x / y) / y);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, -1.9e+178], N[(1.0 + N[(x * N[(N[(-1.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.5e+171], 1.0, If[LessEqual[x, 3e+201], N[(1.0 + N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{+178}:\\
\;\;\;\;1 + x \cdot \frac{\frac{-1}{t}}{z}\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+171}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 3 \cdot 10^{+201}:\\
\;\;\;\;1 + \frac{x}{y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if x < -1.89999999999999999e178Initial program 99.2%
Taylor expanded in y around 0 61.2%
clear-num61.2%
inv-pow61.2%
*-commutative61.2%
associate-/l*53.6%
Applied egg-rr53.6%
unpow-153.6%
associate-*r/61.2%
*-commutative61.2%
associate-/l*58.5%
Simplified58.5%
associate-/r*58.6%
associate-/r/61.8%
Applied egg-rr61.8%
if -1.89999999999999999e178 < x < 7.4999999999999998e171Initial program 98.0%
Taylor expanded in y around 0 65.2%
Taylor expanded in x around 0 82.6%
if 7.4999999999999998e171 < x < 3.00000000000000025e201Initial program 99.8%
Taylor expanded in t around inf 60.2%
associate-*r/60.2%
neg-mul-160.2%
Simplified60.2%
Taylor expanded in y around inf 60.0%
*-commutative60.0%
Simplified60.0%
if 3.00000000000000025e201 < x Initial program 99.6%
clear-num99.6%
inv-pow99.6%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 85.7%
*-rgt-identity85.7%
times-frac79.8%
associate-*l/85.7%
associate-*r/85.8%
*-rgt-identity85.8%
Simplified85.8%
Taylor expanded in y around inf 61.2%
Final simplification78.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= x -2.1e+179)
(- 1.0 (/ x (* z t)))
(if (<= x 3.6e+171)
1.0
(if (<= x 2.65e+197) (+ 1.0 (/ x (* y t))) (- 1.0 (/ (/ x y) y))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.1e+179) {
tmp = 1.0 - (x / (z * t));
} else if (x <= 3.6e+171) {
tmp = 1.0;
} else if (x <= 2.65e+197) {
tmp = 1.0 + (x / (y * t));
} else {
tmp = 1.0 - ((x / y) / y);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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) :: tmp
if (x <= (-2.1d+179)) then
tmp = 1.0d0 - (x / (z * t))
else if (x <= 3.6d+171) then
tmp = 1.0d0
else if (x <= 2.65d+197) then
tmp = 1.0d0 + (x / (y * t))
else
tmp = 1.0d0 - ((x / y) / y)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.1e+179) {
tmp = 1.0 - (x / (z * t));
} else if (x <= 3.6e+171) {
tmp = 1.0;
} else if (x <= 2.65e+197) {
tmp = 1.0 + (x / (y * t));
} else {
tmp = 1.0 - ((x / y) / y);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= -2.1e+179: tmp = 1.0 - (x / (z * t)) elif x <= 3.6e+171: tmp = 1.0 elif x <= 2.65e+197: tmp = 1.0 + (x / (y * t)) else: tmp = 1.0 - ((x / y) / y) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= -2.1e+179) tmp = Float64(1.0 - Float64(x / Float64(z * t))); elseif (x <= 3.6e+171) tmp = 1.0; elseif (x <= 2.65e+197) tmp = Float64(1.0 + Float64(x / Float64(y * t))); else tmp = Float64(1.0 - Float64(Float64(x / y) / y)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= -2.1e+179)
tmp = 1.0 - (x / (z * t));
elseif (x <= 3.6e+171)
tmp = 1.0;
elseif (x <= 2.65e+197)
tmp = 1.0 + (x / (y * t));
else
tmp = 1.0 - ((x / y) / y);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, -2.1e+179], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e+171], 1.0, If[LessEqual[x, 2.65e+197], N[(1.0 + N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+179}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+171}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 2.65 \cdot 10^{+197}:\\
\;\;\;\;1 + \frac{x}{y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if x < -2.0999999999999999e179Initial program 99.2%
Taylor expanded in y around 0 61.2%
if -2.0999999999999999e179 < x < 3.60000000000000018e171Initial program 98.0%
Taylor expanded in y around 0 65.2%
Taylor expanded in x around 0 82.6%
if 3.60000000000000018e171 < x < 2.6500000000000001e197Initial program 99.8%
Taylor expanded in t around inf 60.2%
associate-*r/60.2%
neg-mul-160.2%
Simplified60.2%
Taylor expanded in y around inf 60.0%
*-commutative60.0%
Simplified60.0%
if 2.6500000000000001e197 < x Initial program 99.6%
clear-num99.6%
inv-pow99.6%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 85.7%
*-rgt-identity85.7%
times-frac79.8%
associate-*l/85.7%
associate-*r/85.8%
*-rgt-identity85.8%
Simplified85.8%
Taylor expanded in y around inf 61.2%
Final simplification78.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -3e-162)
(- 1.0 (/ x (* z (- t y))))
(if (<= t 3.2e-124)
(+ 1.0 (/ (/ x y) (- z y)))
(- 1.0 (/ x (* t (- z y)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3e-162) {
tmp = 1.0 - (x / (z * (t - y)));
} else if (t <= 3.2e-124) {
tmp = 1.0 + ((x / y) / (z - y));
} else {
tmp = 1.0 - (x / (t * (z - y)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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) :: tmp
if (t <= (-3d-162)) then
tmp = 1.0d0 - (x / (z * (t - y)))
else if (t <= 3.2d-124) then
tmp = 1.0d0 + ((x / y) / (z - y))
else
tmp = 1.0d0 - (x / (t * (z - y)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3e-162) {
tmp = 1.0 - (x / (z * (t - y)));
} else if (t <= 3.2e-124) {
tmp = 1.0 + ((x / y) / (z - y));
} else {
tmp = 1.0 - (x / (t * (z - y)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -3e-162: tmp = 1.0 - (x / (z * (t - y))) elif t <= 3.2e-124: tmp = 1.0 + ((x / y) / (z - y)) else: tmp = 1.0 - (x / (t * (z - y))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -3e-162) tmp = Float64(1.0 - Float64(x / Float64(z * Float64(t - y)))); elseif (t <= 3.2e-124) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(z - y))); else tmp = Float64(1.0 - Float64(x / Float64(t * Float64(z - y)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -3e-162)
tmp = 1.0 - (x / (z * (t - y)));
elseif (t <= 3.2e-124)
tmp = 1.0 + ((x / y) / (z - y));
else
tmp = 1.0 - (x / (t * (z - y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -3e-162], N[(1.0 - N[(x / N[(z * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-124], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-162}:\\
\;\;\;\;1 - \frac{x}{z \cdot \left(t - y\right)}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-124}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{t \cdot \left(z - y\right)}\\
\end{array}
\end{array}
if t < -2.99999999999999999e-162Initial program 99.9%
Taylor expanded in z around inf 79.4%
associate-*r/79.4%
neg-mul-179.4%
*-commutative79.4%
Simplified79.4%
if -2.99999999999999999e-162 < t < 3.20000000000000004e-124Initial program 94.4%
Taylor expanded in t around 0 86.3%
associate-/r*85.1%
Simplified85.1%
if 3.20000000000000004e-124 < t Initial program 99.7%
Taylor expanded in t around inf 93.6%
associate-*r/93.6%
neg-mul-193.6%
Simplified93.6%
Final simplification85.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= x -2.2e+180) (- 1.0 (/ x (* z t))) (if (<= x 6.8e+170) 1.0 (+ 1.0 (/ x (* y t))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.2e+180) {
tmp = 1.0 - (x / (z * t));
} else if (x <= 6.8e+170) {
tmp = 1.0;
} else {
tmp = 1.0 + (x / (y * t));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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) :: tmp
if (x <= (-2.2d+180)) then
tmp = 1.0d0 - (x / (z * t))
else if (x <= 6.8d+170) then
tmp = 1.0d0
else
tmp = 1.0d0 + (x / (y * t))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.2e+180) {
tmp = 1.0 - (x / (z * t));
} else if (x <= 6.8e+170) {
tmp = 1.0;
} else {
tmp = 1.0 + (x / (y * t));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= -2.2e+180: tmp = 1.0 - (x / (z * t)) elif x <= 6.8e+170: tmp = 1.0 else: tmp = 1.0 + (x / (y * t)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= -2.2e+180) tmp = Float64(1.0 - Float64(x / Float64(z * t))); elseif (x <= 6.8e+170) tmp = 1.0; else tmp = Float64(1.0 + Float64(x / Float64(y * t))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= -2.2e+180)
tmp = 1.0 - (x / (z * t));
elseif (x <= 6.8e+170)
tmp = 1.0;
else
tmp = 1.0 + (x / (y * t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, -2.2e+180], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.8e+170], 1.0, N[(1.0 + N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+180}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{+170}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{x}{y \cdot t}\\
\end{array}
\end{array}
if x < -2.1999999999999999e180Initial program 99.2%
Taylor expanded in y around 0 61.2%
if -2.1999999999999999e180 < x < 6.8000000000000003e170Initial program 98.0%
Taylor expanded in y around 0 65.2%
Taylor expanded in x around 0 82.6%
if 6.8000000000000003e170 < x Initial program 99.7%
Taylor expanded in t around inf 53.8%
associate-*r/53.8%
neg-mul-153.8%
Simplified53.8%
Taylor expanded in y around inf 45.5%
*-commutative45.5%
Simplified45.5%
Final simplification76.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= x -1.35e+174) (* x (/ (/ -1.0 t) z)) (if (<= x 1e+172) 1.0 (+ 1.0 (/ x (* y t))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.35e+174) {
tmp = x * ((-1.0 / t) / z);
} else if (x <= 1e+172) {
tmp = 1.0;
} else {
tmp = 1.0 + (x / (y * t));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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) :: tmp
if (x <= (-1.35d+174)) then
tmp = x * (((-1.0d0) / t) / z)
else if (x <= 1d+172) then
tmp = 1.0d0
else
tmp = 1.0d0 + (x / (y * t))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.35e+174) {
tmp = x * ((-1.0 / t) / z);
} else if (x <= 1e+172) {
tmp = 1.0;
} else {
tmp = 1.0 + (x / (y * t));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= -1.35e+174: tmp = x * ((-1.0 / t) / z) elif x <= 1e+172: tmp = 1.0 else: tmp = 1.0 + (x / (y * t)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= -1.35e+174) tmp = Float64(x * Float64(Float64(-1.0 / t) / z)); elseif (x <= 1e+172) tmp = 1.0; else tmp = Float64(1.0 + Float64(x / Float64(y * t))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= -1.35e+174)
tmp = x * ((-1.0 / t) / z);
elseif (x <= 1e+172)
tmp = 1.0;
else
tmp = 1.0 + (x / (y * t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, -1.35e+174], N[(x * N[(N[(-1.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e+172], 1.0, N[(1.0 + N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+174}:\\
\;\;\;\;x \cdot \frac{\frac{-1}{t}}{z}\\
\mathbf{elif}\;x \leq 10^{+172}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{x}{y \cdot t}\\
\end{array}
\end{array}
if x < -1.35e174Initial program 99.2%
Taylor expanded in y around 0 60.5%
Taylor expanded in x around inf 43.1%
associate-*r/43.1%
mul-1-neg43.1%
Simplified43.1%
add-sqr-sqrt43.0%
sqrt-unprod18.6%
sqr-neg18.6%
sqrt-unprod0.0%
add-sqr-sqrt4.9%
frac-2neg4.9%
distribute-lft-neg-in4.9%
associate-/l/5.1%
div-inv5.1%
associate-/l*5.0%
add-sqr-sqrt5.0%
sqrt-unprod4.2%
sqr-neg4.2%
sqrt-unprod0.0%
add-sqr-sqrt43.2%
Applied egg-rr43.2%
Taylor expanded in z around 0 43.0%
associate-/r*43.2%
Simplified43.2%
if -1.35e174 < x < 1.0000000000000001e172Initial program 98.0%
Taylor expanded in y around 0 65.4%
Taylor expanded in x around 0 83.4%
if 1.0000000000000001e172 < x Initial program 99.7%
Taylor expanded in t around inf 53.8%
associate-*r/53.8%
neg-mul-153.8%
Simplified53.8%
Taylor expanded in y around inf 45.5%
*-commutative45.5%
Simplified45.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (- 1.0 (* (/ 1.0 (- y z)) (/ x (- y t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0 - ((1.0 / (y - z)) * (x / (y - t)));
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 = 1.0d0 - ((1.0d0 / (y - z)) * (x / (y - t)))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return 1.0 - ((1.0 / (y - z)) * (x / (y - t)));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0 - ((1.0 / (y - z)) * (x / (y - t)))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(1.0 - Float64(Float64(1.0 / Float64(y - z)) * Float64(x / Float64(y - t)))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 - ((1.0 / (y - z)) * (x / (y - t)));
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(1.0 - N[(N[(1.0 / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 - \frac{1}{y - z} \cdot \frac{x}{y - t}
\end{array}
Initial program 98.3%
*-un-lft-identity98.3%
times-frac97.4%
Applied egg-rr97.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= x -1.35e+174) (* x (/ (/ -1.0 t) z)) 1.0))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.35e+174) {
tmp = x * ((-1.0 / t) / z);
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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) :: tmp
if (x <= (-1.35d+174)) then
tmp = x * (((-1.0d0) / t) / z)
else
tmp = 1.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.35e+174) {
tmp = x * ((-1.0 / t) / z);
} else {
tmp = 1.0;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= -1.35e+174: tmp = x * ((-1.0 / t) / z) else: tmp = 1.0 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= -1.35e+174) tmp = Float64(x * Float64(Float64(-1.0 / t) / z)); else tmp = 1.0; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= -1.35e+174)
tmp = x * ((-1.0 / t) / z);
else
tmp = 1.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, -1.35e+174], N[(x * N[(N[(-1.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+174}:\\
\;\;\;\;x \cdot \frac{\frac{-1}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -1.35e174Initial program 99.2%
Taylor expanded in y around 0 60.5%
Taylor expanded in x around inf 43.1%
associate-*r/43.1%
mul-1-neg43.1%
Simplified43.1%
add-sqr-sqrt43.0%
sqrt-unprod18.6%
sqr-neg18.6%
sqrt-unprod0.0%
add-sqr-sqrt4.9%
frac-2neg4.9%
distribute-lft-neg-in4.9%
associate-/l/5.1%
div-inv5.1%
associate-/l*5.0%
add-sqr-sqrt5.0%
sqrt-unprod4.2%
sqr-neg4.2%
sqrt-unprod0.0%
add-sqr-sqrt43.2%
Applied egg-rr43.2%
Taylor expanded in z around 0 43.0%
associate-/r*43.2%
Simplified43.2%
if -1.35e174 < x Initial program 98.2%
Taylor expanded in y around 0 60.7%
Taylor expanded in x around 0 77.7%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= x -1.35e+174) (/ x (* t (- z))) 1.0))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.35e+174) {
tmp = x / (t * -z);
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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) :: tmp
if (x <= (-1.35d+174)) then
tmp = x / (t * -z)
else
tmp = 1.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.35e+174) {
tmp = x / (t * -z);
} else {
tmp = 1.0;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= -1.35e+174: tmp = x / (t * -z) else: tmp = 1.0 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= -1.35e+174) tmp = Float64(x / Float64(t * Float64(-z))); else tmp = 1.0; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= -1.35e+174)
tmp = x / (t * -z);
else
tmp = 1.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, -1.35e+174], N[(x / N[(t * (-z)), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+174}:\\
\;\;\;\;\frac{x}{t \cdot \left(-z\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -1.35e174Initial program 99.2%
Taylor expanded in y around 0 60.5%
Taylor expanded in x around inf 43.1%
associate-*r/43.1%
mul-1-neg43.1%
Simplified43.1%
if -1.35e174 < x Initial program 98.2%
Taylor expanded in y around 0 60.7%
Taylor expanded in x around 0 77.7%
Final simplification73.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0 - (x / ((y - z) * (y - t)));
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 = 1.0d0 - (x / ((y - z) * (y - t)))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return 1.0 - (x / ((y - z) * (y - t)));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0 - (x / ((y - z) * (y - t)))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t)))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 - (x / ((y - z) * (y - t)));
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
\end{array}
Initial program 98.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 1.0)
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 = 1.0d0
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return 1.0;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return 1.0 end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := 1.0
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1
\end{array}
Initial program 98.3%
Taylor expanded in y around 0 60.6%
Taylor expanded in x around 0 71.7%
herbie shell --seed 2024107
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, A"
:precision binary64
(- 1.0 (/ x (* (- y z) (- y t)))))