
(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) (- 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.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (if (<= y -8e-71) (- 1.0 (/ x (* y (- y z)))) (if (<= y 6.8e-116) (- 1.0 (/ x (* z t))) (- 1.0 (/ (/ x (- y t)) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e-71) {
tmp = 1.0 - (x / (y * (y - z)));
} else if (y <= 6.8e-116) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0 - ((x / (y - t)) / 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 <= (-8d-71)) then
tmp = 1.0d0 - (x / (y * (y - z)))
else if (y <= 6.8d-116) then
tmp = 1.0d0 - (x / (z * t))
else
tmp = 1.0d0 - ((x / (y - t)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e-71) {
tmp = 1.0 - (x / (y * (y - z)));
} else if (y <= 6.8e-116) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0 - ((x / (y - t)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8e-71: tmp = 1.0 - (x / (y * (y - z))) elif y <= 6.8e-116: tmp = 1.0 - (x / (z * t)) else: tmp = 1.0 - ((x / (y - t)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8e-71) tmp = Float64(1.0 - Float64(x / Float64(y * Float64(y - z)))); elseif (y <= 6.8e-116) tmp = Float64(1.0 - Float64(x / Float64(z * t))); else tmp = Float64(1.0 - Float64(Float64(x / Float64(y - t)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8e-71) tmp = 1.0 - (x / (y * (y - z))); elseif (y <= 6.8e-116) tmp = 1.0 - (x / (z * t)); else tmp = 1.0 - ((x / (y - t)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8e-71], N[(1.0 - N[(x / N[(y * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e-116], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-71}:\\
\;\;\;\;1 - \frac{x}{y \cdot \left(y - z\right)}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-116}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{x}{y - t}}{y}\\
\end{array}
\end{array}
if y < -7.9999999999999993e-71Initial program 99.9%
Taylor expanded in t around 0 88.0%
if -7.9999999999999993e-71 < y < 6.79999999999999985e-116Initial program 99.8%
Taylor expanded in y around 0 86.0%
if 6.79999999999999985e-116 < y Initial program 100.0%
Taylor expanded in z around 0 86.3%
*-commutative86.3%
associate-/r*86.3%
Simplified86.3%
Final simplification86.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.5e-23)
(- 1.0 (/ (/ x y) (- y z)))
(if (<= y 460000000.0)
(+ 1.0 (/ (/ x z) (- y t)))
(- 1.0 (/ (/ x (- y t)) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.5e-23) {
tmp = 1.0 - ((x / y) / (y - z));
} else if (y <= 460000000.0) {
tmp = 1.0 + ((x / z) / (y - t));
} else {
tmp = 1.0 - ((x / (y - t)) / 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 <= (-5.5d-23)) then
tmp = 1.0d0 - ((x / y) / (y - z))
else if (y <= 460000000.0d0) then
tmp = 1.0d0 + ((x / z) / (y - t))
else
tmp = 1.0d0 - ((x / (y - t)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.5e-23) {
tmp = 1.0 - ((x / y) / (y - z));
} else if (y <= 460000000.0) {
tmp = 1.0 + ((x / z) / (y - t));
} else {
tmp = 1.0 - ((x / (y - t)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.5e-23: tmp = 1.0 - ((x / y) / (y - z)) elif y <= 460000000.0: tmp = 1.0 + ((x / z) / (y - t)) else: tmp = 1.0 - ((x / (y - t)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.5e-23) tmp = Float64(1.0 - Float64(Float64(x / y) / Float64(y - z))); elseif (y <= 460000000.0) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); else tmp = Float64(1.0 - Float64(Float64(x / Float64(y - t)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.5e-23) tmp = 1.0 - ((x / y) / (y - z)); elseif (y <= 460000000.0) tmp = 1.0 + ((x / z) / (y - t)); else tmp = 1.0 - ((x / (y - t)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.5e-23], N[(1.0 - N[(N[(x / y), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 460000000.0], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-23}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y - z}\\
\mathbf{elif}\;y \leq 460000000:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{x}{y - t}}{y}\\
\end{array}
\end{array}
if y < -5.5000000000000001e-23Initial program 99.9%
Taylor expanded in t around 0 90.6%
associate-/r*90.7%
Simplified90.7%
if -5.5000000000000001e-23 < y < 4.6e8Initial program 99.9%
Taylor expanded in z around inf 87.2%
mul-1-neg87.2%
associate-/r*84.4%
Simplified84.4%
if 4.6e8 < y Initial program 100.0%
Taylor expanded in z around 0 93.1%
*-commutative93.1%
associate-/r*93.1%
Simplified93.1%
Final simplification88.7%
(FPCore (x y z t)
:precision binary64
(if (<= t -3.8e-178)
(+ 1.0 (/ (/ x z) (- y t)))
(if (<= t 1.25e-68)
(- 1.0 (/ (/ x (- y z)) y))
(+ 1.0 (/ x (* (- y z) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.8e-178) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (t <= 1.25e-68) {
tmp = 1.0 - ((x / (y - z)) / y);
} 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 (t <= (-3.8d-178)) then
tmp = 1.0d0 + ((x / z) / (y - t))
else if (t <= 1.25d-68) then
tmp = 1.0d0 - ((x / (y - z)) / y)
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 (t <= -3.8e-178) {
tmp = 1.0 + ((x / z) / (y - t));
} else if (t <= 1.25e-68) {
tmp = 1.0 - ((x / (y - z)) / y);
} else {
tmp = 1.0 + (x / ((y - z) * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -3.8e-178: tmp = 1.0 + ((x / z) / (y - t)) elif t <= 1.25e-68: tmp = 1.0 - ((x / (y - z)) / y) else: tmp = 1.0 + (x / ((y - z) * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -3.8e-178) tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t))); elseif (t <= 1.25e-68) tmp = Float64(1.0 - Float64(Float64(x / Float64(y - z)) / y)); 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 (t <= -3.8e-178) tmp = 1.0 + ((x / z) / (y - t)); elseif (t <= 1.25e-68) tmp = 1.0 - ((x / (y - z)) / y); else tmp = 1.0 + (x / ((y - z) * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -3.8e-178], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e-68], N[(1.0 - N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{-178}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-68}:\\
\;\;\;\;1 - \frac{\frac{x}{y - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -3.80000000000000015e-178Initial program 99.9%
Taylor expanded in z around inf 77.7%
mul-1-neg77.7%
associate-/r*77.6%
Simplified77.6%
if -3.80000000000000015e-178 < t < 1.24999999999999993e-68Initial program 99.9%
Taylor expanded in t around 0 96.6%
*-commutative96.6%
associate-/r*96.5%
Simplified96.5%
if 1.24999999999999993e-68 < t Initial program 99.9%
Taylor expanded in t around inf 91.2%
associate-*r/91.2%
neg-mul-191.2%
Simplified91.2%
Final simplification86.9%
(FPCore (x y z t) :precision binary64 (if (<= y -1.15e-79) 1.0 (if (<= y 6.8e-41) (- 1.0 (/ x (* z t))) 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15e-79) {
tmp = 1.0;
} else if (y <= 6.8e-41) {
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-79)) then
tmp = 1.0d0
else if (y <= 6.8d-41) 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-79) {
tmp = 1.0;
} else if (y <= 6.8e-41) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.15e-79: tmp = 1.0 elif y <= 6.8e-41: 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-79) tmp = 1.0; elseif (y <= 6.8e-41) 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-79) tmp = 1.0; elseif (y <= 6.8e-41) 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-79], 1.0, If[LessEqual[y, 6.8e-41], 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^{-79}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-41}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.15000000000000006e-79 or 6.7999999999999997e-41 < y Initial program 99.9%
Taylor expanded in t around 0 91.1%
associate-/r*91.1%
Simplified91.1%
Taylor expanded in x around 0 89.8%
if -1.15000000000000006e-79 < y < 6.7999999999999997e-41Initial program 99.8%
Taylor expanded in y around 0 81.9%
Final simplification87.0%
(FPCore (x y z t) :precision binary64 (if (<= y -7e-69) (- 1.0 (/ x (* y (- y z)))) (if (<= y 3.6e-37) (- 1.0 (/ x (* z t))) 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e-69) {
tmp = 1.0 - (x / (y * (y - z)));
} else if (y <= 3.6e-37) {
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 <= (-7d-69)) then
tmp = 1.0d0 - (x / (y * (y - z)))
else if (y <= 3.6d-37) 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 <= -7e-69) {
tmp = 1.0 - (x / (y * (y - z)));
} else if (y <= 3.6e-37) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7e-69: tmp = 1.0 - (x / (y * (y - z))) elif y <= 3.6e-37: tmp = 1.0 - (x / (z * t)) else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7e-69) tmp = Float64(1.0 - Float64(x / Float64(y * Float64(y - z)))); elseif (y <= 3.6e-37) 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 <= -7e-69) tmp = 1.0 - (x / (y * (y - z))); elseif (y <= 3.6e-37) tmp = 1.0 - (x / (z * t)); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7e-69], N[(1.0 - N[(x / N[(y * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e-37], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-69}:\\
\;\;\;\;1 - \frac{x}{y \cdot \left(y - z\right)}\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-37}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -7.0000000000000003e-69Initial program 99.9%
Taylor expanded in t around 0 88.0%
if -7.0000000000000003e-69 < y < 3.60000000000000007e-37Initial program 99.9%
Taylor expanded in y around 0 82.1%
if 3.60000000000000007e-37 < y Initial program 100.0%
Taylor expanded in t around 0 94.8%
associate-/r*94.8%
Simplified94.8%
Taylor expanded in x around 0 91.9%
Final simplification87.1%
(FPCore (x y z t) :precision binary64 (if (<= t 6.5e-191) (+ 1.0 (/ (/ x z) y)) 1.0))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 6.5e-191) {
tmp = 1.0 + ((x / z) / y);
} 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 (t <= 6.5d-191) then
tmp = 1.0d0 + ((x / z) / y)
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 (t <= 6.5e-191) {
tmp = 1.0 + ((x / z) / y);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 6.5e-191: tmp = 1.0 + ((x / z) / y) else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 6.5e-191) tmp = Float64(1.0 + Float64(Float64(x / z) / y)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 6.5e-191) tmp = 1.0 + ((x / z) / y); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 6.5e-191], N[(1.0 + N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.5 \cdot 10^{-191}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < 6.4999999999999995e-191Initial program 99.9%
Taylor expanded in t around 0 76.1%
associate-/r*74.4%
Simplified74.4%
Taylor expanded in z around inf 66.8%
*-commutative66.8%
associate-/r*66.8%
Simplified66.8%
if 6.4999999999999995e-191 < t Initial program 99.9%
Taylor expanded in t around 0 67.9%
associate-/r*67.9%
Simplified67.9%
Taylor expanded in x around 0 77.8%
Final simplification71.1%
(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.9%
Taylor expanded in t around 0 72.9%
associate-/r*71.8%
Simplified71.8%
Taylor expanded in x around 0 77.5%
Final simplification77.5%
herbie shell --seed 2023301
(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)))))