
(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 8 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 (/ x (* (- y z) (- t y)))))
double code(double x, double y, double z, double t) {
return 1.0 + (x / ((y - z) * (t - y)));
}
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) * (t - y)))
end function
public static double code(double x, double y, double z, double t) {
return 1.0 + (x / ((y - z) * (t - y)));
}
def code(x, y, z, t): return 1.0 + (x / ((y - z) * (t - y)))
function code(x, y, z, t) return Float64(1.0 + Float64(x / Float64(Float64(y - z) * Float64(t - y)))) end
function tmp = code(x, y, z, t) tmp = 1.0 + (x / ((y - z) * (t - y))); end
code[x_, y_, z_, t_] := N[(1.0 + N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{x}{\left(y - z\right) \cdot \left(t - y\right)}
\end{array}
Initial program 99.5%
Final simplification99.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.5e-130) (not (<= y 7e-68))) (+ 1.0 (/ (/ x y) (- t y))) (- 1.0 (/ x (* z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.5e-130) || !(y <= 7e-68)) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 - (x / (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 ((y <= (-2.5d-130)) .or. (.not. (y <= 7d-68))) then
tmp = 1.0d0 + ((x / y) / (t - y))
else
tmp = 1.0d0 - (x / (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.5e-130) || !(y <= 7e-68)) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 - (x / (z * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.5e-130) or not (y <= 7e-68): tmp = 1.0 + ((x / y) / (t - y)) else: tmp = 1.0 - (x / (z * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.5e-130) || !(y <= 7e-68)) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(t - y))); else tmp = Float64(1.0 - Float64(x / Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.5e-130) || ~((y <= 7e-68))) tmp = 1.0 + ((x / y) / (t - y)); else tmp = 1.0 - (x / (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.5e-130], N[Not[LessEqual[y, 7e-68]], $MachinePrecision]], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-130} \lor \neg \left(y \leq 7 \cdot 10^{-68}\right):\\
\;\;\;\;1 + \frac{\frac{x}{y}}{t - y}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\end{array}
\end{array}
if y < -2.4999999999999998e-130 or 7.00000000000000026e-68 < y Initial program 99.9%
Taylor expanded in z around 0 92.2%
sub-neg92.2%
associate-/r*92.2%
distribute-neg-frac292.2%
neg-sub092.2%
sub-neg92.2%
+-commutative92.2%
associate--r+92.2%
neg-sub092.2%
remove-double-neg92.2%
Simplified92.2%
if -2.4999999999999998e-130 < y < 7.00000000000000026e-68Initial program 98.9%
Taylor expanded in y around 0 79.4%
Final simplification87.0%
(FPCore (x y z t)
:precision binary64
(if (<= z -8e-43)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= z 4.2e-97)
(+ 1.0 (/ (/ x y) (- t y)))
(+ 1.0 (/ -1.0 (/ (* z t) x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8e-43) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 4.2e-97) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 + (-1.0 / ((z * t) / x));
}
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 <= (-8d-43)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (z <= 4.2d-97) then
tmp = 1.0d0 + ((x / y) / (t - y))
else
tmp = 1.0d0 + ((-1.0d0) / ((z * t) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8e-43) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 4.2e-97) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 + (-1.0 / ((z * t) / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -8e-43: tmp = 1.0 + ((x / z) / (y - t)) elif z <= 4.2e-97: tmp = 1.0 + ((x / y) / (t - y)) else: tmp = 1.0 + (-1.0 / ((z * t) / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -8e-43) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (z <= 4.2e-97) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(t - y))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(Float64(z * t) / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -8e-43) tmp = 1.0 + ((x / z) / (y - t)); elseif (z <= 4.2e-97) tmp = 1.0 + ((x / y) / (t - y)); else tmp = 1.0 + (-1.0 / ((z * t) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -8e-43], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-97], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(N[(z * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-43}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-97}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{t - y}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{\frac{z \cdot t}{x}}\\
\end{array}
\end{array}
if z < -8.00000000000000062e-43Initial program 99.9%
Taylor expanded in z around inf 98.4%
associate-/r*98.4%
Simplified98.4%
if -8.00000000000000062e-43 < z < 4.2000000000000002e-97Initial program 98.8%
Taylor expanded in z around 0 85.0%
sub-neg85.0%
associate-/r*84.1%
distribute-neg-frac284.1%
neg-sub084.1%
sub-neg84.1%
+-commutative84.1%
associate--r+84.1%
neg-sub084.1%
remove-double-neg84.1%
Simplified84.1%
if 4.2000000000000002e-97 < z Initial program 100.0%
clear-num100.0%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 76.4%
associate-/r*75.1%
Simplified75.1%
clear-num75.1%
inv-pow75.1%
div-inv75.1%
clear-num75.1%
Applied egg-rr75.1%
unpow-175.1%
associate-*r/76.4%
Simplified76.4%
Final simplification86.5%
(FPCore (x y z t) :precision binary64 (if (<= z -7e-43) (+ 1.0 (/ (/ x z) (- y t))) (if (<= z 2.1e-97) (+ 1.0 (/ (/ x y) (- t y))) (- 1.0 (/ x (* z t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7e-43) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 2.1e-97) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 - (x / (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 <= (-7d-43)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (z <= 2.1d-97) then
tmp = 1.0d0 + ((x / y) / (t - y))
else
tmp = 1.0d0 - (x / (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7e-43) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (z <= 2.1e-97) {
tmp = 1.0 + ((x / y) / (t - y));
} else {
tmp = 1.0 - (x / (z * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7e-43: tmp = 1.0 + ((x / z) / (y - t)) elif z <= 2.1e-97: tmp = 1.0 + ((x / y) / (t - y)) else: tmp = 1.0 - (x / (z * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7e-43) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (z <= 2.1e-97) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(t - y))); else tmp = Float64(1.0 - Float64(x / Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -7e-43) tmp = 1.0 + ((x / z) / (y - t)); elseif (z <= 2.1e-97) tmp = 1.0 + ((x / y) / (t - y)); else tmp = 1.0 - (x / (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7e-43], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-97], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-43}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-97}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{t - y}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\end{array}
\end{array}
if z < -6.99999999999999994e-43Initial program 99.9%
Taylor expanded in z around inf 98.4%
associate-/r*98.4%
Simplified98.4%
if -6.99999999999999994e-43 < z < 2.1000000000000001e-97Initial program 98.8%
Taylor expanded in z around 0 85.0%
sub-neg85.0%
associate-/r*84.1%
distribute-neg-frac284.1%
neg-sub084.1%
sub-neg84.1%
+-commutative84.1%
associate--r+84.1%
neg-sub084.1%
remove-double-neg84.1%
Simplified84.1%
if 2.1000000000000001e-97 < z Initial program 100.0%
Taylor expanded in y around 0 76.4%
Final simplification86.5%
(FPCore (x y z t) :precision binary64 (if (<= y -4e-57) 1.0 (if (<= y 5e-24) (- 1.0 (/ x (* z t))) (- 1.0 (/ (/ x y) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4e-57) {
tmp = 1.0;
} else if (y <= 5e-24) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0 - ((x / y) / y);
}
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 <= (-4d-57)) then
tmp = 1.0d0
else if (y <= 5d-24) then
tmp = 1.0d0 - (x / (z * t))
else
tmp = 1.0d0 - ((x / y) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4e-57) {
tmp = 1.0;
} else if (y <= 5e-24) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0 - ((x / y) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4e-57: tmp = 1.0 elif y <= 5e-24: tmp = 1.0 - (x / (z * t)) else: tmp = 1.0 - ((x / y) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4e-57) tmp = 1.0; elseif (y <= 5e-24) tmp = Float64(1.0 - Float64(x / Float64(z * t))); else tmp = Float64(1.0 - Float64(Float64(x / y) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4e-57) tmp = 1.0; elseif (y <= 5e-24) tmp = 1.0 - (x / (z * t)); else tmp = 1.0 - ((x / y) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4e-57], 1.0, If[LessEqual[y, 5e-24], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{-57}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-24}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < -3.99999999999999982e-57Initial program 99.9%
Taylor expanded in x around 0 90.5%
if -3.99999999999999982e-57 < y < 4.9999999999999998e-24Initial program 99.1%
Taylor expanded in y around 0 74.5%
if 4.9999999999999998e-24 < y Initial program 100.0%
Taylor expanded in z around 0 95.2%
sub-neg95.2%
associate-/r*95.2%
distribute-neg-frac295.2%
neg-sub095.2%
sub-neg95.2%
+-commutative95.2%
associate--r+95.2%
neg-sub095.2%
remove-double-neg95.2%
Simplified95.2%
Taylor expanded in t around 0 91.0%
neg-mul-191.0%
Simplified91.0%
Final simplification82.4%
(FPCore (x y z t) :precision binary64 (if (<= y -1.8e-57) 1.0 (if (<= y 2.15e-141) (- 1.0 (/ x (* z t))) 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.8e-57) {
tmp = 1.0;
} else if (y <= 2.15e-141) {
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.8d-57)) then
tmp = 1.0d0
else if (y <= 2.15d-141) 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.8e-57) {
tmp = 1.0;
} else if (y <= 2.15e-141) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.8e-57: tmp = 1.0 elif y <= 2.15e-141: tmp = 1.0 - (x / (z * t)) else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.8e-57) tmp = 1.0; elseif (y <= 2.15e-141) 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.8e-57) tmp = 1.0; elseif (y <= 2.15e-141) tmp = 1.0 - (x / (z * t)); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.8e-57], 1.0, If[LessEqual[y, 2.15e-141], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-57}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{-141}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.8000000000000001e-57 or 2.14999999999999987e-141 < y Initial program 99.9%
Taylor expanded in x around 0 84.9%
if -1.8000000000000001e-57 < y < 2.14999999999999987e-141Initial program 98.9%
Taylor expanded in y around 0 78.5%
Final simplification82.3%
(FPCore (x y z t) :precision binary64 (if (<= z -2.1e-184) 1.0 (+ 1.0 (/ (/ x y) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e-184) {
tmp = 1.0;
} else {
tmp = 1.0 + ((x / 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 <= (-2.1d-184)) then
tmp = 1.0d0
else
tmp = 1.0d0 + ((x / y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e-184) {
tmp = 1.0;
} else {
tmp = 1.0 + ((x / y) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.1e-184: tmp = 1.0 else: tmp = 1.0 + ((x / y) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.1e-184) tmp = 1.0; else tmp = Float64(1.0 + Float64(Float64(x / y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.1e-184) tmp = 1.0; else tmp = 1.0 + ((x / y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.1e-184], 1.0, N[(1.0 + N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-184}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if z < -2.0999999999999999e-184Initial program 99.9%
Taylor expanded in x around 0 76.4%
if -2.0999999999999999e-184 < z Initial program 99.2%
Taylor expanded in z around 0 72.3%
sub-neg72.3%
associate-/r*71.8%
distribute-neg-frac271.8%
neg-sub071.8%
sub-neg71.8%
+-commutative71.8%
associate--r+71.8%
neg-sub071.8%
remove-double-neg71.8%
Simplified71.8%
Taylor expanded in t around inf 53.6%
(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.5%
Taylor expanded in x around 0 71.7%
herbie shell --seed 2024144
(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)))))