
(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 15 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 (+ (- 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(d2 - d3) + Float64(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[(d2 - d3), $MachinePrecision] + N[(d4 - d1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d1 \cdot \left(\left(d2 - d3\right) + \left(d4 - d1\right)\right)
\end{array}
Initial program 90.2%
associate--l+90.2%
distribute-lft-out--91.8%
distribute-rgt-out--94.9%
distribute-lft-out100.0%
Simplified100.0%
(FPCore (d1 d2 d3 d4)
:precision binary64
(let* ((t_0 (* d1 (- d3))))
(if (<= d4 -7.2e-170)
(* d1 d2)
(if (<= d4 -1.64e-274)
t_0
(if (<= d4 1.2e-250)
(* d1 (- d1))
(if (<= d4 1.65e+103) t_0 (* d1 d4)))))))
double code(double d1, double d2, double d3, double d4) {
double t_0 = d1 * -d3;
double tmp;
if (d4 <= -7.2e-170) {
tmp = d1 * d2;
} else if (d4 <= -1.64e-274) {
tmp = t_0;
} else if (d4 <= 1.2e-250) {
tmp = d1 * -d1;
} else if (d4 <= 1.65e+103) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = d1 * -d3
if (d4 <= (-7.2d-170)) then
tmp = d1 * d2
else if (d4 <= (-1.64d-274)) then
tmp = t_0
else if (d4 <= 1.2d-250) then
tmp = d1 * -d1
else if (d4 <= 1.65d+103) then
tmp = t_0
else
tmp = d1 * d4
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double t_0 = d1 * -d3;
double tmp;
if (d4 <= -7.2e-170) {
tmp = d1 * d2;
} else if (d4 <= -1.64e-274) {
tmp = t_0;
} else if (d4 <= 1.2e-250) {
tmp = d1 * -d1;
} else if (d4 <= 1.65e+103) {
tmp = t_0;
} else {
tmp = d1 * d4;
}
return tmp;
}
def code(d1, d2, d3, d4): t_0 = d1 * -d3 tmp = 0 if d4 <= -7.2e-170: tmp = d1 * d2 elif d4 <= -1.64e-274: tmp = t_0 elif d4 <= 1.2e-250: tmp = d1 * -d1 elif d4 <= 1.65e+103: tmp = t_0 else: tmp = d1 * d4 return tmp
function code(d1, d2, d3, d4) t_0 = Float64(d1 * Float64(-d3)) tmp = 0.0 if (d4 <= -7.2e-170) tmp = Float64(d1 * d2); elseif (d4 <= -1.64e-274) tmp = t_0; elseif (d4 <= 1.2e-250) tmp = Float64(d1 * Float64(-d1)); elseif (d4 <= 1.65e+103) tmp = t_0; else tmp = Float64(d1 * d4); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) t_0 = d1 * -d3; tmp = 0.0; if (d4 <= -7.2e-170) tmp = d1 * d2; elseif (d4 <= -1.64e-274) tmp = t_0; elseif (d4 <= 1.2e-250) tmp = d1 * -d1; elseif (d4 <= 1.65e+103) tmp = t_0; else tmp = d1 * d4; end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := Block[{t$95$0 = N[(d1 * (-d3)), $MachinePrecision]}, If[LessEqual[d4, -7.2e-170], N[(d1 * d2), $MachinePrecision], If[LessEqual[d4, -1.64e-274], t$95$0, If[LessEqual[d4, 1.2e-250], N[(d1 * (-d1)), $MachinePrecision], If[LessEqual[d4, 1.65e+103], t$95$0, N[(d1 * d4), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := d1 \cdot \left(-d3\right)\\
\mathbf{if}\;d4 \leq -7.2 \cdot 10^{-170}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d4 \leq -1.64 \cdot 10^{-274}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;d4 \leq 1.2 \cdot 10^{-250}:\\
\;\;\;\;d1 \cdot \left(-d1\right)\\
\mathbf{elif}\;d4 \leq 1.65 \cdot 10^{+103}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot d4\\
\end{array}
\end{array}
if d4 < -7.2000000000000006e-170Initial program 88.8%
associate--l+88.8%
distribute-lft-out--90.5%
distribute-rgt-out--96.5%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d2 around inf 30.9%
if -7.2000000000000006e-170 < d4 < -1.6399999999999999e-274 or 1.1999999999999999e-250 < d4 < 1.65000000000000004e103Initial program 90.0%
associate--l+90.0%
distribute-lft-out--92.2%
distribute-rgt-out--92.2%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d3 around inf 44.0%
associate-*r*44.0%
neg-mul-144.0%
Simplified44.0%
if -1.6399999999999999e-274 < d4 < 1.1999999999999999e-250Initial program 90.0%
associate--l+90.0%
distribute-lft-out--90.0%
distribute-rgt-out--90.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d1 around inf 61.2%
neg-mul-161.2%
Simplified61.2%
if 1.65000000000000004e103 < d4 Initial program 95.0%
associate--l+95.0%
distribute-lft-out--95.0%
distribute-rgt-out--97.4%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d4 around inf 76.7%
Final simplification43.8%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d4 -1.15e-229) (* d1 (- d2 d3)) (if (<= d4 2.15e+35) (* d1 (- (- d1) d3)) (* d1 (- d4 d3)))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= -1.15e-229) {
tmp = d1 * (d2 - d3);
} else if (d4 <= 2.15e+35) {
tmp = d1 * (-d1 - d3);
} 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 (d4 <= (-1.15d-229)) then
tmp = d1 * (d2 - d3)
else if (d4 <= 2.15d+35) then
tmp = d1 * (-d1 - d3)
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 (d4 <= -1.15e-229) {
tmp = d1 * (d2 - d3);
} else if (d4 <= 2.15e+35) {
tmp = d1 * (-d1 - d3);
} else {
tmp = d1 * (d4 - d3);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d4 <= -1.15e-229: tmp = d1 * (d2 - d3) elif d4 <= 2.15e+35: tmp = d1 * (-d1 - d3) else: tmp = d1 * (d4 - d3) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d4 <= -1.15e-229) tmp = Float64(d1 * Float64(d2 - d3)); elseif (d4 <= 2.15e+35) tmp = Float64(d1 * Float64(Float64(-d1) - d3)); else tmp = Float64(d1 * Float64(d4 - d3)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d4 <= -1.15e-229) tmp = d1 * (d2 - d3); elseif (d4 <= 2.15e+35) tmp = d1 * (-d1 - d3); else tmp = d1 * (d4 - d3); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d4, -1.15e-229], N[(d1 * N[(d2 - d3), $MachinePrecision]), $MachinePrecision], If[LessEqual[d4, 2.15e+35], N[(d1 * N[((-d1) - d3), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(d4 - d3), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d4 \leq -1.15 \cdot 10^{-229}:\\
\;\;\;\;d1 \cdot \left(d2 - d3\right)\\
\mathbf{elif}\;d4 \leq 2.15 \cdot 10^{+35}:\\
\;\;\;\;d1 \cdot \left(\left(-d1\right) - d3\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\end{array}
if d4 < -1.14999999999999998e-229Initial program 88.3%
associate--l+88.3%
distribute-lft-out--89.8%
distribute-rgt-out--95.3%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d4 around 0 93.7%
Taylor expanded in d4 around 0 79.6%
Taylor expanded in d1 around 0 62.2%
if -1.14999999999999998e-229 < d4 < 2.1499999999999999e35Initial program 89.3%
associate--l+89.3%
distribute-lft-out--92.0%
distribute-rgt-out--92.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d4 around 0 100.0%
Taylor expanded in d4 around 0 97.5%
Taylor expanded in d2 around 0 70.3%
associate-*r*70.3%
mul-1-neg70.3%
Simplified70.3%
if 2.1499999999999999e35 < d4 Initial program 96.2%
associate--l+96.2%
distribute-lft-out--96.2%
distribute-rgt-out--98.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d2 around 0 87.6%
+-commutative87.6%
associate--r+87.6%
Simplified87.6%
Taylor expanded in d1 around 0 79.3%
Final simplification68.1%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (or (<= d3 -2.35e+135) (not (<= d3 5.5e+135))) (* d1 (- d3)) (* d1 (+ d2 d4))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if ((d3 <= -2.35e+135) || !(d3 <= 5.5e+135)) {
tmp = d1 * -d3;
} else {
tmp = d1 * (d2 + 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 ((d3 <= (-2.35d+135)) .or. (.not. (d3 <= 5.5d+135))) then
tmp = d1 * -d3
else
tmp = d1 * (d2 + d4)
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if ((d3 <= -2.35e+135) || !(d3 <= 5.5e+135)) {
tmp = d1 * -d3;
} else {
tmp = d1 * (d2 + d4);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if (d3 <= -2.35e+135) or not (d3 <= 5.5e+135): tmp = d1 * -d3 else: tmp = d1 * (d2 + d4) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if ((d3 <= -2.35e+135) || !(d3 <= 5.5e+135)) tmp = Float64(d1 * Float64(-d3)); else tmp = Float64(d1 * Float64(d2 + d4)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if ((d3 <= -2.35e+135) || ~((d3 <= 5.5e+135))) tmp = d1 * -d3; else tmp = d1 * (d2 + d4); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[Or[LessEqual[d3, -2.35e+135], N[Not[LessEqual[d3, 5.5e+135]], $MachinePrecision]], N[(d1 * (-d3)), $MachinePrecision], N[(d1 * N[(d2 + d4), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d3 \leq -2.35 \cdot 10^{+135} \lor \neg \left(d3 \leq 5.5 \cdot 10^{+135}\right):\\
\;\;\;\;d1 \cdot \left(-d3\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d2 + d4\right)\\
\end{array}
\end{array}
if d3 < -2.3499999999999999e135 or 5.4999999999999999e135 < d3 Initial program 77.9%
associate--l+77.9%
distribute-lft-out--83.1%
distribute-rgt-out--85.7%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d3 around inf 75.9%
associate-*r*75.9%
neg-mul-175.9%
Simplified75.9%
if -2.3499999999999999e135 < d3 < 5.4999999999999999e135Initial program 95.5%
associate--l+95.5%
distribute-lft-out--95.5%
distribute-rgt-out--98.9%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d3 around 0 88.9%
Taylor expanded in d1 around 0 65.0%
Final simplification68.3%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d4 -1.95e-83) (* d1 d2) (if (<= d4 1.25e+38) (* d1 (- d1)) (* d1 d4))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= -1.95e-83) {
tmp = d1 * d2;
} else if (d4 <= 1.25e+38) {
tmp = d1 * -d1;
} 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 (d4 <= (-1.95d-83)) then
tmp = d1 * d2
else if (d4 <= 1.25d+38) then
tmp = d1 * -d1
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 (d4 <= -1.95e-83) {
tmp = d1 * d2;
} else if (d4 <= 1.25e+38) {
tmp = d1 * -d1;
} else {
tmp = d1 * d4;
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d4 <= -1.95e-83: tmp = d1 * d2 elif d4 <= 1.25e+38: tmp = d1 * -d1 else: tmp = d1 * d4 return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d4 <= -1.95e-83) tmp = Float64(d1 * d2); elseif (d4 <= 1.25e+38) tmp = Float64(d1 * Float64(-d1)); else tmp = Float64(d1 * d4); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d4 <= -1.95e-83) tmp = d1 * d2; elseif (d4 <= 1.25e+38) tmp = d1 * -d1; else tmp = d1 * d4; end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d4, -1.95e-83], N[(d1 * d2), $MachinePrecision], If[LessEqual[d4, 1.25e+38], N[(d1 * (-d1)), $MachinePrecision], N[(d1 * d4), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d4 \leq -1.95 \cdot 10^{-83}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{elif}\;d4 \leq 1.25 \cdot 10^{+38}:\\
\;\;\;\;d1 \cdot \left(-d1\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot d4\\
\end{array}
\end{array}
if d4 < -1.95e-83Initial program 90.5%
associate--l+90.5%
distribute-lft-out--91.5%
distribute-rgt-out--98.1%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d2 around inf 30.7%
if -1.95e-83 < d4 < 1.24999999999999992e38Initial program 86.6%
associate--l+86.6%
distribute-lft-out--89.7%
distribute-rgt-out--89.7%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d1 around inf 41.8%
neg-mul-141.8%
Simplified41.8%
if 1.24999999999999992e38 < d4 Initial program 96.2%
associate--l+96.2%
distribute-lft-out--96.2%
distribute-rgt-out--98.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d4 around inf 63.9%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d2 -9e+75) (* d1 (- d2 (+ d1 d3))) (* d1 (- (- d4 d3) d1))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d2 <= -9e+75) {
tmp = d1 * (d2 - (d1 + d3));
} 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 <= (-9d+75)) then
tmp = d1 * (d2 - (d1 + d3))
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 <= -9e+75) {
tmp = d1 * (d2 - (d1 + d3));
} else {
tmp = d1 * ((d4 - d3) - d1);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d2 <= -9e+75: tmp = d1 * (d2 - (d1 + d3)) else: tmp = d1 * ((d4 - d3) - d1) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d2 <= -9e+75) tmp = Float64(d1 * Float64(d2 - Float64(d1 + d3))); 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 <= -9e+75) tmp = d1 * (d2 - (d1 + d3)); else tmp = d1 * ((d4 - d3) - d1); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d2, -9e+75], N[(d1 * N[(d2 - N[(d1 + d3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(N[(d4 - d3), $MachinePrecision] - d1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d2 \leq -9 \cdot 10^{+75}:\\
\;\;\;\;d1 \cdot \left(d2 - \left(d1 + d3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(\left(d4 - d3\right) - d1\right)\\
\end{array}
\end{array}
if d2 < -9.0000000000000007e75Initial program 82.9%
associate--l+82.9%
distribute-lft-out--87.2%
distribute-rgt-out--91.5%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d4 around 0 95.7%
Taylor expanded in d4 around 0 88.2%
if -9.0000000000000007e75 < d2 Initial program 91.8%
associate--l+91.8%
distribute-lft-out--92.8%
distribute-rgt-out--95.7%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d2 around 0 85.8%
+-commutative85.8%
associate--r+85.8%
Simplified85.8%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d4 1.3e+35) (* d1 (- d2 (+ d1 d3))) (* d1 (- (+ d2 d4) d3))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= 1.3e+35) {
tmp = d1 * (d2 - (d1 + d3));
} else {
tmp = d1 * ((d2 + 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 (d4 <= 1.3d+35) then
tmp = d1 * (d2 - (d1 + d3))
else
tmp = d1 * ((d2 + d4) - d3)
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= 1.3e+35) {
tmp = d1 * (d2 - (d1 + d3));
} else {
tmp = d1 * ((d2 + d4) - d3);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d4 <= 1.3e+35: tmp = d1 * (d2 - (d1 + d3)) else: tmp = d1 * ((d2 + d4) - d3) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d4 <= 1.3e+35) tmp = Float64(d1 * Float64(d2 - Float64(d1 + d3))); else tmp = Float64(d1 * Float64(Float64(d2 + d4) - d3)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d4 <= 1.3e+35) tmp = d1 * (d2 - (d1 + d3)); else tmp = d1 * ((d2 + d4) - d3); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d4, 1.3e+35], N[(d1 * N[(d2 - N[(d1 + d3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(N[(d2 + d4), $MachinePrecision] - d3), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d4 \leq 1.3 \cdot 10^{+35}:\\
\;\;\;\;d1 \cdot \left(d2 - \left(d1 + d3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(\left(d2 + d4\right) - d3\right)\\
\end{array}
\end{array}
if d4 < 1.30000000000000003e35Initial program 88.6%
associate--l+88.6%
distribute-lft-out--90.6%
distribute-rgt-out--94.1%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d4 around 0 96.0%
Taylor expanded in d4 around 0 86.2%
if 1.30000000000000003e35 < d4 Initial program 96.2%
associate--l+96.2%
distribute-lft-out--96.2%
distribute-rgt-out--98.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d1 around 0 91.8%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d4 1.35e+39) (* d1 (- d2 (+ d1 d3))) (* d1 (- (+ d2 d4) d1))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= 1.35e+39) {
tmp = d1 * (d2 - (d1 + d3));
} else {
tmp = d1 * ((d2 + 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 (d4 <= 1.35d+39) then
tmp = d1 * (d2 - (d1 + d3))
else
tmp = d1 * ((d2 + d4) - d1)
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= 1.35e+39) {
tmp = d1 * (d2 - (d1 + d3));
} else {
tmp = d1 * ((d2 + d4) - d1);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d4 <= 1.35e+39: tmp = d1 * (d2 - (d1 + d3)) else: tmp = d1 * ((d2 + d4) - d1) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d4 <= 1.35e+39) tmp = Float64(d1 * Float64(d2 - Float64(d1 + d3))); else tmp = Float64(d1 * Float64(Float64(d2 + d4) - d1)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d4 <= 1.35e+39) tmp = d1 * (d2 - (d1 + d3)); else tmp = d1 * ((d2 + d4) - d1); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d4, 1.35e+39], N[(d1 * N[(d2 - N[(d1 + d3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(N[(d2 + d4), $MachinePrecision] - d1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d4 \leq 1.35 \cdot 10^{+39}:\\
\;\;\;\;d1 \cdot \left(d2 - \left(d1 + d3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(\left(d2 + d4\right) - d1\right)\\
\end{array}
\end{array}
if d4 < 1.35000000000000002e39Initial program 88.7%
associate--l+88.7%
distribute-lft-out--90.7%
distribute-rgt-out--94.1%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d4 around 0 96.0%
Taylor expanded in d4 around 0 86.3%
if 1.35000000000000002e39 < d4 Initial program 96.1%
associate--l+96.1%
distribute-lft-out--96.1%
distribute-rgt-out--98.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d3 around 0 85.8%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d4 1.36e+35) (* d1 (- d2 (+ d1 d3))) (* d1 (- d4 d3))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= 1.36e+35) {
tmp = d1 * (d2 - (d1 + d3));
} 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 (d4 <= 1.36d+35) then
tmp = d1 * (d2 - (d1 + d3))
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 (d4 <= 1.36e+35) {
tmp = d1 * (d2 - (d1 + d3));
} else {
tmp = d1 * (d4 - d3);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d4 <= 1.36e+35: tmp = d1 * (d2 - (d1 + d3)) else: tmp = d1 * (d4 - d3) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d4 <= 1.36e+35) tmp = Float64(d1 * Float64(d2 - Float64(d1 + d3))); else tmp = Float64(d1 * Float64(d4 - d3)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d4 <= 1.36e+35) tmp = d1 * (d2 - (d1 + d3)); else tmp = d1 * (d4 - d3); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d4, 1.36e+35], N[(d1 * N[(d2 - N[(d1 + d3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(d4 - d3), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d4 \leq 1.36 \cdot 10^{+35}:\\
\;\;\;\;d1 \cdot \left(d2 - \left(d1 + d3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\end{array}
if d4 < 1.36e35Initial program 88.6%
associate--l+88.6%
distribute-lft-out--90.6%
distribute-rgt-out--94.1%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d4 around 0 96.0%
Taylor expanded in d4 around 0 86.2%
if 1.36e35 < d4 Initial program 96.2%
associate--l+96.2%
distribute-lft-out--96.2%
distribute-rgt-out--98.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d2 around 0 87.6%
+-commutative87.6%
associate--r+87.6%
Simplified87.6%
Taylor expanded in d1 around 0 79.3%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d2 -5.6e+84) (* d1 (- d2 d3)) (* d1 (- d4 d3))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d2 <= -5.6e+84) {
tmp = d1 * (d2 - d3);
} 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 (d2 <= (-5.6d+84)) then
tmp = d1 * (d2 - d3)
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 (d2 <= -5.6e+84) {
tmp = d1 * (d2 - d3);
} else {
tmp = d1 * (d4 - d3);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d2 <= -5.6e+84: tmp = d1 * (d2 - d3) else: tmp = d1 * (d4 - d3) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d2 <= -5.6e+84) tmp = Float64(d1 * Float64(d2 - d3)); else tmp = Float64(d1 * Float64(d4 - d3)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d2 <= -5.6e+84) tmp = d1 * (d2 - d3); else tmp = d1 * (d4 - d3); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d2, -5.6e+84], N[(d1 * N[(d2 - d3), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(d4 - d3), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d2 \leq -5.6 \cdot 10^{+84}:\\
\;\;\;\;d1 \cdot \left(d2 - d3\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d3\right)\\
\end{array}
\end{array}
if d2 < -5.59999999999999963e84Initial program 82.9%
associate--l+82.9%
distribute-lft-out--87.2%
distribute-rgt-out--91.5%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d4 around 0 95.7%
Taylor expanded in d4 around 0 88.2%
Taylor expanded in d1 around 0 90.3%
if -5.59999999999999963e84 < d2 Initial program 91.8%
associate--l+91.8%
distribute-lft-out--92.8%
distribute-rgt-out--95.7%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d2 around 0 85.8%
+-commutative85.8%
associate--r+85.8%
Simplified85.8%
Taylor expanded in d1 around 0 63.4%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d4 6.8e+29) (* d1 (- d2 d3)) (* d1 (- d4 d1))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= 6.8e+29) {
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 (d4 <= 6.8d+29) 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 (d4 <= 6.8e+29) {
tmp = d1 * (d2 - d3);
} else {
tmp = d1 * (d4 - d1);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d4 <= 6.8e+29: tmp = d1 * (d2 - d3) else: tmp = d1 * (d4 - d1) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d4 <= 6.8e+29) 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 (d4 <= 6.8e+29) tmp = d1 * (d2 - d3); else tmp = d1 * (d4 - d1); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d4, 6.8e+29], N[(d1 * N[(d2 - d3), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(d4 - d1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d4 \leq 6.8 \cdot 10^{+29}:\\
\;\;\;\;d1 \cdot \left(d2 - d3\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d4 - d1\right)\\
\end{array}
\end{array}
if d4 < 6.79999999999999963e29Initial program 88.6%
associate--l+88.6%
distribute-lft-out--90.6%
distribute-rgt-out--94.1%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d4 around 0 96.0%
Taylor expanded in d4 around 0 86.2%
Taylor expanded in d1 around 0 64.9%
if 6.79999999999999963e29 < d4 Initial program 96.2%
associate--l+96.2%
distribute-lft-out--96.2%
distribute-rgt-out--98.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d3 around 0 84.2%
Taylor expanded in d2 around 0 71.9%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d4 1.55e+103) (* d1 (- d2 d3)) (* d1 (+ d2 d4))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= 1.55e+103) {
tmp = d1 * (d2 - d3);
} else {
tmp = d1 * (d2 + 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 (d4 <= 1.55d+103) then
tmp = d1 * (d2 - d3)
else
tmp = d1 * (d2 + d4)
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= 1.55e+103) {
tmp = d1 * (d2 - d3);
} else {
tmp = d1 * (d2 + d4);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d4 <= 1.55e+103: tmp = d1 * (d2 - d3) else: tmp = d1 * (d2 + d4) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d4 <= 1.55e+103) tmp = Float64(d1 * Float64(d2 - d3)); else tmp = Float64(d1 * Float64(d2 + d4)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d4 <= 1.55e+103) tmp = d1 * (d2 - d3); else tmp = d1 * (d2 + d4); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d4, 1.55e+103], N[(d1 * N[(d2 - d3), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(d2 + d4), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d4 \leq 1.55 \cdot 10^{+103}:\\
\;\;\;\;d1 \cdot \left(d2 - d3\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d2 + d4\right)\\
\end{array}
\end{array}
if d4 < 1.5500000000000001e103Initial program 89.3%
associate--l+89.3%
distribute-lft-out--91.2%
distribute-rgt-out--94.4%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d4 around 0 96.3%
Taylor expanded in d4 around 0 85.4%
Taylor expanded in d1 around 0 64.8%
if 1.5500000000000001e103 < d4 Initial program 95.0%
associate--l+95.0%
distribute-lft-out--95.0%
distribute-rgt-out--97.4%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d3 around 0 94.2%
Taylor expanded in d1 around 0 87.5%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d4 3.05e+35) (* d1 (- d2 d1)) (* d1 (+ d2 d4))))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= 3.05e+35) {
tmp = d1 * (d2 - d1);
} else {
tmp = d1 * (d2 + 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 (d4 <= 3.05d+35) then
tmp = d1 * (d2 - d1)
else
tmp = d1 * (d2 + d4)
end if
code = tmp
end function
public static double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d4 <= 3.05e+35) {
tmp = d1 * (d2 - d1);
} else {
tmp = d1 * (d2 + d4);
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d4 <= 3.05e+35: tmp = d1 * (d2 - d1) else: tmp = d1 * (d2 + d4) return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d4 <= 3.05e+35) tmp = Float64(d1 * Float64(d2 - d1)); else tmp = Float64(d1 * Float64(d2 + d4)); end return tmp end
function tmp_2 = code(d1, d2, d3, d4) tmp = 0.0; if (d4 <= 3.05e+35) tmp = d1 * (d2 - d1); else tmp = d1 * (d2 + d4); end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d4, 3.05e+35], N[(d1 * N[(d2 - d1), $MachinePrecision]), $MachinePrecision], N[(d1 * N[(d2 + d4), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d4 \leq 3.05 \cdot 10^{+35}:\\
\;\;\;\;d1 \cdot \left(d2 - d1\right)\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot \left(d2 + d4\right)\\
\end{array}
\end{array}
if d4 < 3.04999999999999989e35Initial program 88.6%
associate--l+88.6%
distribute-lft-out--90.6%
distribute-rgt-out--94.1%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d4 around 0 96.0%
Taylor expanded in d4 around 0 86.2%
Taylor expanded in d3 around 0 57.4%
if 3.04999999999999989e35 < d4 Initial program 96.2%
associate--l+96.2%
distribute-lft-out--96.2%
distribute-rgt-out--98.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d3 around 0 84.2%
Taylor expanded in d1 around 0 76.4%
(FPCore (d1 d2 d3 d4) :precision binary64 (if (<= d2 -2.4e+81) (* d1 d2) (* d1 d4)))
double code(double d1, double d2, double d3, double d4) {
double tmp;
if (d2 <= -2.4e+81) {
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 <= (-2.4d+81)) 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 <= -2.4e+81) {
tmp = d1 * d2;
} else {
tmp = d1 * d4;
}
return tmp;
}
def code(d1, d2, d3, d4): tmp = 0 if d2 <= -2.4e+81: tmp = d1 * d2 else: tmp = d1 * d4 return tmp
function code(d1, d2, d3, d4) tmp = 0.0 if (d2 <= -2.4e+81) 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 <= -2.4e+81) tmp = d1 * d2; else tmp = d1 * d4; end tmp_2 = tmp; end
code[d1_, d2_, d3_, d4_] := If[LessEqual[d2, -2.4e+81], N[(d1 * d2), $MachinePrecision], N[(d1 * d4), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d2 \leq -2.4 \cdot 10^{+81}:\\
\;\;\;\;d1 \cdot d2\\
\mathbf{else}:\\
\;\;\;\;d1 \cdot d4\\
\end{array}
\end{array}
if d2 < -2.3999999999999999e81Initial program 82.9%
associate--l+82.9%
distribute-lft-out--87.2%
distribute-rgt-out--91.5%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d2 around inf 71.9%
if -2.3999999999999999e81 < d2 Initial program 91.8%
associate--l+91.8%
distribute-lft-out--92.8%
distribute-rgt-out--95.7%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d4 around inf 32.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 90.2%
associate--l+90.2%
distribute-lft-out--91.8%
distribute-rgt-out--94.9%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in d2 around inf 30.5%
(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 2024143
(FPCore (d1 d2 d3 d4)
:name "FastMath dist4"
:precision binary64
:alt
(! :herbie-platform default (* d1 (- (+ (- d2 d3) d4) d1)))
(- (+ (- (* d1 d2) (* d1 d3)) (* d4 d1)) (* d1 d1)))