
(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 10 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}
(FPCore (x y z t) :precision binary64 (+ 1.0 (/ -1.0 (* (- y z) (/ (- y t) x)))))
double code(double x, double y, double z, double t) {
return 1.0 + (-1.0 / ((y - z) * ((y - t) / x)));
}
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) * ((y - t) / x)))
end function
public static double code(double x, double y, double z, double t) {
return 1.0 + (-1.0 / ((y - z) * ((y - t) / x)));
}
def code(x, y, z, t): return 1.0 + (-1.0 / ((y - z) * ((y - t) / x)))
function code(x, y, z, t) return Float64(1.0 + Float64(-1.0 / Float64(Float64(y - z) * Float64(Float64(y - t) / x)))) end
function tmp = code(x, y, z, t) tmp = 1.0 + (-1.0 / ((y - z) * ((y - t) / x))); end
code[x_, y_, z_, t_] := N[(1.0 + N[(-1.0 / N[(N[(y - z), $MachinePrecision] * N[(N[(y - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-1}{\left(y - z\right) \cdot \frac{y - t}{x}}
\end{array}
Initial program 99.2%
associate-/l/99.9%
clear-num99.9%
inv-pow99.9%
div-inv99.8%
clear-num99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (if (<= y -1.4e-29) 1.0 (if (<= y 7.4e-96) (+ 1.0 (/ x (* z (- y t)))) 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e-29) {
tmp = 1.0;
} else if (y <= 7.4e-96) {
tmp = 1.0 + (x / (z * (y - t)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.4d-29)) then
tmp = 1.0d0
else if (y <= 7.4d-96) then
tmp = 1.0d0 + (x / (z * (y - t)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e-29) {
tmp = 1.0;
} else if (y <= 7.4e-96) {
tmp = 1.0 + (x / (z * (y - t)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.4e-29: tmp = 1.0 elif y <= 7.4e-96: tmp = 1.0 + (x / (z * (y - t))) else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.4e-29) tmp = 1.0; elseif (y <= 7.4e-96) tmp = Float64(1.0 + Float64(x / Float64(z * Float64(y - t)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.4e-29) tmp = 1.0; elseif (y <= 7.4e-96) tmp = 1.0 + (x / (z * (y - t))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.4e-29], 1.0, If[LessEqual[y, 7.4e-96], N[(1.0 + N[(x / N[(z * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-29}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{-96}:\\
\;\;\;\;1 + \frac{x}{z \cdot \left(y - t\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.4000000000000001e-29 or 7.39999999999999972e-96 < y Initial program 99.9%
Taylor expanded in y around inf 83.4%
unpow283.4%
Simplified83.4%
Taylor expanded in x around 0 89.3%
if -1.4000000000000001e-29 < y < 7.39999999999999972e-96Initial program 97.9%
sub-neg97.9%
distribute-frac-neg97.9%
*-lft-identity97.9%
associate-/r*95.9%
associate-*r/95.9%
metadata-eval95.9%
times-frac95.9%
neg-mul-195.9%
remove-double-neg95.9%
neg-mul-195.9%
sub-neg95.9%
+-commutative95.9%
distribute-neg-out95.9%
remove-double-neg95.9%
sub-neg95.9%
Simplified95.9%
Taylor expanded in z around inf 82.8%
*-commutative82.8%
Simplified82.8%
Final simplification86.9%
(FPCore (x y z t)
:precision binary64
(if (<= z -3.7e-33)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= z 6.6e-177)
(- 1.0 (/ (/ x y) (- y t)))
(+ 1.0 (/ x (* (- y z) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.7e-33) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 6.6e-177) {
tmp = 1.0 - ((x / y) / (y - t));
} else {
tmp = 1.0 + (x / ((y - z) * t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-3.7d-33)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (z <= 6.6d-177) then
tmp = 1.0d0 - ((x / y) / (y - t))
else
tmp = 1.0d0 + (x / ((y - z) * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.7e-33) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 6.6e-177) {
tmp = 1.0 - ((x / y) / (y - t));
} else {
tmp = 1.0 + (x / ((y - z) * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.7e-33: tmp = 1.0 + ((x / z) / (y - t)) elif z <= 6.6e-177: tmp = 1.0 - ((x / y) / (y - t)) else: tmp = 1.0 + (x / ((y - z) * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.7e-33) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (z <= 6.6e-177) tmp = Float64(1.0 - Float64(Float64(x / y) / Float64(y - t))); else tmp = Float64(1.0 + Float64(x / Float64(Float64(y - z) * t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.7e-33) tmp = 1.0 + ((x / z) / (y - t)); elseif (z <= 6.6e-177) tmp = 1.0 - ((x / y) / (y - t)); else tmp = 1.0 + (x / ((y - z) * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.7e-33], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e-177], N[(1.0 - N[(N[(x / y), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{-33}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-177}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y - t}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -3.70000000000000014e-33Initial program 100.0%
sub-neg100.0%
distribute-frac-neg100.0%
*-lft-identity100.0%
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 100.0%
if -3.70000000000000014e-33 < z < 6.5999999999999999e-177Initial program 97.6%
Taylor expanded in z around 0 90.3%
associate-/r*90.3%
Simplified90.3%
if 6.5999999999999999e-177 < z Initial program 99.9%
Taylor expanded in t around inf 73.7%
associate-*r/73.7%
neg-mul-173.7%
Simplified73.7%
Final simplification86.9%
(FPCore (x y z t) :precision binary64 (if (<= y -1.15e-207) 1.0 (if (<= y 5e-100) (- 1.0 (/ x (* z t))) 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15e-207) {
tmp = 1.0;
} else if (y <= 5e-100) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.15d-207)) then
tmp = 1.0d0
else if (y <= 5d-100) then
tmp = 1.0d0 - (x / (z * t))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15e-207) {
tmp = 1.0;
} else if (y <= 5e-100) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.15e-207: tmp = 1.0 elif y <= 5e-100: tmp = 1.0 - (x / (z * t)) else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.15e-207) tmp = 1.0; elseif (y <= 5e-100) tmp = Float64(1.0 - Float64(x / Float64(z * t))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.15e-207) tmp = 1.0; elseif (y <= 5e-100) tmp = 1.0 - (x / (z * t)); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.15e-207], 1.0, If[LessEqual[y, 5e-100], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-207}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-100}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.15e-207 or 5.0000000000000001e-100 < y Initial program 99.5%
Taylor expanded in y around inf 71.4%
unpow271.4%
Simplified71.4%
Taylor expanded in x around 0 85.1%
if -1.15e-207 < y < 5.0000000000000001e-100Initial program 98.2%
Taylor expanded in y around 0 85.6%
Final simplification85.2%
(FPCore (x y z t) :precision binary64 (if (<= y -1.15e-207) 1.0 (if (<= y 2.05e-100) (- 1.0 (/ (/ x t) z)) 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15e-207) {
tmp = 1.0;
} else if (y <= 2.05e-100) {
tmp = 1.0 - ((x / t) / z);
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.15d-207)) then
tmp = 1.0d0
else if (y <= 2.05d-100) then
tmp = 1.0d0 - ((x / t) / z)
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15e-207) {
tmp = 1.0;
} else if (y <= 2.05e-100) {
tmp = 1.0 - ((x / t) / z);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.15e-207: tmp = 1.0 elif y <= 2.05e-100: tmp = 1.0 - ((x / t) / z) else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.15e-207) tmp = 1.0; elseif (y <= 2.05e-100) tmp = Float64(1.0 - Float64(Float64(x / t) / z)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.15e-207) tmp = 1.0; elseif (y <= 2.05e-100) tmp = 1.0 - ((x / t) / z); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.15e-207], 1.0, If[LessEqual[y, 2.05e-100], N[(1.0 - N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-207}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-100}:\\
\;\;\;\;1 - \frac{\frac{x}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.15e-207 or 2.0499999999999999e-100 < y Initial program 99.5%
Taylor expanded in y around inf 71.4%
unpow271.4%
Simplified71.4%
Taylor expanded in x around 0 85.1%
if -1.15e-207 < y < 2.0499999999999999e-100Initial program 98.2%
Taylor expanded in y around 0 85.6%
associate-/r*87.3%
Simplified87.3%
Final simplification85.6%
(FPCore (x y z t) :precision binary64 (if (<= z -1.05e-33) (+ 1.0 (/ (/ x z) (- y t))) (- 1.0 (/ x (* y (- y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.05e-33) {
tmp = 1.0 + ((x / z) / (y - t));
} else {
tmp = 1.0 - (x / (y * (y - t)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.05d-33)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else
tmp = 1.0d0 - (x / (y * (y - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.05e-33) {
tmp = 1.0 + ((x / z) / (y - t));
} else {
tmp = 1.0 - (x / (y * (y - t)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.05e-33: tmp = 1.0 + ((x / z) / (y - t)) else: tmp = 1.0 - (x / (y * (y - t))) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.05e-33) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); else tmp = Float64(1.0 - Float64(x / Float64(y * Float64(y - t)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.05e-33) tmp = 1.0 + ((x / z) / (y - t)); else tmp = 1.0 - (x / (y * (y - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.05e-33], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(y * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-33}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{y \cdot \left(y - t\right)}\\
\end{array}
\end{array}
if z < -1.05e-33Initial program 100.0%
sub-neg100.0%
distribute-frac-neg100.0%
*-lft-identity100.0%
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 100.0%
if -1.05e-33 < z Initial program 98.9%
Taylor expanded in z around 0 77.5%
Final simplification84.4%
(FPCore (x y z t) :precision binary64 (+ 1.0 (/ (/ x (- z y)) (- y t))))
double code(double x, double y, double z, double t) {
return 1.0 + ((x / (z - y)) / (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 / (z - y)) / (y - t))
end function
public static double code(double x, double y, double z, double t) {
return 1.0 + ((x / (z - y)) / (y - t));
}
def code(x, y, z, t): return 1.0 + ((x / (z - y)) / (y - t))
function code(x, y, z, t) return Float64(1.0 + Float64(Float64(x / Float64(z - y)) / Float64(y - t))) end
function tmp = code(x, y, z, t) tmp = 1.0 + ((x / (z - y)) / (y - t)); end
code[x_, y_, z_, t_] := N[(1.0 + N[(N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{\frac{x}{z - y}}{y - t}
\end{array}
Initial program 99.2%
sub-neg99.2%
distribute-frac-neg99.2%
*-lft-identity99.2%
associate-/r*98.1%
associate-*r/98.1%
metadata-eval98.1%
times-frac98.1%
neg-mul-198.1%
remove-double-neg98.1%
neg-mul-198.1%
sub-neg98.1%
+-commutative98.1%
distribute-neg-out98.1%
remove-double-neg98.1%
sub-neg98.1%
Simplified98.1%
Final simplification98.1%
(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}
Initial program 99.2%
Final simplification99.2%
(FPCore (x y z t) :precision binary64 (- 1.0 (/ (/ x (- y t)) (- y z))))
double code(double x, double y, double z, double t) {
return 1.0 - ((x / (y - t)) / (y - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = 1.0d0 - ((x / (y - t)) / (y - z))
end function
public static double code(double x, double y, double z, double t) {
return 1.0 - ((x / (y - t)) / (y - z));
}
def code(x, y, z, t): return 1.0 - ((x / (y - t)) / (y - z))
function code(x, y, z, t) return Float64(1.0 - Float64(Float64(x / Float64(y - t)) / Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = 1.0 - ((x / (y - t)) / (y - z)); end
code[x_, y_, z_, t_] := N[(1.0 - N[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{\frac{x}{y - t}}{y - z}
\end{array}
Initial program 99.2%
*-commutative99.2%
associate-/r*99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 1.0)
double code(double x, double y, double z, double t) {
return 1.0;
}
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
public static double code(double x, double y, double z, double t) {
return 1.0;
}
def code(x, y, z, t): return 1.0
function code(x, y, z, t) return 1.0 end
function tmp = code(x, y, z, t) tmp = 1.0; end
code[x_, y_, z_, t_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 99.2%
Taylor expanded in y around inf 58.9%
unpow258.9%
Simplified58.9%
Taylor expanded in x around 0 78.5%
Final simplification78.5%
herbie shell --seed 2023277
(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)))))