
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (or (<= z -4300000000000.0) (not (<= z 0.0045)))
(- t_1 (/ (* (/ y (- y b)) (- x t_1)) z))
(/ (+ (* (- t a) z) (* x y)) (+ (* (- b y) z) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if ((z <= -4300000000000.0) || !(z <= 0.0045)) {
tmp = t_1 - (((y / (y - b)) * (x - t_1)) / z);
} else {
tmp = (((t - a) * z) + (x * y)) / (((b - y) * z) + y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if ((z <= (-4300000000000.0d0)) .or. (.not. (z <= 0.0045d0))) then
tmp = t_1 - (((y / (y - b)) * (x - t_1)) / z)
else
tmp = (((t - a) * z) + (x * y)) / (((b - y) * z) + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if ((z <= -4300000000000.0) || !(z <= 0.0045)) {
tmp = t_1 - (((y / (y - b)) * (x - t_1)) / z);
} else {
tmp = (((t - a) * z) + (x * y)) / (((b - y) * z) + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if (z <= -4300000000000.0) or not (z <= 0.0045): tmp = t_1 - (((y / (y - b)) * (x - t_1)) / z) else: tmp = (((t - a) * z) + (x * y)) / (((b - y) * z) + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if ((z <= -4300000000000.0) || !(z <= 0.0045)) tmp = Float64(t_1 - Float64(Float64(Float64(y / Float64(y - b)) * Float64(x - t_1)) / z)); else tmp = Float64(Float64(Float64(Float64(t - a) * z) + Float64(x * y)) / Float64(Float64(Float64(b - y) * z) + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if ((z <= -4300000000000.0) || ~((z <= 0.0045))) tmp = t_1 - (((y / (y - b)) * (x - t_1)) / z); else tmp = (((t - a) * z) + (x * y)) / (((b - y) * z) + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -4300000000000.0], N[Not[LessEqual[z, 0.0045]], $MachinePrecision]], N[(t$95$1 - N[(N[(N[(y / N[(y - b), $MachinePrecision]), $MachinePrecision] * N[(x - t$95$1), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t - a), $MachinePrecision] * z), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(b - y), $MachinePrecision] * z), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4300000000000 \lor \neg \left(z \leq 0.0045\right):\\
\;\;\;\;t\_1 - \frac{\frac{y}{y - b} \cdot \left(x - t\_1\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(t - a\right) \cdot z + x \cdot y}{\left(b - y\right) \cdot z + y}\\
\end{array}
\end{array}
if z < -4.3e12 or 0.00449999999999999966 < z Initial program 42.8%
Taylor expanded in z around inf
Applied rewrites98.4%
if -4.3e12 < z < 0.00449999999999999966Initial program 91.1%
Final simplification95.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -7.1e+22) (not (<= z 5.6e+86))) (/ (- t a) (- b y)) (/ (+ (* (- t a) z) (* x y)) (+ (/ z (pow (- b y) -1.0)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.1e+22) || !(z <= 5.6e+86)) {
tmp = (t - a) / (b - y);
} else {
tmp = (((t - a) * z) + (x * y)) / ((z / pow((b - y), -1.0)) + y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-7.1d+22)) .or. (.not. (z <= 5.6d+86))) then
tmp = (t - a) / (b - y)
else
tmp = (((t - a) * z) + (x * y)) / ((z / ((b - y) ** (-1.0d0))) + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.1e+22) || !(z <= 5.6e+86)) {
tmp = (t - a) / (b - y);
} else {
tmp = (((t - a) * z) + (x * y)) / ((z / Math.pow((b - y), -1.0)) + y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -7.1e+22) or not (z <= 5.6e+86): tmp = (t - a) / (b - y) else: tmp = (((t - a) * z) + (x * y)) / ((z / math.pow((b - y), -1.0)) + y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -7.1e+22) || !(z <= 5.6e+86)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(Float64(t - a) * z) + Float64(x * y)) / Float64(Float64(z / (Float64(b - y) ^ -1.0)) + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -7.1e+22) || ~((z <= 5.6e+86))) tmp = (t - a) / (b - y); else tmp = (((t - a) * z) + (x * y)) / ((z / ((b - y) ^ -1.0)) + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7.1e+22], N[Not[LessEqual[z, 5.6e+86]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t - a), $MachinePrecision] * z), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(N[(z / N[Power[N[(b - y), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.1 \cdot 10^{+22} \lor \neg \left(z \leq 5.6 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(t - a\right) \cdot z + x \cdot y}{\frac{z}{{\left(b - y\right)}^{-1}} + y}\\
\end{array}
\end{array}
if z < -7.10000000000000021e22 or 5.60000000000000008e86 < z Initial program 36.4%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6483.7
Applied rewrites83.7%
if -7.10000000000000021e22 < z < 5.60000000000000008e86Initial program 88.5%
lift-*.f64N/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6488.5
Applied rewrites88.5%
Final simplification86.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -7.1e+22) (not (<= z 5.6e+86))) (/ (- t a) (- b y)) (/ (+ (* (- t a) z) (* x y)) (+ (* (- b y) z) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.1e+22) || !(z <= 5.6e+86)) {
tmp = (t - a) / (b - y);
} else {
tmp = (((t - a) * z) + (x * y)) / (((b - y) * z) + y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-7.1d+22)) .or. (.not. (z <= 5.6d+86))) then
tmp = (t - a) / (b - y)
else
tmp = (((t - a) * z) + (x * y)) / (((b - y) * z) + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.1e+22) || !(z <= 5.6e+86)) {
tmp = (t - a) / (b - y);
} else {
tmp = (((t - a) * z) + (x * y)) / (((b - y) * z) + y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -7.1e+22) or not (z <= 5.6e+86): tmp = (t - a) / (b - y) else: tmp = (((t - a) * z) + (x * y)) / (((b - y) * z) + y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -7.1e+22) || !(z <= 5.6e+86)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(Float64(t - a) * z) + Float64(x * y)) / Float64(Float64(Float64(b - y) * z) + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -7.1e+22) || ~((z <= 5.6e+86))) tmp = (t - a) / (b - y); else tmp = (((t - a) * z) + (x * y)) / (((b - y) * z) + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7.1e+22], N[Not[LessEqual[z, 5.6e+86]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t - a), $MachinePrecision] * z), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(b - y), $MachinePrecision] * z), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.1 \cdot 10^{+22} \lor \neg \left(z \leq 5.6 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(t - a\right) \cdot z + x \cdot y}{\left(b - y\right) \cdot z + y}\\
\end{array}
\end{array}
if z < -7.10000000000000021e22 or 5.60000000000000008e86 < z Initial program 36.4%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6483.7
Applied rewrites83.7%
if -7.10000000000000021e22 < z < 5.60000000000000008e86Initial program 88.5%
Final simplification86.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.15e-27) (not (<= z 22000000.0))) (/ (- t a) (- b y)) (/ (fma t z (* x y)) (fma (- b y) z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.15e-27) || !(z <= 22000000.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = fma(t, z, (x * y)) / fma((b - y), z, y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.15e-27) || !(z <= 22000000.0)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(fma(t, z, Float64(x * y)) / fma(Float64(b - y), z, y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.15e-27], N[Not[LessEqual[z, 22000000.0]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-27} \lor \neg \left(z \leq 22000000\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, z, x \cdot y\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\
\end{array}
\end{array}
if z < -1.15e-27 or 2.2e7 < z Initial program 45.0%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6478.3
Applied rewrites78.3%
if -1.15e-27 < z < 2.2e7Initial program 91.4%
Taylor expanded in a around 0
lower-/.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6474.6
Applied rewrites74.6%
Final simplification76.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- b y) z y)) (t_2 (/ (- t a) (- b y))))
(if (<= z -320000000000.0)
t_2
(if (<= z -2.8e-64)
(/ (* (- t a) z) t_1)
(if (<= z 1.22e-5) (* (/ y t_1) x) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((b - y), z, y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -320000000000.0) {
tmp = t_2;
} else if (z <= -2.8e-64) {
tmp = ((t - a) * z) / t_1;
} else if (z <= 1.22e-5) {
tmp = (y / t_1) * x;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(b - y), z, y) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -320000000000.0) tmp = t_2; elseif (z <= -2.8e-64) tmp = Float64(Float64(Float64(t - a) * z) / t_1); elseif (z <= 1.22e-5) tmp = Float64(Float64(y / t_1) * x); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -320000000000.0], t$95$2, If[LessEqual[z, -2.8e-64], N[(N[(N[(t - a), $MachinePrecision] * z), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 1.22e-5], N[(N[(y / t$95$1), $MachinePrecision] * x), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - y, z, y\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -320000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-64}:\\
\;\;\;\;\frac{\left(t - a\right) \cdot z}{t\_1}\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{-5}:\\
\;\;\;\;\frac{y}{t\_1} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.2e11 or 1.22000000000000001e-5 < z Initial program 42.8%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.1
Applied rewrites80.1%
if -3.2e11 < z < -2.80000000000000004e-64Initial program 90.5%
lift-*.f64N/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6490.6
Applied rewrites90.6%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6470.1
Applied rewrites70.1%
if -2.80000000000000004e-64 < z < 1.22000000000000001e-5Initial program 91.3%
Taylor expanded in x around inf
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6464.8
Applied rewrites64.8%
Final simplification73.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.7e-64) (not (<= z 1.22e-5))) (/ (- t a) (- b y)) (* (/ y (fma (- b y) z y)) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.7e-64) || !(z <= 1.22e-5)) {
tmp = (t - a) / (b - y);
} else {
tmp = (y / fma((b - y), z, y)) * x;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.7e-64) || !(z <= 1.22e-5)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(y / fma(Float64(b - y), z, y)) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.7e-64], N[Not[LessEqual[z, 1.22e-5]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.7 \cdot 10^{-64} \lor \neg \left(z \leq 1.22 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(b - y, z, y\right)} \cdot x\\
\end{array}
\end{array}
if z < -5.7000000000000003e-64 or 1.22000000000000001e-5 < z Initial program 49.3%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6476.0
Applied rewrites76.0%
if -5.7000000000000003e-64 < z < 1.22000000000000001e-5Initial program 91.3%
Taylor expanded in x around inf
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6464.8
Applied rewrites64.8%
Final simplification71.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -3.3e+15)
t_1
(if (<= y 3.3e-121) (/ t (- b y)) (if (<= y 2.4e+33) (/ (- a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.3e+15) {
tmp = t_1;
} else if (y <= 3.3e-121) {
tmp = t / (b - y);
} else if (y <= 2.4e+33) {
tmp = -a / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-3.3d+15)) then
tmp = t_1
else if (y <= 3.3d-121) then
tmp = t / (b - y)
else if (y <= 2.4d+33) then
tmp = -a / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.3e+15) {
tmp = t_1;
} else if (y <= 3.3e-121) {
tmp = t / (b - y);
} else if (y <= 2.4e+33) {
tmp = -a / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -3.3e+15: tmp = t_1 elif y <= 3.3e-121: tmp = t / (b - y) elif y <= 2.4e+33: tmp = -a / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.3e+15) tmp = t_1; elseif (y <= 3.3e-121) tmp = Float64(t / Float64(b - y)); elseif (y <= 2.4e+33) tmp = Float64(Float64(-a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -3.3e+15) tmp = t_1; elseif (y <= 3.3e-121) tmp = t / (b - y); elseif (y <= 2.4e+33) tmp = -a / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.3e+15], t$95$1, If[LessEqual[y, 3.3e-121], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+33], N[((-a) / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.3 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-121}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+33}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.3e15 or 2.4e33 < y Initial program 52.2%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6455.7
Applied rewrites55.7%
if -3.3e15 < y < 3.3000000000000001e-121Initial program 79.6%
Taylor expanded in t around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6440.5
Applied rewrites40.5%
Taylor expanded in z around inf
Applied rewrites47.3%
if 3.3000000000000001e-121 < y < 2.4e33Initial program 65.5%
Taylor expanded in b around inf
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f6438.3
Applied rewrites38.3%
Taylor expanded in a around inf
Applied rewrites45.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -3.6e-61)
t_1
(if (<= z 1.22e-5) (fma x z x) (if (<= z 1.5e+225) t_1 (/ (- a) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -3.6e-61) {
tmp = t_1;
} else if (z <= 1.22e-5) {
tmp = fma(x, z, x);
} else if (z <= 1.5e+225) {
tmp = t_1;
} else {
tmp = -a / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -3.6e-61) tmp = t_1; elseif (z <= 1.22e-5) tmp = fma(x, z, x); elseif (z <= 1.5e+225) tmp = t_1; else tmp = Float64(Float64(-a) / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e-61], t$95$1, If[LessEqual[z, 1.22e-5], N[(x * z + x), $MachinePrecision], If[LessEqual[z, 1.5e+225], t$95$1, N[((-a) / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{fma}\left(x, z, x\right)\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+225}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-a}{b}\\
\end{array}
\end{array}
if z < -3.60000000000000014e-61 or 1.22000000000000001e-5 < z < 1.5e225Initial program 51.0%
Taylor expanded in t around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6432.0
Applied rewrites32.0%
Taylor expanded in z around inf
Applied rewrites43.3%
if -3.60000000000000014e-61 < z < 1.22000000000000001e-5Initial program 91.3%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6450.9
Applied rewrites50.9%
Taylor expanded in z around 0
Applied rewrites51.0%
if 1.5e225 < z Initial program 36.0%
Taylor expanded in b around inf
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f6431.4
Applied rewrites31.4%
Taylor expanded in a around inf
Applied rewrites59.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.8e-64) (not (<= z 3.1e-8))) (/ (- t a) (- b y)) (fma x z x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.8e-64) || !(z <= 3.1e-8)) {
tmp = (t - a) / (b - y);
} else {
tmp = fma(x, z, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.8e-64) || !(z <= 3.1e-8)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = fma(x, z, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.8e-64], N[Not[LessEqual[z, 3.1e-8]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * z + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-64} \lor \neg \left(z \leq 3.1 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, z, x\right)\\
\end{array}
\end{array}
if z < -2.80000000000000004e-64 or 3.1e-8 < z Initial program 49.3%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6476.0
Applied rewrites76.0%
if -2.80000000000000004e-64 < z < 3.1e-8Initial program 91.3%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in z around 0
Applied rewrites51.4%
Final simplification66.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -650000000000.0) (not (<= y 3e+79))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -650000000000.0) || !(y <= 3e+79)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-650000000000.0d0)) .or. (.not. (y <= 3d+79))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -650000000000.0) || !(y <= 3e+79)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -650000000000.0) or not (y <= 3e+79): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -650000000000.0) || !(y <= 3e+79)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -650000000000.0) || ~((y <= 3e+79))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -650000000000.0], N[Not[LessEqual[y, 3e+79]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -650000000000 \lor \neg \left(y \leq 3 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -6.5e11 or 2.99999999999999974e79 < y Initial program 51.5%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6456.8
Applied rewrites56.8%
if -6.5e11 < y < 2.99999999999999974e79Initial program 76.4%
Taylor expanded in y around 0
lower-/.f64N/A
lower--.f6457.9
Applied rewrites57.9%
Final simplification57.4%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.6e-61) (/ t b) (if (<= z 11500000.0) (fma x z x) (/ (- a) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.6e-61) {
tmp = t / b;
} else if (z <= 11500000.0) {
tmp = fma(x, z, x);
} else {
tmp = -a / b;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.6e-61) tmp = Float64(t / b); elseif (z <= 11500000.0) tmp = fma(x, z, x); else tmp = Float64(Float64(-a) / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.6e-61], N[(t / b), $MachinePrecision], If[LessEqual[z, 11500000.0], N[(x * z + x), $MachinePrecision], N[((-a) / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-61}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 11500000:\\
\;\;\;\;\mathsf{fma}\left(x, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-a}{b}\\
\end{array}
\end{array}
if z < -3.60000000000000014e-61Initial program 50.3%
Taylor expanded in b around inf
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f6433.0
Applied rewrites33.0%
Taylor expanded in t around inf
Applied rewrites35.2%
if -3.60000000000000014e-61 < z < 1.15e7Initial program 90.8%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6449.1
Applied rewrites49.1%
Taylor expanded in z around 0
Applied rewrites49.2%
if 1.15e7 < z Initial program 45.8%
Taylor expanded in b around inf
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f6434.7
Applied rewrites34.7%
Taylor expanded in a around inf
Applied rewrites33.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.7e+15) (fma (fma x z x) z x) (if (<= y 0.056) (/ t b) (* 1.0 x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.7e+15) {
tmp = fma(fma(x, z, x), z, x);
} else if (y <= 0.056) {
tmp = t / b;
} else {
tmp = 1.0 * x;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.7e+15) tmp = fma(fma(x, z, x), z, x); elseif (y <= 0.056) tmp = Float64(t / b); else tmp = Float64(1.0 * x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.7e+15], N[(N[(x * z + x), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[y, 0.056], N[(t / b), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(x, z, x\right), z, x\right)\\
\mathbf{elif}\;y \leq 0.056:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if y < -2.7e15Initial program 47.7%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6452.6
Applied rewrites52.6%
Taylor expanded in z around 0
Applied rewrites38.3%
if -2.7e15 < y < 0.0560000000000000012Initial program 77.0%
Taylor expanded in b around inf
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f6448.2
Applied rewrites48.2%
Taylor expanded in t around inf
Applied rewrites39.2%
if 0.0560000000000000012 < y Initial program 59.0%
lift-*.f64N/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6459.0
Applied rewrites59.0%
Taylor expanded in x around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6443.4
Applied rewrites43.4%
Taylor expanded in z around 0
Applied rewrites35.8%
Final simplification38.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -780000000000.0) (* (+ 1.0 z) x) (if (<= y 0.056) (/ t b) (* 1.0 x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -780000000000.0) {
tmp = (1.0 + z) * x;
} else if (y <= 0.056) {
tmp = t / b;
} else {
tmp = 1.0 * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-780000000000.0d0)) then
tmp = (1.0d0 + z) * x
else if (y <= 0.056d0) then
tmp = t / b
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -780000000000.0) {
tmp = (1.0 + z) * x;
} else if (y <= 0.056) {
tmp = t / b;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -780000000000.0: tmp = (1.0 + z) * x elif y <= 0.056: tmp = t / b else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -780000000000.0) tmp = Float64(Float64(1.0 + z) * x); elseif (y <= 0.056) tmp = Float64(t / b); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -780000000000.0) tmp = (1.0 + z) * x; elseif (y <= 0.056) tmp = t / b; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -780000000000.0], N[(N[(1.0 + z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 0.056], N[(t / b), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -780000000000:\\
\;\;\;\;\left(1 + z\right) \cdot x\\
\mathbf{elif}\;y \leq 0.056:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if y < -7.8e11Initial program 49.3%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6451.0
Applied rewrites51.0%
Taylor expanded in z around 0
Applied rewrites36.6%
Applied rewrites36.6%
if -7.8e11 < y < 0.0560000000000000012Initial program 76.7%
Taylor expanded in b around inf
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f6448.9
Applied rewrites48.9%
Taylor expanded in t around inf
Applied rewrites39.8%
if 0.0560000000000000012 < y Initial program 59.0%
lift-*.f64N/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6459.0
Applied rewrites59.0%
Taylor expanded in x around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6443.4
Applied rewrites43.4%
Taylor expanded in z around 0
Applied rewrites35.8%
Final simplification38.0%
(FPCore (x y z t a b) :precision binary64 (* (+ 1.0 z) x))
double code(double x, double y, double z, double t, double a, double b) {
return (1.0 + z) * x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (1.0d0 + z) * x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (1.0 + z) * x;
}
def code(x, y, z, t, a, b): return (1.0 + z) * x
function code(x, y, z, t, a, b) return Float64(Float64(1.0 + z) * x) end
function tmp = code(x, y, z, t, a, b) tmp = (1.0 + z) * x; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(1.0 + z), $MachinePrecision] * x), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + z\right) \cdot x
\end{array}
Initial program 65.7%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6431.6
Applied rewrites31.6%
Taylor expanded in z around 0
Applied rewrites23.2%
Applied rewrites23.2%
(FPCore (x y z t a b) :precision binary64 (fma x z x))
double code(double x, double y, double z, double t, double a, double b) {
return fma(x, z, x);
}
function code(x, y, z, t, a, b) return fma(x, z, x) end
code[x_, y_, z_, t_, a_, b_] := N[(x * z + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, z, x\right)
\end{array}
Initial program 65.7%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6431.6
Applied rewrites31.6%
Taylor expanded in z around 0
Applied rewrites23.2%
(FPCore (x y z t a b) :precision binary64 (* 1.0 x))
double code(double x, double y, double z, double t, double a, double b) {
return 1.0 * x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = 1.0d0 * x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return 1.0 * x;
}
def code(x, y, z, t, a, b): return 1.0 * x
function code(x, y, z, t, a, b) return Float64(1.0 * x) end
function tmp = code(x, y, z, t, a, b) tmp = 1.0 * x; end
code[x_, y_, z_, t_, a_, b_] := N[(1.0 * x), $MachinePrecision]
\begin{array}{l}
\\
1 \cdot x
\end{array}
Initial program 65.7%
lift-*.f64N/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6465.7
Applied rewrites65.7%
Taylor expanded in x around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6434.4
Applied rewrites34.4%
Taylor expanded in z around 0
Applied rewrites23.1%
Final simplification23.1%
(FPCore (x y z t a b) :precision binary64 (* x z))
double code(double x, double y, double z, double t, double a, double b) {
return x * z;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * z
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * z;
}
def code(x, y, z, t, a, b): return x * z
function code(x, y, z, t, a, b) return Float64(x * z) end
function tmp = code(x, y, z, t, a, b) tmp = x * z; end
code[x_, y_, z_, t_, a_, b_] := N[(x * z), $MachinePrecision]
\begin{array}{l}
\\
x \cdot z
\end{array}
Initial program 65.7%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6431.6
Applied rewrites31.6%
Taylor expanded in z around 0
Applied rewrites23.2%
Taylor expanded in z around inf
Applied rewrites4.0%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2024271
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(! :herbie-platform default (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))