
(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 15 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 (pow (* (- y t) (/ (- y z) x)) -1.0)))
double code(double x, double y, double z, double t) {
return 1.0 - pow(((y - t) * ((y - z) / x)), -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 - (((y - t) * ((y - z) / x)) ** (-1.0d0))
end function
public static double code(double x, double y, double z, double t) {
return 1.0 - Math.pow(((y - t) * ((y - z) / x)), -1.0);
}
def code(x, y, z, t): return 1.0 - math.pow(((y - t) * ((y - z) / x)), -1.0)
function code(x, y, z, t) return Float64(1.0 - (Float64(Float64(y - t) * Float64(Float64(y - z) / x)) ^ -1.0)) end
function tmp = code(x, y, z, t) tmp = 1.0 - (((y - t) * ((y - z) / x)) ^ -1.0); end
code[x_, y_, z_, t_] := N[(1.0 - N[Power[N[(N[(y - t), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - {\left(\left(y - t\right) \cdot \frac{y - z}{x}\right)}^{-1}
\end{array}
Initial program 98.0%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6499.2
Applied rewrites99.2%
Final simplification99.2%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- 1.0 (/ x (* (- y z) (- y t)))))) (if (or (<= t_1 -200000000000.0) (not (<= t_1 100.0))) (/ x (* t y)) 1.0)))
double code(double x, double y, double z, double t) {
double t_1 = 1.0 - (x / ((y - z) * (y - t)));
double tmp;
if ((t_1 <= -200000000000.0) || !(t_1 <= 100.0)) {
tmp = x / (t * 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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - (x / ((y - z) * (y - t)))
if ((t_1 <= (-200000000000.0d0)) .or. (.not. (t_1 <= 100.0d0))) then
tmp = x / (t * y)
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 - (x / ((y - z) * (y - t)));
double tmp;
if ((t_1 <= -200000000000.0) || !(t_1 <= 100.0)) {
tmp = x / (t * y);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = 1.0 - (x / ((y - z) * (y - t))) tmp = 0 if (t_1 <= -200000000000.0) or not (t_1 <= 100.0): tmp = x / (t * y) else: tmp = 1.0 return tmp
function code(x, y, z, t) t_1 = Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t)))) tmp = 0.0 if ((t_1 <= -200000000000.0) || !(t_1 <= 100.0)) tmp = Float64(x / Float64(t * y)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 1.0 - (x / ((y - z) * (y - t))); tmp = 0.0; if ((t_1 <= -200000000000.0) || ~((t_1 <= 100.0))) tmp = x / (t * y); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -200000000000.0], N[Not[LessEqual[t$95$1, 100.0]], $MachinePrecision]], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\
\mathbf{if}\;t\_1 \leq -200000000000 \lor \neg \left(t\_1 \leq 100\right):\\
\;\;\;\;\frac{x}{t \cdot y}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) < -2e11 or 100 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) Initial program 92.1%
Taylor expanded in x around inf
mul-1-negN/A
associate-/r*N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6491.8
Applied rewrites91.8%
Taylor expanded in y around inf
Applied rewrites29.3%
Taylor expanded in z around 0
Applied rewrites42.3%
Taylor expanded in y around 0
Applied rewrites31.6%
if -2e11 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) < 100Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites98.2%
Final simplification81.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* (- y z) (- y t)))))
(if (<= t_1 -50.0)
(/ (- x) (* (- z y) t))
(if (<= t_1 5e-7) 1.0 (- 1.0 (/ x (* (- t y) z)))))))
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (y - t));
double tmp;
if (t_1 <= -50.0) {
tmp = -x / ((z - y) * t);
} else if (t_1 <= 5e-7) {
tmp = 1.0;
} else {
tmp = 1.0 - (x / ((t - y) * z));
}
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) :: t_1
real(8) :: tmp
t_1 = x / ((y - z) * (y - t))
if (t_1 <= (-50.0d0)) then
tmp = -x / ((z - y) * t)
else if (t_1 <= 5d-7) then
tmp = 1.0d0
else
tmp = 1.0d0 - (x / ((t - y) * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (y - t));
double tmp;
if (t_1 <= -50.0) {
tmp = -x / ((z - y) * t);
} else if (t_1 <= 5e-7) {
tmp = 1.0;
} else {
tmp = 1.0 - (x / ((t - y) * z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x / ((y - z) * (y - t)) tmp = 0 if t_1 <= -50.0: tmp = -x / ((z - y) * t) elif t_1 <= 5e-7: tmp = 1.0 else: tmp = 1.0 - (x / ((t - y) * z)) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(y - t))) tmp = 0.0 if (t_1 <= -50.0) tmp = Float64(Float64(-x) / Float64(Float64(z - y) * t)); elseif (t_1 <= 5e-7) tmp = 1.0; else tmp = Float64(1.0 - Float64(x / Float64(Float64(t - y) * z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / ((y - z) * (y - t)); tmp = 0.0; if (t_1 <= -50.0) tmp = -x / ((z - y) * t); elseif (t_1 <= 5e-7) tmp = 1.0; else tmp = 1.0 - (x / ((t - y) * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -50.0], N[((-x) / N[(N[(z - y), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-7], 1.0, N[(1.0 - N[(x / N[(N[(t - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\
\mathbf{if}\;t\_1 \leq -50:\\
\;\;\;\;\frac{-x}{\left(z - y\right) \cdot t}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{\left(t - y\right) \cdot z}\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < -50Initial program 86.8%
Taylor expanded in x around inf
mul-1-negN/A
associate-/r*N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6490.9
Applied rewrites90.9%
Taylor expanded in t around inf
Applied rewrites58.1%
if -50 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < 4.99999999999999977e-7Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites98.6%
if 4.99999999999999977e-7 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) Initial program 96.9%
Taylor expanded in z around inf
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6474.4
Applied rewrites74.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- 1.0 (/ x (* (- y z) (- y t))))))
(if (<= t_1 -200000000000.0)
(/ (- x) (* y y))
(if (<= t_1 100.0) 1.0 (/ x (* t y))))))
double code(double x, double y, double z, double t) {
double t_1 = 1.0 - (x / ((y - z) * (y - t)));
double tmp;
if (t_1 <= -200000000000.0) {
tmp = -x / (y * y);
} else if (t_1 <= 100.0) {
tmp = 1.0;
} else {
tmp = x / (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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - (x / ((y - z) * (y - t)))
if (t_1 <= (-200000000000.0d0)) then
tmp = -x / (y * y)
else if (t_1 <= 100.0d0) then
tmp = 1.0d0
else
tmp = x / (t * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 - (x / ((y - z) * (y - t)));
double tmp;
if (t_1 <= -200000000000.0) {
tmp = -x / (y * y);
} else if (t_1 <= 100.0) {
tmp = 1.0;
} else {
tmp = x / (t * y);
}
return tmp;
}
def code(x, y, z, t): t_1 = 1.0 - (x / ((y - z) * (y - t))) tmp = 0 if t_1 <= -200000000000.0: tmp = -x / (y * y) elif t_1 <= 100.0: tmp = 1.0 else: tmp = x / (t * y) return tmp
function code(x, y, z, t) t_1 = Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t)))) tmp = 0.0 if (t_1 <= -200000000000.0) tmp = Float64(Float64(-x) / Float64(y * y)); elseif (t_1 <= 100.0) tmp = 1.0; else tmp = Float64(x / Float64(t * y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 1.0 - (x / ((y - z) * (y - t))); tmp = 0.0; if (t_1 <= -200000000000.0) tmp = -x / (y * y); elseif (t_1 <= 100.0) tmp = 1.0; else tmp = x / (t * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -200000000000.0], N[((-x) / N[(y * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 100.0], 1.0, N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\
\mathbf{if}\;t\_1 \leq -200000000000:\\
\;\;\;\;\frac{-x}{y \cdot y}\\
\mathbf{elif}\;t\_1 \leq 100:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot y}\\
\end{array}
\end{array}
if (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) < -2e11Initial program 96.9%
Taylor expanded in x around inf
mul-1-negN/A
associate-/r*N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6490.6
Applied rewrites90.6%
Taylor expanded in y around inf
Applied rewrites28.5%
if -2e11 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) < 100Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites98.2%
if 100 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) Initial program 86.4%
Taylor expanded in x around inf
mul-1-negN/A
associate-/r*N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6493.2
Applied rewrites93.2%
Taylor expanded in y around inf
Applied rewrites30.2%
Taylor expanded in z around 0
Applied rewrites49.5%
Taylor expanded in y around 0
Applied rewrites39.4%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (/ x (* (- y z) (- y t))))) (if (or (<= t_1 -50.0) (not (<= t_1 5e-7))) (/ (- x) (* (- z y) t)) 1.0)))
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (y - t));
double tmp;
if ((t_1 <= -50.0) || !(t_1 <= 5e-7)) {
tmp = -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) :: t_1
real(8) :: tmp
t_1 = x / ((y - z) * (y - t))
if ((t_1 <= (-50.0d0)) .or. (.not. (t_1 <= 5d-7))) then
tmp = -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 t_1 = x / ((y - z) * (y - t));
double tmp;
if ((t_1 <= -50.0) || !(t_1 <= 5e-7)) {
tmp = -x / ((z - y) * t);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / ((y - z) * (y - t)) tmp = 0 if (t_1 <= -50.0) or not (t_1 <= 5e-7): tmp = -x / ((z - y) * t) else: tmp = 1.0 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(y - t))) tmp = 0.0 if ((t_1 <= -50.0) || !(t_1 <= 5e-7)) tmp = Float64(Float64(-x) / Float64(Float64(z - y) * t)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / ((y - z) * (y - t)); tmp = 0.0; if ((t_1 <= -50.0) || ~((t_1 <= 5e-7))) tmp = -x / ((z - y) * t); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -50.0], N[Not[LessEqual[t$95$1, 5e-7]], $MachinePrecision]], N[((-x) / N[(N[(z - y), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\
\mathbf{if}\;t\_1 \leq -50 \lor \neg \left(t\_1 \leq 5 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{-x}{\left(z - y\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < -50 or 4.99999999999999977e-7 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) Initial program 92.2%
Taylor expanded in x around inf
mul-1-negN/A
associate-/r*N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6490.8
Applied rewrites90.8%
Taylor expanded in t around inf
Applied rewrites66.1%
if -50 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < 4.99999999999999977e-7Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites98.6%
Final simplification90.5%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (/ x (* (- y z) (- y t))))) (if (or (<= t_1 -50.0) (not (<= t_1 5e-7))) (/ x (* (- y t) z)) 1.0)))
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (y - t));
double tmp;
if ((t_1 <= -50.0) || !(t_1 <= 5e-7)) {
tmp = x / ((y - 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) :: t_1
real(8) :: tmp
t_1 = x / ((y - z) * (y - t))
if ((t_1 <= (-50.0d0)) .or. (.not. (t_1 <= 5d-7))) then
tmp = x / ((y - 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 t_1 = x / ((y - z) * (y - t));
double tmp;
if ((t_1 <= -50.0) || !(t_1 <= 5e-7)) {
tmp = x / ((y - t) * z);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / ((y - z) * (y - t)) tmp = 0 if (t_1 <= -50.0) or not (t_1 <= 5e-7): tmp = x / ((y - t) * z) else: tmp = 1.0 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(y - t))) tmp = 0.0 if ((t_1 <= -50.0) || !(t_1 <= 5e-7)) tmp = Float64(x / Float64(Float64(y - t) * z)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / ((y - z) * (y - t)); tmp = 0.0; if ((t_1 <= -50.0) || ~((t_1 <= 5e-7))) tmp = x / ((y - t) * z); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -50.0], N[Not[LessEqual[t$95$1, 5e-7]], $MachinePrecision]], N[(x / N[(N[(y - t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\
\mathbf{if}\;t\_1 \leq -50 \lor \neg \left(t\_1 \leq 5 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{x}{\left(y - t\right) \cdot z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < -50 or 4.99999999999999977e-7 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) Initial program 92.2%
Taylor expanded in x around inf
mul-1-negN/A
associate-/r*N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6490.8
Applied rewrites90.8%
Taylor expanded in z around inf
Applied rewrites63.5%
if -50 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < 4.99999999999999977e-7Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites98.6%
Final simplification89.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* (- y z) (- y t)))))
(if (<= t_1 -4e+22)
(/ (- x) (* (- y t) y))
(if (<= t_1 5e-7) 1.0 (/ x (* (- y t) z))))))
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (y - t));
double tmp;
if (t_1 <= -4e+22) {
tmp = -x / ((y - t) * y);
} else if (t_1 <= 5e-7) {
tmp = 1.0;
} else {
tmp = x / ((y - t) * z);
}
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) :: t_1
real(8) :: tmp
t_1 = x / ((y - z) * (y - t))
if (t_1 <= (-4d+22)) then
tmp = -x / ((y - t) * y)
else if (t_1 <= 5d-7) then
tmp = 1.0d0
else
tmp = x / ((y - t) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (y - t));
double tmp;
if (t_1 <= -4e+22) {
tmp = -x / ((y - t) * y);
} else if (t_1 <= 5e-7) {
tmp = 1.0;
} else {
tmp = x / ((y - t) * z);
}
return tmp;
}
def code(x, y, z, t): t_1 = x / ((y - z) * (y - t)) tmp = 0 if t_1 <= -4e+22: tmp = -x / ((y - t) * y) elif t_1 <= 5e-7: tmp = 1.0 else: tmp = x / ((y - t) * z) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(y - t))) tmp = 0.0 if (t_1 <= -4e+22) tmp = Float64(Float64(-x) / Float64(Float64(y - t) * y)); elseif (t_1 <= 5e-7) tmp = 1.0; else tmp = Float64(x / Float64(Float64(y - t) * z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / ((y - z) * (y - t)); tmp = 0.0; if (t_1 <= -4e+22) tmp = -x / ((y - t) * y); elseif (t_1 <= 5e-7) tmp = 1.0; else tmp = x / ((y - t) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+22], N[((-x) / N[(N[(y - t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-7], 1.0, N[(x / N[(N[(y - t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+22}:\\
\;\;\;\;\frac{-x}{\left(y - t\right) \cdot y}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - t\right) \cdot z}\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < -4e22Initial program 86.4%
Taylor expanded in x around inf
mul-1-negN/A
associate-/r*N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6493.2
Applied rewrites93.2%
Taylor expanded in y around inf
Applied rewrites30.2%
Taylor expanded in z around 0
Applied rewrites49.5%
if -4e22 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < 4.99999999999999977e-7Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites98.2%
if 4.99999999999999977e-7 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) Initial program 96.9%
Taylor expanded in x around inf
mul-1-negN/A
associate-/r*N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6490.6
Applied rewrites90.6%
Taylor expanded in z around inf
Applied rewrites73.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* (- y z) (- y t)))))
(if (<= t_1 -0.004)
(- 1.0 (/ x (* t z)))
(if (<= t_1 5e-7) 1.0 (/ x (* (- y t) z))))))
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (y - t));
double tmp;
if (t_1 <= -0.004) {
tmp = 1.0 - (x / (t * z));
} else if (t_1 <= 5e-7) {
tmp = 1.0;
} else {
tmp = x / ((y - t) * z);
}
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) :: t_1
real(8) :: tmp
t_1 = x / ((y - z) * (y - t))
if (t_1 <= (-0.004d0)) then
tmp = 1.0d0 - (x / (t * z))
else if (t_1 <= 5d-7) then
tmp = 1.0d0
else
tmp = x / ((y - t) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (y - t));
double tmp;
if (t_1 <= -0.004) {
tmp = 1.0 - (x / (t * z));
} else if (t_1 <= 5e-7) {
tmp = 1.0;
} else {
tmp = x / ((y - t) * z);
}
return tmp;
}
def code(x, y, z, t): t_1 = x / ((y - z) * (y - t)) tmp = 0 if t_1 <= -0.004: tmp = 1.0 - (x / (t * z)) elif t_1 <= 5e-7: tmp = 1.0 else: tmp = x / ((y - t) * z) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(y - t))) tmp = 0.0 if (t_1 <= -0.004) tmp = Float64(1.0 - Float64(x / Float64(t * z))); elseif (t_1 <= 5e-7) tmp = 1.0; else tmp = Float64(x / Float64(Float64(y - t) * z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / ((y - z) * (y - t)); tmp = 0.0; if (t_1 <= -0.004) tmp = 1.0 - (x / (t * z)); elseif (t_1 <= 5e-7) tmp = 1.0; else tmp = x / ((y - t) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -0.004], N[(1.0 - N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-7], 1.0, N[(x / N[(N[(y - t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\
\mathbf{if}\;t\_1 \leq -0.004:\\
\;\;\;\;1 - \frac{x}{t \cdot z}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - t\right) \cdot z}\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < -0.0040000000000000001Initial program 87.7%
Taylor expanded in y around 0
lower-*.f6445.1
Applied rewrites45.1%
if -0.0040000000000000001 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < 4.99999999999999977e-7Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites99.4%
if 4.99999999999999977e-7 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) Initial program 96.9%
Taylor expanded in x around inf
mul-1-negN/A
associate-/r*N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6490.6
Applied rewrites90.6%
Taylor expanded in z around inf
Applied rewrites73.7%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (/ x (* (- y z) (- y t))))) (if (or (<= t_1 -50.0) (not (<= t_1 5e-7))) (/ (- x) (* z t)) 1.0)))
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (y - t));
double tmp;
if ((t_1 <= -50.0) || !(t_1 <= 5e-7)) {
tmp = -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) :: t_1
real(8) :: tmp
t_1 = x / ((y - z) * (y - t))
if ((t_1 <= (-50.0d0)) .or. (.not. (t_1 <= 5d-7))) then
tmp = -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 t_1 = x / ((y - z) * (y - t));
double tmp;
if ((t_1 <= -50.0) || !(t_1 <= 5e-7)) {
tmp = -x / (z * t);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / ((y - z) * (y - t)) tmp = 0 if (t_1 <= -50.0) or not (t_1 <= 5e-7): tmp = -x / (z * t) else: tmp = 1.0 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(y - t))) tmp = 0.0 if ((t_1 <= -50.0) || !(t_1 <= 5e-7)) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / ((y - z) * (y - t)); tmp = 0.0; if ((t_1 <= -50.0) || ~((t_1 <= 5e-7))) tmp = -x / (z * t); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -50.0], N[Not[LessEqual[t$95$1, 5e-7]], $MachinePrecision]], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\
\mathbf{if}\;t\_1 \leq -50 \lor \neg \left(t\_1 \leq 5 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < -50 or 4.99999999999999977e-7 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) Initial program 92.2%
Taylor expanded in x around inf
mul-1-negN/A
associate-/r*N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6490.8
Applied rewrites90.8%
Taylor expanded in y around 0
Applied rewrites49.6%
Applied rewrites51.1%
if -50 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < 4.99999999999999977e-7Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites98.6%
Final simplification86.8%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.22e-101)
(- 1.0 (/ x (* (- t y) z)))
(if (<= z 5.6e-229)
(- 1.0 (/ x (* (- y t) y)))
(- 1.0 (/ x (* (- z y) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.22e-101) {
tmp = 1.0 - (x / ((t - y) * z));
} else if (z <= 5.6e-229) {
tmp = 1.0 - (x / ((y - t) * y));
} else {
tmp = 1.0 - (x / ((z - 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.22d-101)) then
tmp = 1.0d0 - (x / ((t - y) * z))
else if (z <= 5.6d-229) then
tmp = 1.0d0 - (x / ((y - t) * y))
else
tmp = 1.0d0 - (x / ((z - 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.22e-101) {
tmp = 1.0 - (x / ((t - y) * z));
} else if (z <= 5.6e-229) {
tmp = 1.0 - (x / ((y - t) * y));
} else {
tmp = 1.0 - (x / ((z - y) * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.22e-101: tmp = 1.0 - (x / ((t - y) * z)) elif z <= 5.6e-229: tmp = 1.0 - (x / ((y - t) * y)) else: tmp = 1.0 - (x / ((z - y) * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.22e-101) tmp = Float64(1.0 - Float64(x / Float64(Float64(t - y) * z))); elseif (z <= 5.6e-229) tmp = Float64(1.0 - Float64(x / Float64(Float64(y - t) * y))); else tmp = Float64(1.0 - Float64(x / Float64(Float64(z - y) * t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.22e-101) tmp = 1.0 - (x / ((t - y) * z)); elseif (z <= 5.6e-229) tmp = 1.0 - (x / ((y - t) * y)); else tmp = 1.0 - (x / ((z - y) * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.22e-101], N[(1.0 - N[(x / N[(N[(t - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e-229], N[(1.0 - N[(x / N[(N[(y - t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(N[(z - y), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{-101}:\\
\;\;\;\;1 - \frac{x}{\left(t - y\right) \cdot z}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-229}:\\
\;\;\;\;1 - \frac{x}{\left(y - t\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{\left(z - y\right) \cdot t}\\
\end{array}
\end{array}
if z < -1.2199999999999999e-101Initial program 99.9%
Taylor expanded in z around inf
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6495.9
Applied rewrites95.9%
if -1.2199999999999999e-101 < z < 5.5999999999999998e-229Initial program 98.3%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f6493.3
Applied rewrites93.3%
if 5.5999999999999998e-229 < z Initial program 96.5%
Taylor expanded in t around inf
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6475.5
Applied rewrites75.5%
(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(Float64(x / 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[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{\frac{x}{y - z}}{y - t}
\end{array}
Initial program 98.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.2
Applied rewrites99.2%
(FPCore (x y z t) :precision binary64 (if (<= z -1.22e-101) (- 1.0 (/ x (* (- t y) z))) (- 1.0 (/ x (* (- y t) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.22e-101) {
tmp = 1.0 - (x / ((t - y) * z));
} 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 (z <= (-1.22d-101)) then
tmp = 1.0d0 - (x / ((t - y) * z))
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 (z <= -1.22e-101) {
tmp = 1.0 - (x / ((t - y) * z));
} else {
tmp = 1.0 - (x / ((y - t) * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.22e-101: tmp = 1.0 - (x / ((t - y) * z)) else: tmp = 1.0 - (x / ((y - t) * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.22e-101) tmp = Float64(1.0 - Float64(x / Float64(Float64(t - y) * z))); else tmp = Float64(1.0 - Float64(x / Float64(Float64(y - t) * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.22e-101) tmp = 1.0 - (x / ((t - y) * z)); else tmp = 1.0 - (x / ((y - t) * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.22e-101], N[(1.0 - N[(x / N[(N[(t - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(N[(y - t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{-101}:\\
\;\;\;\;1 - \frac{x}{\left(t - y\right) \cdot z}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{\left(y - t\right) \cdot y}\\
\end{array}
\end{array}
if z < -1.2199999999999999e-101Initial program 99.9%
Taylor expanded in z around inf
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
mul-1-negN/A
remove-double-negN/A
lower--.f6495.9
Applied rewrites95.9%
if -1.2199999999999999e-101 < z Initial program 97.2%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f6477.5
Applied rewrites77.5%
(FPCore (x y z t) :precision binary64 (fma (/ -1.0 (* (- y t) (- y z))) x 1.0))
double code(double x, double y, double z, double t) {
return fma((-1.0 / ((y - t) * (y - z))), x, 1.0);
}
function code(x, y, z, t) return fma(Float64(-1.0 / Float64(Float64(y - t) * Float64(y - z))), x, 1.0) end
code[x_, y_, z_, t_] := N[(N[(-1.0 / N[(N[(y - t), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x + 1.0), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{-1}{\left(y - t\right) \cdot \left(y - z\right)}, x, 1\right)
\end{array}
Initial program 98.0%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
distribute-lft-neg-inN/A
distribute-frac-neg2N/A
lower-fma.f64N/A
distribute-frac-neg2N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6498.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6498.1
Applied rewrites98.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 98.0%
(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 98.0%
Taylor expanded in x around 0
Applied rewrites74.7%
herbie shell --seed 2024324
(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)))))