
(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 13 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 (if (<= t 7e+38) (+ 1.0 (/ (/ x (- y z)) (- t y))) (+ 1.0 (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 7e+38) {
tmp = 1.0 + ((x / (y - z)) / (t - y));
} else {
tmp = 1.0 + ((x / t) / (y - z));
}
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 <= 7d+38) then
tmp = 1.0d0 + ((x / (y - z)) / (t - y))
else
tmp = 1.0d0 + ((x / t) / (y - z))
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 <= 7e+38) {
tmp = 1.0 + ((x / (y - z)) / (t - y));
} else {
tmp = 1.0 + ((x / t) / (y - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 7e+38: tmp = 1.0 + ((x / (y - z)) / (t - y)) else: tmp = 1.0 + ((x / t) / (y - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 7e+38) tmp = Float64(1.0 + Float64(Float64(x / Float64(y - z)) / Float64(t - y))); else tmp = Float64(1.0 + Float64(Float64(x / t) / Float64(y - z))); 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 <= 7e+38)
tmp = 1.0 + ((x / (y - z)) / (t - y));
else
tmp = 1.0 + ((x / t) / (y - z));
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, 7e+38], N[(1.0 + N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7 \cdot 10^{+38}:\\
\;\;\;\;1 + \frac{\frac{x}{y - z}}{t - y}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 7.00000000000000003e38Initial program 97.6%
Taylor expanded in x around 0 97.6%
associate-/l/97.6%
metadata-eval97.6%
cancel-sign-sub-inv97.6%
*-lft-identity97.6%
Simplified97.6%
if 7.00000000000000003e38 < t Initial program 99.9%
Taylor expanded in t around inf 99.9%
associate-/r*99.9%
Simplified99.9%
Final simplification98.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 (<= z -6.6e-96)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= z 1.35e-280)
(+ 1.0 (/ 1.0 (* y (/ (- t y) x))))
(+ 1.0 (/ (/ x t) (- y z))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.6e-96) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 1.35e-280) {
tmp = 1.0 + (1.0 / (y * ((t - y) / x)));
} else {
tmp = 1.0 + ((x / t) / (y - z));
}
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 (z <= (-6.6d-96)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (z <= 1.35d-280) then
tmp = 1.0d0 + (1.0d0 / (y * ((t - y) / x)))
else
tmp = 1.0d0 + ((x / t) / (y - z))
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 (z <= -6.6e-96) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 1.35e-280) {
tmp = 1.0 + (1.0 / (y * ((t - y) / x)));
} else {
tmp = 1.0 + ((x / t) / (y - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -6.6e-96: tmp = 1.0 + ((x / z) / (y - t)) elif z <= 1.35e-280: tmp = 1.0 + (1.0 / (y * ((t - y) / x))) else: tmp = 1.0 + ((x / t) / (y - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -6.6e-96) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (z <= 1.35e-280) tmp = Float64(1.0 + Float64(1.0 / Float64(y * Float64(Float64(t - y) / x)))); else tmp = Float64(1.0 + Float64(Float64(x / t) / Float64(y - z))); 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 (z <= -6.6e-96)
tmp = 1.0 + ((x / z) / (y - t));
elseif (z <= 1.35e-280)
tmp = 1.0 + (1.0 / (y * ((t - y) / x)));
else
tmp = 1.0 + ((x / t) / (y - z));
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[z, -6.6e-96], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-280], N[(1.0 + N[(1.0 / N[(y * N[(N[(t - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{-96}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-280}:\\
\;\;\;\;1 + \frac{1}{y \cdot \frac{t - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if z < -6.5999999999999998e-96Initial program 99.9%
Taylor expanded in z around inf 96.0%
associate-/r*96.0%
Simplified96.0%
if -6.5999999999999998e-96 < z < 1.34999999999999992e-280Initial program 94.4%
clear-num94.3%
inv-pow94.3%
associate-/l*99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Taylor expanded in z around 0 87.8%
associate-*r/88.0%
Simplified88.0%
if 1.34999999999999992e-280 < z Initial program 98.3%
Taylor expanded in t around inf 79.3%
associate-/r*80.1%
Simplified80.1%
Final simplification86.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 (or (<= y -3.3e-15) (not (<= y 7.4e-86))) (+ 1.0 (/ (/ x y) (- t y))) (+ 1.0 (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.3e-15) || !(y <= 7.4e-86)) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 + ((x / t) / (y - z));
}
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 <= (-3.3d-15)) .or. (.not. (y <= 7.4d-86))) then
tmp = 1.0d0 + ((x / y) / (t - y))
else
tmp = 1.0d0 + ((x / t) / (y - z))
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 <= -3.3e-15) || !(y <= 7.4e-86)) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 + ((x / t) / (y - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (y <= -3.3e-15) or not (y <= 7.4e-86): tmp = 1.0 + ((x / y) / (t - y)) else: tmp = 1.0 + ((x / t) / (y - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((y <= -3.3e-15) || !(y <= 7.4e-86)) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(t - y))); else tmp = Float64(1.0 + Float64(Float64(x / t) / Float64(y - z))); 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 <= -3.3e-15) || ~((y <= 7.4e-86)))
tmp = 1.0 + ((x / y) / (t - y));
else
tmp = 1.0 + ((x / t) / (y - z));
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[Or[LessEqual[y, -3.3e-15], N[Not[LessEqual[y, 7.4e-86]], $MachinePrecision]], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-15} \lor \neg \left(y \leq 7.4 \cdot 10^{-86}\right):\\
\;\;\;\;1 + \frac{\frac{x}{y}}{t - y}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -3.3e-15 or 7.3999999999999997e-86 < y Initial program 99.9%
Taylor expanded in z around 0 94.6%
sub-neg94.6%
associate-/r*94.6%
distribute-neg-frac294.6%
neg-sub094.6%
sub-neg94.6%
+-commutative94.6%
associate--r+94.6%
neg-sub094.6%
remove-double-neg94.6%
Simplified94.6%
if -3.3e-15 < y < 7.3999999999999997e-86Initial program 95.5%
Taylor expanded in t around inf 83.8%
associate-/r*86.1%
Simplified86.1%
Final simplification91.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 (<= y -1.9e-12)
(+ 1.0 (/ (/ x y) (- t y)))
(if (<= y 1.85e-85)
(+ 1.0 (/ (/ x t) (- y z)))
(+ 1.0 (/ (/ x y) (- z y))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.9e-12) {
tmp = 1.0 + ((x / y) / (t - y));
} else if (y <= 1.85e-85) {
tmp = 1.0 + ((x / t) / (y - z));
} else {
tmp = 1.0 + ((x / y) / (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 (y <= (-1.9d-12)) then
tmp = 1.0d0 + ((x / y) / (t - y))
else if (y <= 1.85d-85) then
tmp = 1.0d0 + ((x / t) / (y - z))
else
tmp = 1.0d0 + ((x / y) / (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 (y <= -1.9e-12) {
tmp = 1.0 + ((x / y) / (t - y));
} else if (y <= 1.85e-85) {
tmp = 1.0 + ((x / t) / (y - z));
} else {
tmp = 1.0 + ((x / y) / (z - y));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -1.9e-12: tmp = 1.0 + ((x / y) / (t - y)) elif y <= 1.85e-85: tmp = 1.0 + ((x / t) / (y - z)) else: tmp = 1.0 + ((x / y) / (z - y)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -1.9e-12) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(t - y))); elseif (y <= 1.85e-85) tmp = Float64(1.0 + Float64(Float64(x / t) / Float64(y - z))); else tmp = Float64(1.0 + Float64(Float64(x / y) / 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 (y <= -1.9e-12)
tmp = 1.0 + ((x / y) / (t - y));
elseif (y <= 1.85e-85)
tmp = 1.0 + ((x / t) / (y - z));
else
tmp = 1.0 + ((x / y) / (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[y, -1.9e-12], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e-85], N[(1.0 + N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-12}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{t - y}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-85}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{z - y}\\
\end{array}
\end{array}
if y < -1.89999999999999998e-12Initial program 99.9%
Taylor expanded in z around 0 96.8%
sub-neg96.8%
associate-/r*96.9%
distribute-neg-frac296.9%
neg-sub096.9%
sub-neg96.9%
+-commutative96.9%
associate--r+96.9%
neg-sub096.9%
remove-double-neg96.9%
Simplified96.9%
if -1.89999999999999998e-12 < y < 1.84999999999999992e-85Initial program 95.5%
Taylor expanded in t around inf 83.8%
associate-/r*86.1%
Simplified86.1%
if 1.84999999999999992e-85 < y Initial program 99.9%
clear-num100.0%
inv-pow100.0%
associate-/l*100.0%
Applied egg-rr100.0%
unpow-1100.0%
Simplified100.0%
Taylor expanded in t around 0 97.7%
associate-/r*97.8%
Simplified97.8%
Final simplification92.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 -3.9e-17)
(+ 1.0 (/ (/ x y) (- t y)))
(if (<= y 1.85e-85)
(+ 1.0 (/ (/ x t) (- y z)))
(+ 1.0 (/ x (* y (- z y)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.9e-17) {
tmp = 1.0 + ((x / y) / (t - y));
} else if (y <= 1.85e-85) {
tmp = 1.0 + ((x / t) / (y - z));
} else {
tmp = 1.0 + (x / (y * (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 (y <= (-3.9d-17)) then
tmp = 1.0d0 + ((x / y) / (t - y))
else if (y <= 1.85d-85) then
tmp = 1.0d0 + ((x / t) / (y - z))
else
tmp = 1.0d0 + (x / (y * (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 (y <= -3.9e-17) {
tmp = 1.0 + ((x / y) / (t - y));
} else if (y <= 1.85e-85) {
tmp = 1.0 + ((x / t) / (y - z));
} else {
tmp = 1.0 + (x / (y * (z - y)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -3.9e-17: tmp = 1.0 + ((x / y) / (t - y)) elif y <= 1.85e-85: tmp = 1.0 + ((x / t) / (y - z)) else: tmp = 1.0 + (x / (y * (z - y))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -3.9e-17) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(t - y))); elseif (y <= 1.85e-85) tmp = Float64(1.0 + Float64(Float64(x / t) / Float64(y - z))); else tmp = Float64(1.0 + Float64(x / Float64(y * 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 (y <= -3.9e-17)
tmp = 1.0 + ((x / y) / (t - y));
elseif (y <= 1.85e-85)
tmp = 1.0 + ((x / t) / (y - z));
else
tmp = 1.0 + (x / (y * (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[y, -3.9e-17], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e-85], N[(1.0 + N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x / N[(y * 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}\;y \leq -3.9 \cdot 10^{-17}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{t - y}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-85}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{x}{y \cdot \left(z - y\right)}\\
\end{array}
\end{array}
if y < -3.89999999999999989e-17Initial program 99.9%
Taylor expanded in z around 0 96.8%
sub-neg96.8%
associate-/r*96.9%
distribute-neg-frac296.9%
neg-sub096.9%
sub-neg96.9%
+-commutative96.9%
associate--r+96.9%
neg-sub096.9%
remove-double-neg96.9%
Simplified96.9%
if -3.89999999999999989e-17 < y < 1.84999999999999992e-85Initial program 95.5%
Taylor expanded in t around inf 83.8%
associate-/r*86.1%
Simplified86.1%
if 1.84999999999999992e-85 < y Initial program 99.9%
clear-num100.0%
inv-pow100.0%
associate-/l*100.0%
Applied egg-rr100.0%
unpow-1100.0%
Simplified100.0%
Taylor expanded in t around 0 97.7%
Final simplification92.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 (<= z -7.2e-94)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= z 8.8e-280)
(+ 1.0 (/ (/ x y) (- t y)))
(+ 1.0 (/ (/ x t) (- y z))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.2e-94) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 8.8e-280) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 + ((x / t) / (y - z));
}
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 (z <= (-7.2d-94)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (z <= 8.8d-280) then
tmp = 1.0d0 + ((x / y) / (t - y))
else
tmp = 1.0d0 + ((x / t) / (y - z))
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 (z <= -7.2e-94) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 8.8e-280) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 + ((x / t) / (y - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -7.2e-94: tmp = 1.0 + ((x / z) / (y - t)) elif z <= 8.8e-280: tmp = 1.0 + ((x / y) / (t - y)) else: tmp = 1.0 + ((x / t) / (y - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -7.2e-94) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (z <= 8.8e-280) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(t - y))); else tmp = Float64(1.0 + Float64(Float64(x / t) / Float64(y - z))); 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 (z <= -7.2e-94)
tmp = 1.0 + ((x / z) / (y - t));
elseif (z <= 8.8e-280)
tmp = 1.0 + ((x / y) / (t - y));
else
tmp = 1.0 + ((x / t) / (y - z));
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[z, -7.2e-94], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e-280], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{-94}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-280}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{t - y}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if z < -7.2e-94Initial program 99.9%
Taylor expanded in z around inf 96.0%
associate-/r*96.0%
Simplified96.0%
if -7.2e-94 < z < 8.8000000000000004e-280Initial program 94.4%
Taylor expanded in z around 0 87.9%
sub-neg87.9%
associate-/r*81.3%
distribute-neg-frac281.3%
neg-sub081.3%
sub-neg81.3%
+-commutative81.3%
associate--r+81.3%
neg-sub081.3%
remove-double-neg81.3%
Simplified81.3%
if 8.8000000000000004e-280 < z Initial program 98.3%
Taylor expanded in t around inf 79.3%
associate-/r*80.1%
Simplified80.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 (<= y -1.26e-82) 1.0 (if (<= y 1.4e-57) (+ 1.0 (/ (/ x t) (- y z))) (- 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 (y <= -1.26e-82) {
tmp = 1.0;
} else if (y <= 1.4e-57) {
tmp = 1.0 + ((x / t) / (y - z));
} 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 (y <= (-1.26d-82)) then
tmp = 1.0d0
else if (y <= 1.4d-57) then
tmp = 1.0d0 + ((x / t) / (y - z))
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 (y <= -1.26e-82) {
tmp = 1.0;
} else if (y <= 1.4e-57) {
tmp = 1.0 + ((x / t) / (y - z));
} 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 y <= -1.26e-82: tmp = 1.0 elif y <= 1.4e-57: tmp = 1.0 + ((x / t) / (y - z)) 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 (y <= -1.26e-82) tmp = 1.0; elseif (y <= 1.4e-57) tmp = Float64(1.0 + Float64(Float64(x / t) / Float64(y - z))); 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 (y <= -1.26e-82)
tmp = 1.0;
elseif (y <= 1.4e-57)
tmp = 1.0 + ((x / t) / (y - z));
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[y, -1.26e-82], 1.0, If[LessEqual[y, 1.4e-57], N[(1.0 + N[(N[(x / t), $MachinePrecision] / N[(y - z), $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}\;y \leq -1.26 \cdot 10^{-82}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-57}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < -1.25999999999999993e-82Initial program 99.9%
Taylor expanded in x around 0 87.3%
if -1.25999999999999993e-82 < y < 1.4e-57Initial program 95.1%
Taylor expanded in t around inf 86.1%
associate-/r*88.5%
Simplified88.5%
if 1.4e-57 < y Initial program 99.9%
clear-num100.0%
inv-pow100.0%
associate-/l*100.0%
Applied egg-rr100.0%
unpow-1100.0%
Simplified100.0%
Taylor expanded in t around 0 99.9%
*-un-lft-identity99.9%
times-frac100.0%
Applied egg-rr100.0%
associate-*l/100.0%
*-lft-identity100.0%
Simplified100.0%
Taylor expanded in y around inf 94.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 (<= y -1.02e-82) 1.0 (if (<= y 3e-58) (- 1.0 (/ (/ x z) 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 (y <= -1.02e-82) {
tmp = 1.0;
} else if (y <= 3e-58) {
tmp = 1.0 - ((x / z) / 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 (y <= (-1.02d-82)) then
tmp = 1.0d0
else if (y <= 3d-58) then
tmp = 1.0d0 - ((x / z) / 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 (y <= -1.02e-82) {
tmp = 1.0;
} else if (y <= 3e-58) {
tmp = 1.0 - ((x / z) / 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 y <= -1.02e-82: tmp = 1.0 elif y <= 3e-58: tmp = 1.0 - ((x / z) / 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 (y <= -1.02e-82) tmp = 1.0; elseif (y <= 3e-58) tmp = Float64(1.0 - Float64(Float64(x / z) / 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 (y <= -1.02e-82)
tmp = 1.0;
elseif (y <= 3e-58)
tmp = 1.0 - ((x / z) / 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[y, -1.02e-82], 1.0, If[LessEqual[y, 3e-58], N[(1.0 - N[(N[(x / z), $MachinePrecision] / t), $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}\;y \leq -1.02 \cdot 10^{-82}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-58}:\\
\;\;\;\;1 - \frac{\frac{x}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < -1.02000000000000007e-82Initial program 99.9%
Taylor expanded in x around 0 87.3%
if -1.02000000000000007e-82 < y < 3.00000000000000008e-58Initial program 95.1%
Taylor expanded in z around inf 80.1%
associate-/r*81.2%
Simplified81.2%
Taylor expanded in y around 0 71.6%
neg-mul-171.6%
Simplified71.6%
if 3.00000000000000008e-58 < y Initial program 99.9%
clear-num100.0%
inv-pow100.0%
associate-/l*100.0%
Applied egg-rr100.0%
unpow-1100.0%
Simplified100.0%
Taylor expanded in t around 0 99.9%
*-un-lft-identity99.9%
times-frac100.0%
Applied egg-rr100.0%
associate-*l/100.0%
*-lft-identity100.0%
Simplified100.0%
Taylor expanded in y around inf 94.7%
Final simplification83.3%
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 -5e-83) 1.0 (if (<= y 1.4e-57) (- 1.0 (/ x (* t z))) (- 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 (y <= -5e-83) {
tmp = 1.0;
} else if (y <= 1.4e-57) {
tmp = 1.0 - (x / (t * z));
} 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 (y <= (-5d-83)) then
tmp = 1.0d0
else if (y <= 1.4d-57) then
tmp = 1.0d0 - (x / (t * z))
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 (y <= -5e-83) {
tmp = 1.0;
} else if (y <= 1.4e-57) {
tmp = 1.0 - (x / (t * z));
} 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 y <= -5e-83: tmp = 1.0 elif y <= 1.4e-57: tmp = 1.0 - (x / (t * z)) 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 (y <= -5e-83) tmp = 1.0; elseif (y <= 1.4e-57) tmp = Float64(1.0 - Float64(x / Float64(t * z))); 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 (y <= -5e-83)
tmp = 1.0;
elseif (y <= 1.4e-57)
tmp = 1.0 - (x / (t * z));
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[y, -5e-83], 1.0, If[LessEqual[y, 1.4e-57], N[(1.0 - N[(x / N[(t * z), $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}\;y \leq -5 \cdot 10^{-83}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-57}:\\
\;\;\;\;1 - \frac{x}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < -5e-83Initial program 99.9%
Taylor expanded in x around 0 87.3%
if -5e-83 < y < 1.4e-57Initial program 95.1%
Taylor expanded in y around 0 71.1%
if 1.4e-57 < y Initial program 99.9%
clear-num100.0%
inv-pow100.0%
associate-/l*100.0%
Applied egg-rr100.0%
unpow-1100.0%
Simplified100.0%
Taylor expanded in t around 0 99.9%
*-un-lft-identity99.9%
times-frac100.0%
Applied egg-rr100.0%
associate-*l/100.0%
*-lft-identity100.0%
Simplified100.0%
Taylor expanded in y around inf 94.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 (<= y -5.8e-83) 1.0 (if (<= y 1.25e-57) (- 1.0 (/ x (* t z))) (- 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 (y <= -5.8e-83) {
tmp = 1.0;
} else if (y <= 1.25e-57) {
tmp = 1.0 - (x / (t * z));
} 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 (y <= (-5.8d-83)) then
tmp = 1.0d0
else if (y <= 1.25d-57) then
tmp = 1.0d0 - (x / (t * z))
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 (y <= -5.8e-83) {
tmp = 1.0;
} else if (y <= 1.25e-57) {
tmp = 1.0 - (x / (t * z));
} 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 y <= -5.8e-83: tmp = 1.0 elif y <= 1.25e-57: tmp = 1.0 - (x / (t * z)) 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 (y <= -5.8e-83) tmp = 1.0; elseif (y <= 1.25e-57) tmp = Float64(1.0 - Float64(x / Float64(t * z))); else tmp = Float64(1.0 - Float64(x / Float64(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 (y <= -5.8e-83)
tmp = 1.0;
elseif (y <= 1.25e-57)
tmp = 1.0 - (x / (t * z));
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[y, -5.8e-83], 1.0, If[LessEqual[y, 1.25e-57], N[(1.0 - N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{-83}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-57}:\\
\;\;\;\;1 - \frac{x}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < -5.7999999999999998e-83Initial program 99.9%
Taylor expanded in x around 0 87.3%
if -5.7999999999999998e-83 < y < 1.25e-57Initial program 95.1%
Taylor expanded in y around 0 71.1%
if 1.25e-57 < y Initial program 99.9%
clear-num100.0%
inv-pow100.0%
associate-/l*100.0%
Applied egg-rr100.0%
unpow-1100.0%
Simplified100.0%
Taylor expanded in t around 0 99.9%
Taylor expanded in y around inf 94.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 (<= y -5.2e-83) 1.0 (if (<= y 9e-97) (- 1.0 (/ 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 (y <= -5.2e-83) {
tmp = 1.0;
} else if (y <= 9e-97) {
tmp = 1.0 - (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 (y <= (-5.2d-83)) then
tmp = 1.0d0
else if (y <= 9d-97) then
tmp = 1.0d0 - (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 (y <= -5.2e-83) {
tmp = 1.0;
} else if (y <= 9e-97) {
tmp = 1.0 - (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 y <= -5.2e-83: tmp = 1.0 elif y <= 9e-97: tmp = 1.0 - (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 (y <= -5.2e-83) tmp = 1.0; elseif (y <= 9e-97) tmp = Float64(1.0 - Float64(x / Float64(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 (y <= -5.2e-83)
tmp = 1.0;
elseif (y <= 9e-97)
tmp = 1.0 - (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[y, -5.2e-83], 1.0, If[LessEqual[y, 9e-97], N[(1.0 - N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-83}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-97}:\\
\;\;\;\;1 - \frac{x}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -5.20000000000000018e-83 or 9.0000000000000002e-97 < y Initial program 99.9%
Taylor expanded in x around 0 87.4%
if -5.20000000000000018e-83 < y < 9.0000000000000002e-97Initial program 94.5%
Taylor expanded in y around 0 72.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 (/ x (* (- y t) (- z y)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0 + (x / ((y - t) * (z - y)));
}
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 - t) * (z - y)))
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 - t) * (z - y)));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0 + (x / ((y - t) * (z - y)))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(1.0 + Float64(x / Float64(Float64(y - t) * Float64(z - y)))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 + (x / ((y - t) * (z - y)));
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 - t), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 + \frac{x}{\left(y - t\right) \cdot \left(z - y\right)}
\end{array}
Initial program 98.0%
Final simplification98.0%
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.0%
Taylor expanded in x around 0 71.9%
herbie shell --seed 2024151
(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)))))