
(FPCore (d1 d2 d3 d4) :precision binary64 (- (+ (- (* d1 d2) (* d1 d3)) (* d4 d1)) (* d1 d1)))
double code(double d1, double d2, double d3, double d4) {
return (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1);
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
code = (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1)
end function
public static double code(double d1, double d2, double d3, double d4) {
return (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1);
}
def code(d1, d2, d3, d4): return (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1)
function code(d1, d2, d3, d4) return Float64(Float64(Float64(Float64(d1 * d2) - Float64(d1 * d3)) + Float64(d4 * d1)) - Float64(d1 * d1)) end
function tmp = code(d1, d2, d3, d4) tmp = (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1); end
code[d1_, d2_, d3_, d4_] := N[(N[(N[(N[(d1 * d2), $MachinePrecision] - N[(d1 * d3), $MachinePrecision]), $MachinePrecision] + N[(d4 * d1), $MachinePrecision]), $MachinePrecision] - N[(d1 * d1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(d1 \cdot d2 - d1 \cdot d3\right) + d4 \cdot d1\right) - d1 \cdot d1
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (d1 d2 d3 d4) :precision binary64 (- (+ (- (* d1 d2) (* d1 d3)) (* d4 d1)) (* d1 d1)))
double code(double d1, double d2, double d3, double d4) {
return (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1);
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
code = (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1)
end function
public static double code(double d1, double d2, double d3, double d4) {
return (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1);
}
def code(d1, d2, d3, d4): return (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1)
function code(d1, d2, d3, d4) return Float64(Float64(Float64(Float64(d1 * d2) - Float64(d1 * d3)) + Float64(d4 * d1)) - Float64(d1 * d1)) end
function tmp = code(d1, d2, d3, d4) tmp = (((d1 * d2) - (d1 * d3)) + (d4 * d1)) - (d1 * d1); end
code[d1_, d2_, d3_, d4_] := N[(N[(N[(N[(d1 * d2), $MachinePrecision] - N[(d1 * d3), $MachinePrecision]), $MachinePrecision] + N[(d4 * d1), $MachinePrecision]), $MachinePrecision] - N[(d1 * d1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(d1 \cdot d2 - d1 \cdot d3\right) + d4 \cdot d1\right) - d1 \cdot d1
\end{array}
(FPCore (d1 d2 d3 d4) :precision binary64 (* d1 (- (+ d4 (- d2 d3)) d1)))
double code(double d1, double d2, double d3, double d4) {
return d1 * ((d4 + (d2 - d3)) - d1);
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
code = d1 * ((d4 + (d2 - d3)) - d1)
end function
public static double code(double d1, double d2, double d3, double d4) {
return d1 * ((d4 + (d2 - d3)) - d1);
}
def code(d1, d2, d3, d4): return d1 * ((d4 + (d2 - d3)) - d1)
function code(d1, d2, d3, d4) return Float64(d1 * Float64(Float64(d4 + Float64(d2 - d3)) - d1)) end
function tmp = code(d1, d2, d3, d4) tmp = d1 * ((d4 + (d2 - d3)) - d1); end
code[d1_, d2_, d3_, d4_] := N[(d1 * N[(N[(d4 + N[(d2 - d3), $MachinePrecision]), $MachinePrecision] - d1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d1 \cdot \left(\left(d4 + \left(d2 - d3\right)\right) - d1\right)
\end{array}
Initial program 87.9%
+-commutative87.9%
*-commutative87.9%
distribute-lft-out--89.0%
distribute-lft-out91.4%
distribute-lft-out--100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (d1 d2 d3 d4)
:precision binary64
(let* ((t_0 (* d1 (- d2 d3))))
(if (<= d3 -4.6)
t_0
(if (<= d3 -4.6e-240)
(* d1 (+ d4 d2))
(if (<= d3 5.7e+23) (* d1 (- d2 d1)) t_0)))))
double code(double d1, double d2, double d3, double d4) {
double t_0 = d1 * (d2 - d3);
double tmp;
if (d3 <= -4.6) {
tmp = t_0;
} else if (d3 <= -4.6e-240) {
tmp = d1 * (d4 + d2);
} else if (d3 <= 5.7e+23) {
tmp = d1 * (d2 - d1);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
real(8) :: t_0
real(8) :: tmp
t_0 = d1 * (d2 - d3)
if (d3 <= (-4.6d0)) then
tmp = t_0
else if (d3 <= (-4.6d-240)) then
tmp = d1 * (d4 + d2)
else if (d3 <= 5.7d+23) then
tmp = d1 * (d2 - d1)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double t_0 = d1 * (d2 - d3);
double tmp;
if (d3 <= -4.6) {
tmp = t_0;
} else if (d3 <= -4.6e-240) {
tmp = d1 * (d4 + d2);
} else if (d3 <= 5.7e+23) {
tmp = d1 * (d2 - d1);
} else {
tmp = t_0;
}
return tmp;
}
def code(d1, d2, d3, d4): t_0 = d1 * (d2 - d3) tmp = 0 if d3 <= -4.6: tmp = t_0 elif d3 <= -4.6e-240: tmp = d1 * (d4 + d2) elif d3 <= 5.7e+23: tmp = d1 * (d2 - d1) else: tmp = t_0 return tmp
function code(d1, d2, d3, d4) t_0 = Float64(d1 * Float64(d2 - d3)) tmp = 0.0 if (d3 <= -4.6) tmp = t_0; elseif (d3 <= -4.6e-240) tmp = Float64(d1 * Float64(d4 + d2)); elseif (d3 <= 5.7e+23) tmp = Float64(d1 * Float64(d2 - d1)); else tmp = t_0; end return tmp end
function tmp_2 = code(d1, d2, d3, d4) t_0 = d1 * (d2 - d3); tmp = 0.0; if (d3 <= -4.6) tmp = t_0; elseif (d3 <= -4.6e-240) tmp = d1 * (d4 + d2); elseif (d3 <= 5.7e+23) tmp = d1 * (d2 - d1); else tmp = t_0; end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := Block[{t$95$0 = N[(d1 * N[(d2 - d3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d3, -4.6], t$95$0, If[LessEqual[d3, -4.6e-240], N[(d1 * N[(d4 + d2), $MachinePrecision]), $MachinePrecision], If[LessEqual[d3, 5.7e+23], N[(d1 * N[(d2 - d1), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := d1 \cdot \left(d2 - d3\right)\\
\mathbf{if}\;d3 \leq -4.6:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;d3 \leq -4.6 \cdot 10^{-240}:\\
\;\;\;\;d1 \cdot \left(d4 + d2\right)\\
\mathbf{elif}\;d3 \leq 5.7 \cdot 10^{+23}:\\
\;\;\;\;d1 \cdot \left(d2 - d1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if d3 < -4.5999999999999996 or 5.7e23 < d3 Initial program 84.2%
+-commutative84.2%
*-commutative84.2%
distribute-lft-out--86.8%
distribute-lft-out88.5%
distribute-lft-out--99.9%
Simplified99.9%
Taylor expanded in d4 around 0 89.6%
+-commutative89.6%
associate--l-89.6%
Simplified89.6%
Taylor expanded in d1 around 0 79.9%
if -4.5999999999999996 < d3 < -4.59999999999999986e-240Initial program 88.1%
+-commutative88.1%
*-commutative88.1%
distribute-lft-out--88.1%
distribute-lft-out91.5%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d3 around 0 95.0%
Taylor expanded in d1 around 0 71.8%
if -4.59999999999999986e-240 < d3 < 5.7e23Initial program 92.7%
+-commutative92.7%
*-commutative92.7%
distribute-lft-out--92.7%
distribute-lft-out95.1%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d4 around 0 74.9%
+-commutative74.9%
associate--l-74.9%
Simplified74.9%
Taylor expanded in d3 around 0 72.3%
Final simplification75.6%
(FPCore (d1 d2 d3 d4)
:precision binary64
(if (<= d3 -0.072)
(* d1 (- d2 d3))
(if (<= d3 -7.5e-240)
(* d1 (+ d4 d2))
(if (<= d3 1.15e+42) (* d1 (- d2 d1)) (* d1 (- d4 d3))))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d3 <= -0.072) {
tmp = d1 * (d2 - d3);
} else if (d3 <= -7.5e-240) {
tmp = d1 * (d4 + d2);
} else if (d3 <= 1.15e+42) {
tmp = d1 * (d2 - d1);
} else {
tmp = d1 * (d4 - d3);
}
return tmp;
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
real(8) :: tmp
if (d3 <= (-0.072d0)) then
tmp = d1 * (d2 - d3)
else if (d3 <= (-7.5d-240)) then
tmp = d1 * (d4 + d2)
else if (d3 <= 1.15d+42) then
tmp = d1 * (d2 - d1)
else
tmp = d1 * (d4 - d3)
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d3 <= -0.072) {
tmp = d1 * (d2 - d3);
} else if (d3 <= -7.5e-240) {
tmp = d1 * (d4 + d2);
} else if (d3 <= 1.15e+42) {
tmp = d1 * (d2 - d1);
} else {
tmp = d1 * (d4 - d3);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d3 <= -0.072: tmp = d1 * (d2 - d3) elif d3 <= -7.5e-240: tmp = d1 * (d4 + d2) elif d3 <= 1.15e+42: tmp = d1 * (d2 - d1) else: tmp = d1 * (d4 - d3) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d3 <= -0.072) tmp = Float64(d1 * Float64(d2 - d3)); elseif (d3 <= -7.5e-240) tmp = Float64(d1 * Float64(d4 + d2)); elseif (d3 <= 1.15e+42) tmp = Float64(d1 * Float64(d2 - d1)); else tmp = Float64(d1 * Float64(d4 - d3)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d3 <= -0.072) tmp = d1 * (d2 - d3); elseif (d3 <= -7.5e-240) tmp = d1 * (d4 + d2); elseif (d3 <= 1.15e+42) tmp = d1 * (d2 - d1); else tmp = d1 * (d4 - d3); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d3, -0.072], N[(d1 * N[(d2 - d3), $MachinePrecision]), $MachinePrecision], If[LessEqual[d3, -7.5e-240], N[(d1 * N[(d4 + d2), $MachinePrecision]), $MachinePrecision], If[LessEqual[d3, 1.15e+42], N[(d1 * N[(d2 - d1), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(d4 - d3), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d3 \leq -0.072:\\
\;\;\;\;d1 \cdot \left(d2 - d3\right)\\
\mathbf{elif}\;d3 \leq -7.5 \cdot 10^{-240}:\\
\;\;\;\;d1 \cdot \left(d4 + d2\right)\\
\mathbf{elif}\;d3 \leq 1.15 \cdot 10^{+42}:\\
\;\;\;\;d1 \cdot \left(d2 - d1\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\end{array}
if d3 < -0.0719999999999999946Initial program 86.9%
+-commutative86.9%
*-commutative86.9%
distribute-lft-out--86.9%
distribute-lft-out88.3%
distribute-lft-out--99.9%
Simplified99.9%
Taylor expanded in d4 around 0 92.4%
+-commutative92.4%
associate--l-92.4%
Simplified92.4%
Taylor expanded in d1 around 0 77.6%
if -0.0719999999999999946 < d3 < -7.4999999999999995e-240Initial program 88.1%
+-commutative88.1%
*-commutative88.1%
distribute-lft-out--88.1%
distribute-lft-out91.5%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d3 around 0 95.0%
Taylor expanded in d1 around 0 71.8%
if -7.4999999999999995e-240 < d3 < 1.15e42Initial program 91.6%
+-commutative91.6%
*-commutative91.6%
distribute-lft-out--91.6%
distribute-lft-out94.0%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d4 around 0 75.2%
+-commutative75.2%
associate--l-75.2%
Simplified75.2%
Taylor expanded in d3 around 0 72.6%
if 1.15e42 < d3 Initial program 81.8%
Taylor expanded in d2 around 0 82.0%
distribute-lft-out--84.2%
Simplified84.2%
distribute-lft-out--91.0%
associate--r+91.0%
+-commutative91.0%
*-commutative91.0%
Applied egg-rr91.0%
Taylor expanded in d1 around 0 86.7%
Final simplification76.2%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d3 -1.65e+70) (* d1 (- d2 d3)) (if (<= d3 1.15e+42) (* d1 (- (+ d4 d2) d1)) (* d1 (- d4 d3)))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d3 <= -1.65e+70) {
tmp = d1 * (d2 - d3);
} else if (d3 <= 1.15e+42) {
tmp = d1 * ((d4 + d2) - d1);
} else {
tmp = d1 * (d4 - d3);
}
return tmp;
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
real(8) :: tmp
if (d3 <= (-1.65d+70)) then
tmp = d1 * (d2 - d3)
else if (d3 <= 1.15d+42) then
tmp = d1 * ((d4 + d2) - d1)
else
tmp = d1 * (d4 - d3)
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d3 <= -1.65e+70) {
tmp = d1 * (d2 - d3);
} else if (d3 <= 1.15e+42) {
tmp = d1 * ((d4 + d2) - d1);
} else {
tmp = d1 * (d4 - d3);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d3 <= -1.65e+70: tmp = d1 * (d2 - d3) elif d3 <= 1.15e+42: tmp = d1 * ((d4 + d2) - d1) else: tmp = d1 * (d4 - d3) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d3 <= -1.65e+70) tmp = Float64(d1 * Float64(d2 - d3)); elseif (d3 <= 1.15e+42) tmp = Float64(d1 * Float64(Float64(d4 + d2) - d1)); else tmp = Float64(d1 * Float64(d4 - d3)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d3 <= -1.65e+70) tmp = d1 * (d2 - d3); elseif (d3 <= 1.15e+42) tmp = d1 * ((d4 + d2) - d1); else tmp = d1 * (d4 - d3); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d3, -1.65e+70], N[(d1 * N[(d2 - d3), $MachinePrecision]), $MachinePrecision], If[LessEqual[d3, 1.15e+42], N[(d1 * N[(N[(d4 + d2), $MachinePrecision] - d1), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(d4 - d3), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d3 \leq -1.65 \cdot 10^{+70}:\\
\;\;\;\;d1 \cdot \left(d2 - d3\right)\\
\mathbf{elif}\;d3 \leq 1.15 \cdot 10^{+42}:\\
\;\;\;\;d1 \cdot \left(\left(d4 + d2\right) - d1\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\end{array}
if d3 < -1.65000000000000008e70Initial program 84.9%
+-commutative84.9%
*-commutative84.9%
distribute-lft-out--84.9%
distribute-lft-out86.7%
distribute-lft-out--99.9%
Simplified99.9%
Taylor expanded in d4 around 0 92.0%
+-commutative92.0%
associate--l-92.0%
Simplified92.0%
Taylor expanded in d1 around 0 84.4%
if -1.65000000000000008e70 < d3 < 1.15e42Initial program 90.5%
+-commutative90.5%
*-commutative90.5%
distribute-lft-out--90.5%
distribute-lft-out93.0%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d3 around 0 93.6%
if 1.15e42 < d3 Initial program 81.8%
Taylor expanded in d2 around 0 82.0%
distribute-lft-out--84.2%
Simplified84.2%
distribute-lft-out--91.0%
associate--r+91.0%
+-commutative91.0%
*-commutative91.0%
Applied egg-rr91.0%
Taylor expanded in d1 around 0 86.7%
Final simplification90.5%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d2 -1.12e+64) (* d1 (- d2 d3)) (if (<= d2 -1.05e-233) (* d1 (- (- d3) d1)) (* d1 (- d4 d1)))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d2 <= -1.12e+64) {
tmp = d1 * (d2 - d3);
} else if (d2 <= -1.05e-233) {
tmp = d1 * (-d3 - d1);
} else {
tmp = d1 * (d4 - d1);
}
return tmp;
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
real(8) :: tmp
if (d2 <= (-1.12d+64)) then
tmp = d1 * (d2 - d3)
else if (d2 <= (-1.05d-233)) then
tmp = d1 * (-d3 - d1)
else
tmp = d1 * (d4 - d1)
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d2 <= -1.12e+64) {
tmp = d1 * (d2 - d3);
} else if (d2 <= -1.05e-233) {
tmp = d1 * (-d3 - d1);
} else {
tmp = d1 * (d4 - d1);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d2 <= -1.12e+64: tmp = d1 * (d2 - d3) elif d2 <= -1.05e-233: tmp = d1 * (-d3 - d1) else: tmp = d1 * (d4 - d1) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d2 <= -1.12e+64) tmp = Float64(d1 * Float64(d2 - d3)); elseif (d2 <= -1.05e-233) tmp = Float64(d1 * Float64(Float64(-d3) - d1)); else tmp = Float64(d1 * Float64(d4 - d1)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d2 <= -1.12e+64) tmp = d1 * (d2 - d3); elseif (d2 <= -1.05e-233) tmp = d1 * (-d3 - d1); else tmp = d1 * (d4 - d1); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d2, -1.12e+64], N[(d1 * N[(d2 - d3), $MachinePrecision]), $MachinePrecision], If[LessEqual[d2, -1.05e-233], N[(d1 * N[((-d3) - d1), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(d4 - d1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d2 \leq -1.12 \cdot 10^{+64}:\\
\;\;\;\;d1 \cdot \left(d2 - d3\right)\\
\mathbf{elif}\;d2 \leq -1.05 \cdot 10^{-233}:\\
\;\;\;\;d1 \cdot \left(\left(-d3\right) - d1\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d1\right)\\
\end{array}
\end{array}
if d2 < -1.11999999999999995e64Initial program 87.5%
+-commutative87.5%
*-commutative87.5%
distribute-lft-out--87.5%
distribute-lft-out91.0%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d4 around 0 93.9%
+-commutative93.9%
associate--l-93.9%
Simplified93.9%
Taylor expanded in d1 around 0 88.5%
if -1.11999999999999995e64 < d2 < -1.0499999999999999e-233Initial program 89.5%
Taylor expanded in d2 around 0 85.9%
distribute-lft-out--87.3%
Simplified87.3%
distribute-lft-out--96.4%
associate--r+96.4%
+-commutative96.4%
*-commutative96.4%
Applied egg-rr96.4%
Taylor expanded in d4 around 0 73.8%
neg-mul-173.8%
distribute-rgt-neg-in73.8%
distribute-neg-in73.8%
sub-neg73.8%
Simplified73.8%
if -1.0499999999999999e-233 < d2 Initial program 87.0%
Taylor expanded in d2 around 0 72.6%
distribute-lft-out--73.4%
Simplified73.4%
distribute-lft-out--79.9%
associate--r+79.9%
+-commutative79.9%
*-commutative79.9%
Applied egg-rr79.9%
Taylor expanded in d3 around 0 60.3%
Final simplification70.6%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (or (<= d3 -1.9e+91) (not (<= d3 1.26e+113))) (* d1 (- d3)) (* d1 (+ d4 d2))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if ((d3 <= -1.9e+91) || !(d3 <= 1.26e+113)) {
tmp = d1 * -d3;
} else {
tmp = d1 * (d4 + d2);
}
return tmp;
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
real(8) :: tmp
if ((d3 <= (-1.9d+91)) .or. (.not. (d3 <= 1.26d+113))) then
tmp = d1 * -d3
else
tmp = d1 * (d4 + d2)
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if ((d3 <= -1.9e+91) || !(d3 <= 1.26e+113)) {
tmp = d1 * -d3;
} else {
tmp = d1 * (d4 + d2);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if (d3 <= -1.9e+91) or not (d3 <= 1.26e+113): tmp = d1 * -d3 else: tmp = d1 * (d4 + d2) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if ((d3 <= -1.9e+91) || !(d3 <= 1.26e+113)) tmp = Float64(d1 * Float64(-d3)); else tmp = Float64(d1 * Float64(d4 + d2)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if ((d3 <= -1.9e+91) || ~((d3 <= 1.26e+113))) tmp = d1 * -d3; else tmp = d1 * (d4 + d2); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[Or[LessEqual[d3, -1.9e+91], N[Not[LessEqual[d3, 1.26e+113]], $MachinePrecision]], N[(d1 * (-d3)), $MachinePrecision], N[(d1 * N[(d4 + d2), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d3 \leq -1.9 \cdot 10^{+91} \lor \neg \left(d3 \leq 1.26 \cdot 10^{+113}\right):\\
\;\;\;\;d1 \cdot \left(-d3\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 + d2\right)\\
\end{array}
\end{array}
if d3 < -1.8999999999999999e91 or 1.2599999999999999e113 < d3 Initial program 82.6%
+-commutative82.6%
*-commutative82.6%
distribute-lft-out--86.0%
distribute-lft-out88.3%
distribute-lft-out--99.9%
Simplified99.9%
Taylor expanded in d3 around inf 79.3%
mul-1-neg79.3%
distribute-rgt-neg-out79.3%
Simplified79.3%
if -1.8999999999999999e91 < d3 < 1.2599999999999999e113Initial program 90.5%
+-commutative90.5%
*-commutative90.5%
distribute-lft-out--90.5%
distribute-lft-out92.9%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d3 around 0 92.3%
Taylor expanded in d1 around 0 65.6%
Final simplification70.2%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (or (<= d3 -9.5e+118) (not (<= d3 4.5e+59))) (* d1 (- d3)) (* d1 (- d2 d1))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if ((d3 <= -9.5e+118) || !(d3 <= 4.5e+59)) {
tmp = d1 * -d3;
} else {
tmp = d1 * (d2 - d1);
}
return tmp;
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
real(8) :: tmp
if ((d3 <= (-9.5d+118)) .or. (.not. (d3 <= 4.5d+59))) then
tmp = d1 * -d3
else
tmp = d1 * (d2 - d1)
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if ((d3 <= -9.5e+118) || !(d3 <= 4.5e+59)) {
tmp = d1 * -d3;
} else {
tmp = d1 * (d2 - d1);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if (d3 <= -9.5e+118) or not (d3 <= 4.5e+59): tmp = d1 * -d3 else: tmp = d1 * (d2 - d1) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if ((d3 <= -9.5e+118) || !(d3 <= 4.5e+59)) tmp = Float64(d1 * Float64(-d3)); else tmp = Float64(d1 * Float64(d2 - d1)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if ((d3 <= -9.5e+118) || ~((d3 <= 4.5e+59))) tmp = d1 * -d3; else tmp = d1 * (d2 - d1); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[Or[LessEqual[d3, -9.5e+118], N[Not[LessEqual[d3, 4.5e+59]], $MachinePrecision]], N[(d1 * (-d3)), $MachinePrecision], N[(d1 * N[(d2 - d1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d3 \leq -9.5 \cdot 10^{+118} \lor \neg \left(d3 \leq 4.5 \cdot 10^{+59}\right):\\
\;\;\;\;d1 \cdot \left(-d3\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d2 - d1\right)\\
\end{array}
\end{array}
if d3 < -9.49999999999999974e118 or 4.49999999999999959e59 < d3 Initial program 82.8%
+-commutative82.8%
*-commutative82.8%
distribute-lft-out--86.2%
distribute-lft-out88.5%
distribute-lft-out--99.9%
Simplified99.9%
Taylor expanded in d3 around inf 77.4%
mul-1-neg77.4%
distribute-rgt-neg-out77.4%
Simplified77.4%
if -9.49999999999999974e118 < d3 < 4.49999999999999959e59Initial program 90.5%
+-commutative90.5%
*-commutative90.5%
distribute-lft-out--90.5%
distribute-lft-out92.9%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d4 around 0 75.5%
+-commutative75.5%
associate--l-75.5%
Simplified75.5%
Taylor expanded in d3 around 0 67.8%
Final simplification71.1%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d2 -9e+153) (* d1 d2) (if (<= d2 -2.1e-230) (* d1 (- d3)) (* d1 d4))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d2 <= -9e+153) {
tmp = d1 * d2;
} else if (d2 <= -2.1e-230) {
tmp = d1 * -d3;
} else {
tmp = d1 * d4;
}
return tmp;
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
real(8) :: tmp
if (d2 <= (-9d+153)) then
tmp = d1 * d2
else if (d2 <= (-2.1d-230)) then
tmp = d1 * -d3
else
tmp = d1 * d4
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d2 <= -9e+153) {
tmp = d1 * d2;
} else if (d2 <= -2.1e-230) {
tmp = d1 * -d3;
} else {
tmp = d1 * d4;
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d2 <= -9e+153: tmp = d1 * d2 elif d2 <= -2.1e-230: tmp = d1 * -d3 else: tmp = d1 * d4 return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d2 <= -9e+153) tmp = Float64(d1 * d2); elseif (d2 <= -2.1e-230) tmp = Float64(d1 * Float64(-d3)); else tmp = Float64(d1 * d4); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d2 <= -9e+153) tmp = d1 * d2; elseif (d2 <= -2.1e-230) tmp = d1 * -d3; else tmp = d1 * d4; end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d2, -9e+153], N[(d1 * d2), $MachinePrecision], If[LessEqual[d2, -2.1e-230], N[(d1 * (-d3)), $MachinePrecision], N[(d1 * d4), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d2 \leq -9 \cdot 10^{+153}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d2 \leq -2.1 \cdot 10^{-230}:\\
\;\;\;\;d1 \cdot \left(-d3\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot d4\\
\end{array}
\end{array}
if d2 < -9.0000000000000002e153Initial program 85.3%
+-commutative85.3%
*-commutative85.3%
distribute-lft-out--85.3%
distribute-lft-out88.2%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d2 around inf 82.8%
if -9.0000000000000002e153 < d2 < -2.0999999999999998e-230Initial program 89.9%
+-commutative89.9%
*-commutative89.9%
distribute-lft-out--89.8%
distribute-lft-out91.9%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d3 around inf 47.1%
mul-1-neg47.1%
distribute-rgt-neg-out47.1%
Simplified47.1%
if -2.0999999999999998e-230 < d2 Initial program 87.0%
+-commutative87.0%
*-commutative87.0%
distribute-lft-out--89.4%
distribute-lft-out91.8%
distribute-lft-out--99.9%
Simplified99.9%
Taylor expanded in d4 around inf 32.1%
Final simplification44.6%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d4 3.9e+77) (* d1 (- (- d2 d3) d1)) (* d1 (- (+ d4 d2) d1))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= 3.9e+77) {
tmp = d1 * ((d2 - d3) - d1);
} else {
tmp = d1 * ((d4 + d2) - d1);
}
return tmp;
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
real(8) :: tmp
if (d4 <= 3.9d+77) then
tmp = d1 * ((d2 - d3) - d1)
else
tmp = d1 * ((d4 + d2) - d1)
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= 3.9e+77) {
tmp = d1 * ((d2 - d3) - d1);
} else {
tmp = d1 * ((d4 + d2) - d1);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d4 <= 3.9e+77: tmp = d1 * ((d2 - d3) - d1) else: tmp = d1 * ((d4 + d2) - d1) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d4 <= 3.9e+77) tmp = Float64(d1 * Float64(Float64(d2 - d3) - d1)); else tmp = Float64(d1 * Float64(Float64(d4 + d2) - d1)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d4 <= 3.9e+77) tmp = d1 * ((d2 - d3) - d1); else tmp = d1 * ((d4 + d2) - d1); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d4, 3.9e+77], N[(d1 * N[(N[(d2 - d3), $MachinePrecision] - d1), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(N[(d4 + d2), $MachinePrecision] - d1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d4 \leq 3.9 \cdot 10^{+77}:\\
\;\;\;\;d1 \cdot \left(\left(d2 - d3\right) - d1\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(\left(d4 + d2\right) - d1\right)\\
\end{array}
\end{array}
if d4 < 3.8999999999999998e77Initial program 90.1%
+-commutative90.1%
*-commutative90.1%
distribute-lft-out--91.5%
distribute-lft-out92.9%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d4 around 0 85.9%
+-commutative85.9%
associate--l-85.9%
Simplified85.9%
if 3.8999999999999998e77 < d4 Initial program 77.2%
+-commutative77.2%
*-commutative77.2%
distribute-lft-out--77.2%
distribute-lft-out84.0%
distribute-lft-out--99.9%
Simplified99.9%
Taylor expanded in d3 around 0 93.7%
Final simplification87.2%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d2 -2.45e+64) (* d1 (- (- d2 d3) d1)) (* d1 (- (- d4 d3) d1))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d2 <= -2.45e+64) {
tmp = d1 * ((d2 - d3) - d1);
} else {
tmp = d1 * ((d4 - d3) - d1);
}
return tmp;
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
real(8) :: tmp
if (d2 <= (-2.45d+64)) then
tmp = d1 * ((d2 - d3) - d1)
else
tmp = d1 * ((d4 - d3) - d1)
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d2 <= -2.45e+64) {
tmp = d1 * ((d2 - d3) - d1);
} else {
tmp = d1 * ((d4 - d3) - d1);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d2 <= -2.45e+64: tmp = d1 * ((d2 - d3) - d1) else: tmp = d1 * ((d4 - d3) - d1) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d2 <= -2.45e+64) tmp = Float64(d1 * Float64(Float64(d2 - d3) - d1)); else tmp = Float64(d1 * Float64(Float64(d4 - d3) - d1)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d2 <= -2.45e+64) tmp = d1 * ((d2 - d3) - d1); else tmp = d1 * ((d4 - d3) - d1); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d2, -2.45e+64], N[(d1 * N[(N[(d2 - d3), $MachinePrecision] - d1), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(N[(d4 - d3), $MachinePrecision] - d1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d2 \leq -2.45 \cdot 10^{+64}:\\
\;\;\;\;d1 \cdot \left(\left(d2 - d3\right) - d1\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(\left(d4 - d3\right) - d1\right)\\
\end{array}
\end{array}
if d2 < -2.4500000000000001e64Initial program 87.5%
+-commutative87.5%
*-commutative87.5%
distribute-lft-out--87.5%
distribute-lft-out91.0%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d4 around 0 93.9%
+-commutative93.9%
associate--l-93.9%
Simplified93.9%
if -2.4500000000000001e64 < d2 Initial program 88.0%
+-commutative88.0%
*-commutative88.0%
distribute-lft-out--89.4%
distribute-lft-out91.5%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d2 around 0 86.3%
+-commutative86.3%
associate--r+86.3%
Simplified86.3%
Final simplification87.9%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d2 -4.7e+64) (* d1 (- d2 d3)) (* d1 (- d4 d1))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d2 <= -4.7e+64) {
tmp = d1 * (d2 - d3);
} else {
tmp = d1 * (d4 - d1);
}
return tmp;
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
real(8) :: tmp
if (d2 <= (-4.7d+64)) then
tmp = d1 * (d2 - d3)
else
tmp = d1 * (d4 - d1)
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d2 <= -4.7e+64) {
tmp = d1 * (d2 - d3);
} else {
tmp = d1 * (d4 - d1);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d2 <= -4.7e+64: tmp = d1 * (d2 - d3) else: tmp = d1 * (d4 - d1) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d2 <= -4.7e+64) tmp = Float64(d1 * Float64(d2 - d3)); else tmp = Float64(d1 * Float64(d4 - d1)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d2 <= -4.7e+64) tmp = d1 * (d2 - d3); else tmp = d1 * (d4 - d1); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d2, -4.7e+64], N[(d1 * N[(d2 - d3), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(d4 - d1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d2 \leq -4.7 \cdot 10^{+64}:\\
\;\;\;\;d1 \cdot \left(d2 - d3\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d1\right)\\
\end{array}
\end{array}
if d2 < -4.70000000000000029e64Initial program 87.5%
+-commutative87.5%
*-commutative87.5%
distribute-lft-out--87.5%
distribute-lft-out91.0%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d4 around 0 93.9%
+-commutative93.9%
associate--l-93.9%
Simplified93.9%
Taylor expanded in d1 around 0 88.5%
if -4.70000000000000029e64 < d2 Initial program 88.0%
Taylor expanded in d2 around 0 77.7%
distribute-lft-out--78.8%
Simplified78.8%
distribute-lft-out--86.3%
associate--r+86.3%
+-commutative86.3%
*-commutative86.3%
Applied egg-rr86.3%
Taylor expanded in d3 around 0 60.3%
Final simplification66.5%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d2 -6.6e+62) (* d1 d2) (* d1 d4)))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d2 <= -6.6e+62) {
tmp = d1 * d2;
} else {
tmp = d1 * d4;
}
return tmp;
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
real(8) :: tmp
if (d2 <= (-6.6d+62)) then
tmp = d1 * d2
else
tmp = d1 * d4
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d2 <= -6.6e+62) {
tmp = d1 * d2;
} else {
tmp = d1 * d4;
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d2 <= -6.6e+62: tmp = d1 * d2 else: tmp = d1 * d4 return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d2 <= -6.6e+62) tmp = Float64(d1 * d2); else tmp = Float64(d1 * d4); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d2 <= -6.6e+62) tmp = d1 * d2; else tmp = d1 * d4; end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d2, -6.6e+62], N[(d1 * d2), $MachinePrecision], N[(d1 * d4), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d2 \leq -6.6 \cdot 10^{+62}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot d4\\
\end{array}
\end{array}
if d2 < -6.6e62Initial program 87.5%
+-commutative87.5%
*-commutative87.5%
distribute-lft-out--87.5%
distribute-lft-out91.0%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d2 around inf 58.5%
if -6.6e62 < d2 Initial program 88.0%
+-commutative88.0%
*-commutative88.0%
distribute-lft-out--89.4%
distribute-lft-out91.5%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d4 around inf 33.1%
Final simplification38.6%
(FPCore (d1 d2 d3 d4) :precision binary64 (* d1 d2))
double code(double d1, double d2, double d3, double d4) {
return d1 * d2;
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
code = d1 * d2
end function
public static double code(double d1, double d2, double d3, double d4) {
return d1 * d2;
}
def code(d1, d2, d3, d4): return d1 * d2
function code(d1, d2, d3, d4) return Float64(d1 * d2) end
function tmp = code(d1, d2, d3, d4) tmp = d1 * d2; end
code[d1_, d2_, d3_, d4_] := N[(d1 * d2), $MachinePrecision]
\begin{array}{l}
\\
d1 \cdot d2
\end{array}
Initial program 87.9%
+-commutative87.9%
*-commutative87.9%
distribute-lft-out--89.0%
distribute-lft-out91.4%
distribute-lft-out--100.0%
Simplified100.0%
Taylor expanded in d2 around inf 29.7%
Final simplification29.7%
(FPCore (d1 d2 d3 d4) :precision binary64 (* d1 (- (+ (- d2 d3) d4) d1)))
double code(double d1, double d2, double d3, double d4) {
return d1 * (((d2 - d3) + d4) - d1);
}
real(8) function code(d1, d2, d3, d4)
real(8), intent (in) :: d1
real(8), intent (in) :: d2
real(8), intent (in) :: d3
real(8), intent (in) :: d4
code = d1 * (((d2 - d3) + d4) - d1)
end function
public static double code(double d1, double d2, double d3, double d4) {
return d1 * (((d2 - d3) + d4) - d1);
}
def code(d1, d2, d3, d4): return d1 * (((d2 - d3) + d4) - d1)
function code(d1, d2, d3, d4) return Float64(d1 * Float64(Float64(Float64(d2 - d3) + d4) - d1)) end
function tmp = code(d1, d2, d3, d4) tmp = d1 * (((d2 - d3) + d4) - d1); end
code[d1_, d2_, d3_, d4_] := N[(d1 * N[(N[(N[(d2 - d3), $MachinePrecision] + d4), $MachinePrecision] - d1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d1 \cdot \left(\left(\left(d2 - d3\right) + d4\right) - d1\right)
\end{array}
herbie shell --seed 2024112
(FPCore (d1 d2 d3 d4)
:name "FastMath dist4"
:precision binary64
:alt
(* d1 (- (+ (- d2 d3) d4) d1))
(- (+ (- (* d1 d2) (* d1 d3)) (* d4 d1)) (* d1 d1)))