
(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: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t 5.2e+70) (+ 1.0 (/ (/ x (- z y)) (- y t))) (+ 1.0 (/ (/ x t) (- y z)))))
assert(z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 5.2e+70) {
tmp = 1.0 + ((x / (z - y)) / (y - t));
} else {
tmp = 1.0 + ((x / t) / (y - z));
}
return tmp;
}
NOTE: 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 <= 5.2d+70) then
tmp = 1.0d0 + ((x / (z - y)) / (y - t))
else
tmp = 1.0d0 + ((x / t) / (y - z))
end if
code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 5.2e+70) {
tmp = 1.0 + ((x / (z - y)) / (y - t));
} else {
tmp = 1.0 + ((x / t) / (y - z));
}
return tmp;
}
[z, t] = sort([z, t]) def code(x, y, z, t): tmp = 0 if t <= 5.2e+70: tmp = 1.0 + ((x / (z - y)) / (y - t)) else: tmp = 1.0 + ((x / t) / (y - z)) return tmp
z, t = sort([z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 5.2e+70) tmp = Float64(1.0 + Float64(Float64(x / Float64(z - y)) / Float64(y - t))); else tmp = Float64(1.0 + Float64(Float64(x / t) / Float64(y - z))); end return tmp end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 5.2e+70)
tmp = 1.0 + ((x / (z - y)) / (y - t));
else
tmp = 1.0 + ((x / t) / (y - z));
end
tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 5.2e+70], N[(1.0 + N[(N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5.2 \cdot 10^{+70}:\\
\;\;\;\;1 + \frac{\frac{x}{z - y}}{y - t}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 5.2000000000000001e70Initial program 98.5%
sub-neg98.5%
distribute-frac-neg98.5%
*-lft-identity98.5%
associate-/r*99.0%
associate-*r/99.0%
metadata-eval99.0%
times-frac99.0%
neg-mul-199.0%
remove-double-neg99.0%
neg-mul-199.0%
sub-neg99.0%
+-commutative99.0%
distribute-neg-out99.0%
remove-double-neg99.0%
sub-neg99.0%
Simplified99.0%
if 5.2000000000000001e70 < t Initial program 100.0%
Taylor expanded in t around inf 100.0%
mul-1-neg100.0%
associate-/r*100.0%
distribute-neg-frac100.0%
distribute-frac-neg100.0%
Simplified100.0%
Final simplification99.2%
NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -5e-40) (- 1.0 (/ (/ x y) y)) (if (<= y 4.6e+20) (+ 1.0 (/ x (* (- y t) z))) 1.0)))
assert(z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5e-40) {
tmp = 1.0 - ((x / y) / y);
} else if (y <= 4.6e+20) {
tmp = 1.0 + (x / ((y - t) * z));
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: 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-40)) then
tmp = 1.0d0 - ((x / y) / y)
else if (y <= 4.6d+20) then
tmp = 1.0d0 + (x / ((y - t) * z))
else
tmp = 1.0d0
end if
code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5e-40) {
tmp = 1.0 - ((x / y) / y);
} else if (y <= 4.6e+20) {
tmp = 1.0 + (x / ((y - t) * z));
} else {
tmp = 1.0;
}
return tmp;
}
[z, t] = sort([z, t]) def code(x, y, z, t): tmp = 0 if y <= -5e-40: tmp = 1.0 - ((x / y) / y) elif y <= 4.6e+20: tmp = 1.0 + (x / ((y - t) * z)) else: tmp = 1.0 return tmp
z, t = sort([z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -5e-40) tmp = Float64(1.0 - Float64(Float64(x / y) / y)); elseif (y <= 4.6e+20) tmp = Float64(1.0 + Float64(x / Float64(Float64(y - t) * z))); else tmp = 1.0; end return tmp end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -5e-40)
tmp = 1.0 - ((x / y) / y);
elseif (y <= 4.6e+20)
tmp = 1.0 + (x / ((y - t) * z));
else
tmp = 1.0;
end
tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -5e-40], N[(1.0 - N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+20], N[(1.0 + N[(x / N[(N[(y - t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-40}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+20}:\\
\;\;\;\;1 + \frac{x}{\left(y - t\right) \cdot z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -4.99999999999999965e-40Initial program 100.0%
clear-num100.0%
associate-/r/100.0%
*-commutative100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 97.2%
associate-/r*97.2%
Simplified97.2%
Taylor expanded in y around inf 97.2%
if -4.99999999999999965e-40 < y < 4.6e20Initial program 97.6%
sub-neg97.6%
distribute-frac-neg97.6%
*-lft-identity97.6%
associate-/r*98.5%
associate-*r/98.5%
metadata-eval98.5%
times-frac98.5%
neg-mul-198.5%
remove-double-neg98.5%
neg-mul-198.5%
sub-neg98.5%
+-commutative98.5%
distribute-neg-out98.5%
remove-double-neg98.5%
sub-neg98.5%
Simplified98.5%
Taylor expanded in z around inf 80.8%
if 4.6e20 < y Initial program 100.0%
Taylor expanded in y around 0 60.2%
add-sqr-sqrt36.3%
sqrt-unprod53.6%
sqr-neg53.6%
sqrt-unprod23.1%
add-sqr-sqrt59.0%
distribute-frac-neg59.0%
Applied egg-rr59.0%
Taylor expanded in x around 0 98.0%
Final simplification88.8%
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= z -1.36e-76)
(+ 1.0 (/ x (* (- y t) z)))
(if (<= z 1.45e-177)
(- 1.0 (/ x (* y (- y t))))
(+ 1.0 (/ (/ x (- y t)) z)))))assert(z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.36e-76) {
tmp = 1.0 + (x / ((y - t) * z));
} else if (z <= 1.45e-177) {
tmp = 1.0 - (x / (y * (y - t)));
} else {
tmp = 1.0 + ((x / (y - t)) / z);
}
return tmp;
}
NOTE: 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 <= (-1.36d-76)) then
tmp = 1.0d0 + (x / ((y - t) * z))
else if (z <= 1.45d-177) then
tmp = 1.0d0 - (x / (y * (y - t)))
else
tmp = 1.0d0 + ((x / (y - t)) / z)
end if
code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.36e-76) {
tmp = 1.0 + (x / ((y - t) * z));
} else if (z <= 1.45e-177) {
tmp = 1.0 - (x / (y * (y - t)));
} else {
tmp = 1.0 + ((x / (y - t)) / z);
}
return tmp;
}
[z, t] = sort([z, t]) def code(x, y, z, t): tmp = 0 if z <= -1.36e-76: tmp = 1.0 + (x / ((y - t) * z)) elif z <= 1.45e-177: tmp = 1.0 - (x / (y * (y - t))) else: tmp = 1.0 + ((x / (y - t)) / z) return tmp
z, t = sort([z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -1.36e-76) tmp = Float64(1.0 + Float64(x / Float64(Float64(y - t) * z))); elseif (z <= 1.45e-177) tmp = Float64(1.0 - Float64(x / Float64(y * Float64(y - t)))); else tmp = Float64(1.0 + Float64(Float64(x / Float64(y - t)) / z)); end return tmp end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -1.36e-76)
tmp = 1.0 + (x / ((y - t) * z));
elseif (z <= 1.45e-177)
tmp = 1.0 - (x / (y * (y - t)));
else
tmp = 1.0 + ((x / (y - t)) / z);
end
tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[z, -1.36e-76], N[(1.0 + N[(x / N[(N[(y - t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e-177], N[(1.0 - N[(x / N[(y * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.36 \cdot 10^{-76}:\\
\;\;\;\;1 + \frac{x}{\left(y - t\right) \cdot z}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-177}:\\
\;\;\;\;1 - \frac{x}{y \cdot \left(y - t\right)}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{x}{y - t}}{z}\\
\end{array}
\end{array}
if z < -1.35999999999999993e-76Initial program 99.9%
sub-neg99.9%
distribute-frac-neg99.9%
*-lft-identity99.9%
associate-/r*100.0%
associate-*r/100.0%
metadata-eval100.0%
times-frac100.0%
neg-mul-1100.0%
remove-double-neg100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 95.1%
if -1.35999999999999993e-76 < z < 1.44999999999999999e-177Initial program 97.3%
Taylor expanded in z around 0 87.1%
if 1.44999999999999999e-177 < z Initial program 99.0%
sub-neg99.0%
distribute-frac-neg99.0%
*-lft-identity99.0%
associate-/r*99.0%
associate-*r/99.0%
metadata-eval99.0%
times-frac99.0%
neg-mul-199.0%
remove-double-neg99.0%
neg-mul-199.0%
sub-neg99.0%
+-commutative99.0%
distribute-neg-out99.0%
remove-double-neg99.0%
sub-neg99.0%
Simplified99.0%
Taylor expanded in z around inf 92.0%
Taylor expanded in x around 0 91.1%
associate-/r*84.1%
Simplified84.1%
Final simplification88.1%
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (- y t))))
(if (<= z -1.36e-76)
(+ 1.0 (/ x (* (- y t) z)))
(if (<= z 1.5e-177) (- 1.0 (/ t_1 y)) (+ 1.0 (/ t_1 z))))))assert(z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (y - t);
double tmp;
if (z <= -1.36e-76) {
tmp = 1.0 + (x / ((y - t) * z));
} else if (z <= 1.5e-177) {
tmp = 1.0 - (t_1 / y);
} else {
tmp = 1.0 + (t_1 / z);
}
return tmp;
}
NOTE: 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 = x / (y - t)
if (z <= (-1.36d-76)) then
tmp = 1.0d0 + (x / ((y - t) * z))
else if (z <= 1.5d-177) then
tmp = 1.0d0 - (t_1 / y)
else
tmp = 1.0d0 + (t_1 / z)
end if
code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / (y - t);
double tmp;
if (z <= -1.36e-76) {
tmp = 1.0 + (x / ((y - t) * z));
} else if (z <= 1.5e-177) {
tmp = 1.0 - (t_1 / y);
} else {
tmp = 1.0 + (t_1 / z);
}
return tmp;
}
[z, t] = sort([z, t]) def code(x, y, z, t): t_1 = x / (y - t) tmp = 0 if z <= -1.36e-76: tmp = 1.0 + (x / ((y - t) * z)) elif z <= 1.5e-177: tmp = 1.0 - (t_1 / y) else: tmp = 1.0 + (t_1 / z) return tmp
z, t = sort([z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(y - t)) tmp = 0.0 if (z <= -1.36e-76) tmp = Float64(1.0 + Float64(x / Float64(Float64(y - t) * z))); elseif (z <= 1.5e-177) tmp = Float64(1.0 - Float64(t_1 / y)); else tmp = Float64(1.0 + Float64(t_1 / z)); end return tmp end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / (y - t);
tmp = 0.0;
if (z <= -1.36e-76)
tmp = 1.0 + (x / ((y - t) * z));
elseif (z <= 1.5e-177)
tmp = 1.0 - (t_1 / y);
else
tmp = 1.0 + (t_1 / z);
end
tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.36e-76], N[(1.0 + N[(x / N[(N[(y - t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-177], N[(1.0 - N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{y - t}\\
\mathbf{if}\;z \leq -1.36 \cdot 10^{-76}:\\
\;\;\;\;1 + \frac{x}{\left(y - t\right) \cdot z}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-177}:\\
\;\;\;\;1 - \frac{t_1}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{t_1}{z}\\
\end{array}
\end{array}
if z < -1.35999999999999993e-76Initial program 99.9%
sub-neg99.9%
distribute-frac-neg99.9%
*-lft-identity99.9%
associate-/r*100.0%
associate-*r/100.0%
metadata-eval100.0%
times-frac100.0%
neg-mul-1100.0%
remove-double-neg100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 95.1%
if -1.35999999999999993e-76 < z < 1.50000000000000004e-177Initial program 97.3%
clear-num97.3%
associate-/r/97.3%
*-commutative97.3%
associate-/r*97.3%
Applied egg-rr97.3%
Taylor expanded in z around 0 87.1%
associate-/r*88.4%
Simplified88.4%
if 1.50000000000000004e-177 < z Initial program 99.0%
sub-neg99.0%
distribute-frac-neg99.0%
*-lft-identity99.0%
associate-/r*99.0%
associate-*r/99.0%
metadata-eval99.0%
times-frac99.0%
neg-mul-199.0%
remove-double-neg99.0%
neg-mul-199.0%
sub-neg99.0%
+-commutative99.0%
distribute-neg-out99.0%
remove-double-neg99.0%
sub-neg99.0%
Simplified99.0%
Taylor expanded in z around inf 92.0%
Taylor expanded in x around 0 91.1%
associate-/r*84.1%
Simplified84.1%
Final simplification88.5%
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -1e-261)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= t 1.9e-73)
(- 1.0 (/ (/ x y) (- y z)))
(+ 1.0 (/ (/ x t) (- y z))))))assert(z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1e-261) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (t <= 1.9e-73) {
tmp = 1.0 - ((x / y) / (y - z));
} else {
tmp = 1.0 + ((x / t) / (y - z));
}
return tmp;
}
NOTE: 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 <= (-1d-261)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (t <= 1.9d-73) then
tmp = 1.0d0 - ((x / y) / (y - z))
else
tmp = 1.0d0 + ((x / t) / (y - z))
end if
code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1e-261) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (t <= 1.9e-73) {
tmp = 1.0 - ((x / y) / (y - z));
} else {
tmp = 1.0 + ((x / t) / (y - z));
}
return tmp;
}
[z, t] = sort([z, t]) def code(x, y, z, t): tmp = 0 if t <= -1e-261: tmp = 1.0 + ((x / z) / (y - t)) elif t <= 1.9e-73: tmp = 1.0 - ((x / y) / (y - z)) else: tmp = 1.0 + ((x / t) / (y - z)) return tmp
z, t = sort([z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -1e-261) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (t <= 1.9e-73) tmp = Float64(1.0 - Float64(Float64(x / y) / Float64(y - z))); else tmp = Float64(1.0 + Float64(Float64(x / t) / Float64(y - z))); end return tmp end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -1e-261)
tmp = 1.0 + ((x / z) / (y - t));
elseif (t <= 1.9e-73)
tmp = 1.0 - ((x / y) / (y - z));
else
tmp = 1.0 + ((x / t) / (y - z));
end
tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -1e-261], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-73], N[(1.0 - N[(N[(x / y), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-261}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-73}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -9.99999999999999984e-262Initial program 99.1%
sub-neg99.1%
distribute-frac-neg99.1%
*-lft-identity99.1%
associate-/r*98.5%
associate-*r/98.5%
metadata-eval98.5%
times-frac98.5%
neg-mul-198.5%
remove-double-neg98.5%
neg-mul-198.5%
sub-neg98.5%
+-commutative98.5%
distribute-neg-out98.5%
remove-double-neg98.5%
sub-neg98.5%
Simplified98.5%
Taylor expanded in z around inf 84.1%
if -9.99999999999999984e-262 < t < 1.9000000000000001e-73Initial program 96.4%
*-commutative96.4%
associate-/r*92.9%
Simplified92.9%
Taylor expanded in y around inf 87.5%
if 1.9000000000000001e-73 < t Initial program 100.0%
Taylor expanded in t around inf 99.6%
mul-1-neg99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
distribute-frac-neg99.6%
Simplified99.6%
Final simplification89.2%
NOTE: 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 t)) (- y z)) x)))
assert(z < t);
double code(double x, double y, double z, double t) {
return 1.0 - (((1.0 / (y - t)) / (y - z)) * x);
}
NOTE: 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 - t)) / (y - z)) * x)
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
return 1.0 - (((1.0 / (y - t)) / (y - z)) * x);
}
[z, t] = sort([z, t]) def code(x, y, z, t): return 1.0 - (((1.0 / (y - t)) / (y - z)) * x)
z, t = sort([z, t]) function code(x, y, z, t) return Float64(1.0 - Float64(Float64(Float64(1.0 / Float64(y - t)) / Float64(y - z)) * x)) end
z, t = num2cell(sort([z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 - (((1.0 / (y - t)) / (y - z)) * x);
end
NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(1.0 - N[(N[(N[(1.0 / N[(y - t), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
1 - \frac{\frac{1}{y - t}}{y - z} \cdot x
\end{array}
Initial program 98.7%
clear-num98.7%
associate-/r/98.7%
*-commutative98.7%
associate-/r*98.7%
Applied egg-rr98.7%
Final simplification98.7%
NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -5e-45) 1.0 (if (<= y 2.1e-99) (- 1.0 (/ x (* t z))) 1.0)))
assert(z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5e-45) {
tmp = 1.0;
} else if (y <= 2.1e-99) {
tmp = 1.0 - (x / (t * z));
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: 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-45)) then
tmp = 1.0d0
else if (y <= 2.1d-99) then
tmp = 1.0d0 - (x / (t * z))
else
tmp = 1.0d0
end if
code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5e-45) {
tmp = 1.0;
} else if (y <= 2.1e-99) {
tmp = 1.0 - (x / (t * z));
} else {
tmp = 1.0;
}
return tmp;
}
[z, t] = sort([z, t]) def code(x, y, z, t): tmp = 0 if y <= -5e-45: tmp = 1.0 elif y <= 2.1e-99: tmp = 1.0 - (x / (t * z)) else: tmp = 1.0 return tmp
z, t = sort([z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -5e-45) tmp = 1.0; elseif (y <= 2.1e-99) tmp = Float64(1.0 - Float64(x / Float64(t * z))); else tmp = 1.0; end return tmp end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -5e-45)
tmp = 1.0;
elseif (y <= 2.1e-99)
tmp = 1.0 - (x / (t * z));
else
tmp = 1.0;
end
tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -5e-45], 1.0, If[LessEqual[y, 2.1e-99], N[(1.0 - N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-45}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-99}:\\
\;\;\;\;1 - \frac{x}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -4.99999999999999976e-45 or 2.09999999999999984e-99 < y Initial program 100.0%
Taylor expanded in y around 0 57.1%
add-sqr-sqrt35.9%
sqrt-unprod51.3%
sqr-neg51.3%
sqrt-unprod20.1%
add-sqr-sqrt54.5%
distribute-frac-neg54.5%
Applied egg-rr54.5%
Taylor expanded in x around 0 87.1%
if -4.99999999999999976e-45 < y < 2.09999999999999984e-99Initial program 96.9%
Taylor expanded in y around 0 73.5%
Final simplification81.6%
NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -2.25e-42) (- 1.0 (/ x (* y y))) (if (<= y 3.3e-100) (- 1.0 (/ x (* t z))) 1.0)))
assert(z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.25e-42) {
tmp = 1.0 - (x / (y * y));
} else if (y <= 3.3e-100) {
tmp = 1.0 - (x / (t * z));
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: 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 <= (-2.25d-42)) then
tmp = 1.0d0 - (x / (y * y))
else if (y <= 3.3d-100) then
tmp = 1.0d0 - (x / (t * z))
else
tmp = 1.0d0
end if
code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.25e-42) {
tmp = 1.0 - (x / (y * y));
} else if (y <= 3.3e-100) {
tmp = 1.0 - (x / (t * z));
} else {
tmp = 1.0;
}
return tmp;
}
[z, t] = sort([z, t]) def code(x, y, z, t): tmp = 0 if y <= -2.25e-42: tmp = 1.0 - (x / (y * y)) elif y <= 3.3e-100: tmp = 1.0 - (x / (t * z)) else: tmp = 1.0 return tmp
z, t = sort([z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -2.25e-42) tmp = Float64(1.0 - Float64(x / Float64(y * y))); elseif (y <= 3.3e-100) tmp = Float64(1.0 - Float64(x / Float64(t * z))); else tmp = 1.0; end return tmp end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -2.25e-42)
tmp = 1.0 - (x / (y * y));
elseif (y <= 3.3e-100)
tmp = 1.0 - (x / (t * z));
else
tmp = 1.0;
end
tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -2.25e-42], N[(1.0 - N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e-100], N[(1.0 - N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{-42}:\\
\;\;\;\;1 - \frac{x}{y \cdot y}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-100}:\\
\;\;\;\;1 - \frac{x}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -2.25e-42Initial program 100.0%
Taylor expanded in y around inf 97.2%
unpow297.2%
Simplified97.2%
if -2.25e-42 < y < 3.29999999999999996e-100Initial program 96.9%
Taylor expanded in y around 0 73.5%
if 3.29999999999999996e-100 < y Initial program 99.9%
Taylor expanded in y around 0 57.3%
add-sqr-sqrt34.5%
sqrt-unprod49.5%
sqr-neg49.5%
sqrt-unprod19.7%
add-sqr-sqrt52.9%
distribute-frac-neg52.9%
Applied egg-rr52.9%
Taylor expanded in x around 0 81.7%
Final simplification82.7%
NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -5.2e-39) (- 1.0 (/ x (* y y))) (if (<= y 1.55e-97) (- 1.0 (/ (/ x t) z)) 1.0)))
assert(z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e-39) {
tmp = 1.0 - (x / (y * y));
} else if (y <= 1.55e-97) {
tmp = 1.0 - ((x / t) / z);
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: 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-39)) then
tmp = 1.0d0 - (x / (y * y))
else if (y <= 1.55d-97) then
tmp = 1.0d0 - ((x / t) / z)
else
tmp = 1.0d0
end if
code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e-39) {
tmp = 1.0 - (x / (y * y));
} else if (y <= 1.55e-97) {
tmp = 1.0 - ((x / t) / z);
} else {
tmp = 1.0;
}
return tmp;
}
[z, t] = sort([z, t]) def code(x, y, z, t): tmp = 0 if y <= -5.2e-39: tmp = 1.0 - (x / (y * y)) elif y <= 1.55e-97: tmp = 1.0 - ((x / t) / z) else: tmp = 1.0 return tmp
z, t = sort([z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -5.2e-39) tmp = Float64(1.0 - Float64(x / Float64(y * y))); elseif (y <= 1.55e-97) tmp = Float64(1.0 - Float64(Float64(x / t) / z)); else tmp = 1.0; end return tmp end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -5.2e-39)
tmp = 1.0 - (x / (y * y));
elseif (y <= 1.55e-97)
tmp = 1.0 - ((x / t) / z);
else
tmp = 1.0;
end
tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -5.2e-39], N[(1.0 - N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-97], N[(1.0 - N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-39}:\\
\;\;\;\;1 - \frac{x}{y \cdot y}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-97}:\\
\;\;\;\;1 - \frac{\frac{x}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -5.2e-39Initial program 100.0%
Taylor expanded in y around inf 97.2%
unpow297.2%
Simplified97.2%
if -5.2e-39 < y < 1.55000000000000001e-97Initial program 96.9%
clear-num96.9%
associate-/r/97.0%
*-commutative97.0%
associate-/r*97.0%
Applied egg-rr97.0%
Taylor expanded in y around 0 73.5%
associate-/r*73.5%
Simplified73.5%
*-commutative73.5%
associate-*r/70.6%
div-inv70.7%
Applied egg-rr70.7%
if 1.55000000000000001e-97 < y Initial program 99.9%
Taylor expanded in y around 0 57.3%
add-sqr-sqrt34.5%
sqrt-unprod49.5%
sqr-neg49.5%
sqrt-unprod19.7%
add-sqr-sqrt52.9%
distribute-frac-neg52.9%
Applied egg-rr52.9%
Taylor expanded in x around 0 81.7%
Final simplification81.5%
NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -5.5e-41) (- 1.0 (/ (/ x y) y)) (if (<= y 3.8e-96) (- 1.0 (/ (/ x t) z)) 1.0)))
assert(z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.5e-41) {
tmp = 1.0 - ((x / y) / y);
} else if (y <= 3.8e-96) {
tmp = 1.0 - ((x / t) / z);
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: 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.5d-41)) then
tmp = 1.0d0 - ((x / y) / y)
else if (y <= 3.8d-96) then
tmp = 1.0d0 - ((x / t) / z)
else
tmp = 1.0d0
end if
code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.5e-41) {
tmp = 1.0 - ((x / y) / y);
} else if (y <= 3.8e-96) {
tmp = 1.0 - ((x / t) / z);
} else {
tmp = 1.0;
}
return tmp;
}
[z, t] = sort([z, t]) def code(x, y, z, t): tmp = 0 if y <= -5.5e-41: tmp = 1.0 - ((x / y) / y) elif y <= 3.8e-96: tmp = 1.0 - ((x / t) / z) else: tmp = 1.0 return tmp
z, t = sort([z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -5.5e-41) tmp = Float64(1.0 - Float64(Float64(x / y) / y)); elseif (y <= 3.8e-96) tmp = Float64(1.0 - Float64(Float64(x / t) / z)); else tmp = 1.0; end return tmp end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -5.5e-41)
tmp = 1.0 - ((x / y) / y);
elseif (y <= 3.8e-96)
tmp = 1.0 - ((x / t) / z);
else
tmp = 1.0;
end
tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -5.5e-41], N[(1.0 - N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e-96], N[(1.0 - N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-41}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-96}:\\
\;\;\;\;1 - \frac{\frac{x}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -5.50000000000000022e-41Initial program 100.0%
clear-num100.0%
associate-/r/100.0%
*-commutative100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 97.2%
associate-/r*97.2%
Simplified97.2%
Taylor expanded in y around inf 97.2%
if -5.50000000000000022e-41 < y < 3.8000000000000001e-96Initial program 96.9%
clear-num96.9%
associate-/r/97.0%
*-commutative97.0%
associate-/r*97.0%
Applied egg-rr97.0%
Taylor expanded in y around 0 73.5%
associate-/r*73.5%
Simplified73.5%
*-commutative73.5%
associate-*r/70.6%
div-inv70.7%
Applied egg-rr70.7%
if 3.8000000000000001e-96 < y Initial program 99.9%
Taylor expanded in y around 0 57.3%
add-sqr-sqrt34.5%
sqrt-unprod49.5%
sqr-neg49.5%
sqrt-unprod19.7%
add-sqr-sqrt52.9%
distribute-frac-neg52.9%
Applied egg-rr52.9%
Taylor expanded in x around 0 81.7%
Final simplification81.5%
NOTE: 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) (- y z)))))
assert(z < t);
double code(double x, double y, double z, double t) {
return 1.0 - (x / ((y - t) * (y - z)));
}
NOTE: 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) * (y - z)))
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
return 1.0 - (x / ((y - t) * (y - z)));
}
[z, t] = sort([z, t]) def code(x, y, z, t): return 1.0 - (x / ((y - t) * (y - z)))
z, t = sort([z, t]) function code(x, y, z, t) return Float64(1.0 - Float64(x / Float64(Float64(y - t) * Float64(y - z)))) end
z, t = num2cell(sort([z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 - (x / ((y - t) * (y - z)));
end
NOTE: 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[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
1 - \frac{x}{\left(y - t\right) \cdot \left(y - z\right)}
\end{array}
Initial program 98.7%
Final simplification98.7%
NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t 9.2e-153) (+ 1.0 (/ x (* y z))) 1.0))
assert(z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 9.2e-153) {
tmp = 1.0 + (x / (y * z));
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: 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-153) then
tmp = 1.0d0 + (x / (y * z))
else
tmp = 1.0d0
end if
code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 9.2e-153) {
tmp = 1.0 + (x / (y * z));
} else {
tmp = 1.0;
}
return tmp;
}
[z, t] = sort([z, t]) def code(x, y, z, t): tmp = 0 if t <= 9.2e-153: tmp = 1.0 + (x / (y * z)) else: tmp = 1.0 return tmp
z, t = sort([z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 9.2e-153) tmp = Float64(1.0 + Float64(x / Float64(y * z))); else tmp = 1.0; end return tmp end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 9.2e-153)
tmp = 1.0 + (x / (y * z));
else
tmp = 1.0;
end
tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 9.2e-153], N[(1.0 + N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.2 \cdot 10^{-153}:\\
\;\;\;\;1 + \frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < 9.19999999999999988e-153Initial program 98.2%
sub-neg98.2%
distribute-frac-neg98.2%
*-lft-identity98.2%
associate-/r*98.8%
associate-*r/98.8%
metadata-eval98.8%
times-frac98.8%
neg-mul-198.8%
remove-double-neg98.8%
neg-mul-198.8%
sub-neg98.8%
+-commutative98.8%
distribute-neg-out98.8%
remove-double-neg98.8%
sub-neg98.8%
Simplified98.8%
Taylor expanded in z around inf 82.3%
Taylor expanded in y around inf 61.1%
*-commutative61.1%
Simplified61.1%
if 9.19999999999999988e-153 < t Initial program 99.9%
Taylor expanded in y around 0 70.9%
add-sqr-sqrt38.3%
sqrt-unprod61.7%
sqr-neg61.7%
sqrt-unprod27.1%
add-sqr-sqrt61.5%
distribute-frac-neg61.5%
Applied egg-rr61.5%
Taylor expanded in x around 0 84.5%
Final simplification68.8%
NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 1.0)
assert(z < t);
double code(double x, double y, double z, double t) {
return 1.0;
}
NOTE: 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 z < t;
public static double code(double x, double y, double z, double t) {
return 1.0;
}
[z, t] = sort([z, t]) def code(x, y, z, t): return 1.0
z, t = sort([z, t]) function code(x, y, z, t) return 1.0 end
z, t = num2cell(sort([z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0;
end
NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := 1.0
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
1
\end{array}
Initial program 98.7%
Taylor expanded in y around 0 63.6%
add-sqr-sqrt36.7%
sqrt-unprod52.1%
sqr-neg52.1%
sqrt-unprod21.1%
add-sqr-sqrt50.5%
distribute-frac-neg50.5%
Applied egg-rr50.5%
Taylor expanded in x around 0 68.6%
Final simplification68.6%
herbie shell --seed 2023309
(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)))))