
(FPCore (a rand) :precision binary64 (let* ((t_0 (- a (/ 1.0 3.0)))) (* t_0 (+ 1.0 (* (/ 1.0 (sqrt (* 9.0 t_0))) rand)))))
double code(double a, double rand) {
double t_0 = a - (1.0 / 3.0);
return t_0 * (1.0 + ((1.0 / sqrt((9.0 * t_0))) * rand));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
t_0 = a - (1.0d0 / 3.0d0)
code = t_0 * (1.0d0 + ((1.0d0 / sqrt((9.0d0 * t_0))) * rand))
end function
public static double code(double a, double rand) {
double t_0 = a - (1.0 / 3.0);
return t_0 * (1.0 + ((1.0 / Math.sqrt((9.0 * t_0))) * rand));
}
def code(a, rand): t_0 = a - (1.0 / 3.0) return t_0 * (1.0 + ((1.0 / math.sqrt((9.0 * t_0))) * rand))
function code(a, rand) t_0 = Float64(a - Float64(1.0 / 3.0)) return Float64(t_0 * Float64(1.0 + Float64(Float64(1.0 / sqrt(Float64(9.0 * t_0))) * rand))) end
function tmp = code(a, rand) t_0 = a - (1.0 / 3.0); tmp = t_0 * (1.0 + ((1.0 / sqrt((9.0 * t_0))) * rand)); end
code[a_, rand_] := Block[{t$95$0 = N[(a - N[(1.0 / 3.0), $MachinePrecision]), $MachinePrecision]}, N[(t$95$0 * N[(1.0 + N[(N[(1.0 / N[Sqrt[N[(9.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * rand), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a - \frac{1}{3}\\
t\_0 \cdot \left(1 + \frac{1}{\sqrt{9 \cdot t\_0}} \cdot rand\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a rand) :precision binary64 (let* ((t_0 (- a (/ 1.0 3.0)))) (* t_0 (+ 1.0 (* (/ 1.0 (sqrt (* 9.0 t_0))) rand)))))
double code(double a, double rand) {
double t_0 = a - (1.0 / 3.0);
return t_0 * (1.0 + ((1.0 / sqrt((9.0 * t_0))) * rand));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
t_0 = a - (1.0d0 / 3.0d0)
code = t_0 * (1.0d0 + ((1.0d0 / sqrt((9.0d0 * t_0))) * rand))
end function
public static double code(double a, double rand) {
double t_0 = a - (1.0 / 3.0);
return t_0 * (1.0 + ((1.0 / Math.sqrt((9.0 * t_0))) * rand));
}
def code(a, rand): t_0 = a - (1.0 / 3.0) return t_0 * (1.0 + ((1.0 / math.sqrt((9.0 * t_0))) * rand))
function code(a, rand) t_0 = Float64(a - Float64(1.0 / 3.0)) return Float64(t_0 * Float64(1.0 + Float64(Float64(1.0 / sqrt(Float64(9.0 * t_0))) * rand))) end
function tmp = code(a, rand) t_0 = a - (1.0 / 3.0); tmp = t_0 * (1.0 + ((1.0 / sqrt((9.0 * t_0))) * rand)); end
code[a_, rand_] := Block[{t$95$0 = N[(a - N[(1.0 / 3.0), $MachinePrecision]), $MachinePrecision]}, N[(t$95$0 * N[(1.0 + N[(N[(1.0 / N[Sqrt[N[(9.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * rand), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a - \frac{1}{3}\\
t\_0 \cdot \left(1 + \frac{1}{\sqrt{9 \cdot t\_0}} \cdot rand\right)
\end{array}
\end{array}
(FPCore (a rand) :precision binary64 (* (+ 1.0 (/ rand (sqrt (* 9.0 (+ a -0.3333333333333333))))) (+ a -0.3333333333333333)))
double code(double a, double rand) {
return (1.0 + (rand / sqrt((9.0 * (a + -0.3333333333333333))))) * (a + -0.3333333333333333);
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = (1.0d0 + (rand / sqrt((9.0d0 * (a + (-0.3333333333333333d0)))))) * (a + (-0.3333333333333333d0))
end function
public static double code(double a, double rand) {
return (1.0 + (rand / Math.sqrt((9.0 * (a + -0.3333333333333333))))) * (a + -0.3333333333333333);
}
def code(a, rand): return (1.0 + (rand / math.sqrt((9.0 * (a + -0.3333333333333333))))) * (a + -0.3333333333333333)
function code(a, rand) return Float64(Float64(1.0 + Float64(rand / sqrt(Float64(9.0 * Float64(a + -0.3333333333333333))))) * Float64(a + -0.3333333333333333)) end
function tmp = code(a, rand) tmp = (1.0 + (rand / sqrt((9.0 * (a + -0.3333333333333333))))) * (a + -0.3333333333333333); end
code[a_, rand_] := N[(N[(1.0 + N[(rand / N[Sqrt[N[(9.0 * N[(a + -0.3333333333333333), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a + -0.3333333333333333), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \frac{rand}{\sqrt{9 \cdot \left(a + -0.3333333333333333\right)}}\right) \cdot \left(a + -0.3333333333333333\right)
\end{array}
Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (* (sqrt (+ a -0.3333333333333333)) (* rand 0.3333333333333333))))
(if (<= rand -1.15e+95)
t_0
(if (<= rand 1.35e+109) (+ a -0.3333333333333333) t_0))))
double code(double a, double rand) {
double t_0 = sqrt((a + -0.3333333333333333)) * (rand * 0.3333333333333333);
double tmp;
if (rand <= -1.15e+95) {
tmp = t_0;
} else if (rand <= 1.35e+109) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((a + (-0.3333333333333333d0))) * (rand * 0.3333333333333333d0)
if (rand <= (-1.15d+95)) then
tmp = t_0
else if (rand <= 1.35d+109) then
tmp = a + (-0.3333333333333333d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = Math.sqrt((a + -0.3333333333333333)) * (rand * 0.3333333333333333);
double tmp;
if (rand <= -1.15e+95) {
tmp = t_0;
} else if (rand <= 1.35e+109) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0;
}
return tmp;
}
def code(a, rand): t_0 = math.sqrt((a + -0.3333333333333333)) * (rand * 0.3333333333333333) tmp = 0 if rand <= -1.15e+95: tmp = t_0 elif rand <= 1.35e+109: tmp = a + -0.3333333333333333 else: tmp = t_0 return tmp
function code(a, rand) t_0 = Float64(sqrt(Float64(a + -0.3333333333333333)) * Float64(rand * 0.3333333333333333)) tmp = 0.0 if (rand <= -1.15e+95) tmp = t_0; elseif (rand <= 1.35e+109) tmp = Float64(a + -0.3333333333333333); else tmp = t_0; end return tmp end
function tmp_2 = code(a, rand) t_0 = sqrt((a + -0.3333333333333333)) * (rand * 0.3333333333333333); tmp = 0.0; if (rand <= -1.15e+95) tmp = t_0; elseif (rand <= 1.35e+109) tmp = a + -0.3333333333333333; else tmp = t_0; end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(N[Sqrt[N[(a + -0.3333333333333333), $MachinePrecision]], $MachinePrecision] * N[(rand * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -1.15e+95], t$95$0, If[LessEqual[rand, 1.35e+109], N[(a + -0.3333333333333333), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{a + -0.3333333333333333} \cdot \left(rand \cdot 0.3333333333333333\right)\\
\mathbf{if}\;rand \leq -1.15 \cdot 10^{+95}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;rand \leq 1.35 \cdot 10^{+109}:\\
\;\;\;\;a + -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if rand < -1.14999999999999999e95 or 1.35000000000000001e109 < rand Initial program 99.7%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in rand around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6496.3%
Simplified96.3%
if -1.14999999999999999e95 < rand < 1.35000000000000001e109Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6493.5%
Simplified93.5%
Final simplification94.5%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (* rand (* 0.3333333333333333 (sqrt a)))))
(if (<= rand -1.95e+95)
t_0
(if (<= rand 1.4e+109) (+ a -0.3333333333333333) t_0))))
double code(double a, double rand) {
double t_0 = rand * (0.3333333333333333 * sqrt(a));
double tmp;
if (rand <= -1.95e+95) {
tmp = t_0;
} else if (rand <= 1.4e+109) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
real(8) :: tmp
t_0 = rand * (0.3333333333333333d0 * sqrt(a))
if (rand <= (-1.95d+95)) then
tmp = t_0
else if (rand <= 1.4d+109) then
tmp = a + (-0.3333333333333333d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = rand * (0.3333333333333333 * Math.sqrt(a));
double tmp;
if (rand <= -1.95e+95) {
tmp = t_0;
} else if (rand <= 1.4e+109) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0;
}
return tmp;
}
def code(a, rand): t_0 = rand * (0.3333333333333333 * math.sqrt(a)) tmp = 0 if rand <= -1.95e+95: tmp = t_0 elif rand <= 1.4e+109: tmp = a + -0.3333333333333333 else: tmp = t_0 return tmp
function code(a, rand) t_0 = Float64(rand * Float64(0.3333333333333333 * sqrt(a))) tmp = 0.0 if (rand <= -1.95e+95) tmp = t_0; elseif (rand <= 1.4e+109) tmp = Float64(a + -0.3333333333333333); else tmp = t_0; end return tmp end
function tmp_2 = code(a, rand) t_0 = rand * (0.3333333333333333 * sqrt(a)); tmp = 0.0; if (rand <= -1.95e+95) tmp = t_0; elseif (rand <= 1.4e+109) tmp = a + -0.3333333333333333; else tmp = t_0; end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(rand * N[(0.3333333333333333 * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -1.95e+95], t$95$0, If[LessEqual[rand, 1.4e+109], N[(a + -0.3333333333333333), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := rand \cdot \left(0.3333333333333333 \cdot \sqrt{a}\right)\\
\mathbf{if}\;rand \leq -1.95 \cdot 10^{+95}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;rand \leq 1.4 \cdot 10^{+109}:\\
\;\;\;\;a + -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if rand < -1.9499999999999999e95 or 1.4000000000000001e109 < rand Initial program 99.7%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6497.9%
Simplified97.9%
Taylor expanded in a around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6494.6%
Simplified94.6%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
pow1/2N/A
inv-powN/A
pow-powN/A
pow-plusN/A
metadata-evalN/A
metadata-evalN/A
pow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6494.7%
Applied egg-rr94.7%
if -1.9499999999999999e95 < rand < 1.4000000000000001e109Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6493.5%
Simplified93.5%
Final simplification93.9%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (* (* rand 0.3333333333333333) (sqrt a))))
(if (<= rand -4.1e+101)
t_0
(if (<= rand 1.35e+109) (+ a -0.3333333333333333) t_0))))
double code(double a, double rand) {
double t_0 = (rand * 0.3333333333333333) * sqrt(a);
double tmp;
if (rand <= -4.1e+101) {
tmp = t_0;
} else if (rand <= 1.35e+109) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
real(8) :: tmp
t_0 = (rand * 0.3333333333333333d0) * sqrt(a)
if (rand <= (-4.1d+101)) then
tmp = t_0
else if (rand <= 1.35d+109) then
tmp = a + (-0.3333333333333333d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = (rand * 0.3333333333333333) * Math.sqrt(a);
double tmp;
if (rand <= -4.1e+101) {
tmp = t_0;
} else if (rand <= 1.35e+109) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0;
}
return tmp;
}
def code(a, rand): t_0 = (rand * 0.3333333333333333) * math.sqrt(a) tmp = 0 if rand <= -4.1e+101: tmp = t_0 elif rand <= 1.35e+109: tmp = a + -0.3333333333333333 else: tmp = t_0 return tmp
function code(a, rand) t_0 = Float64(Float64(rand * 0.3333333333333333) * sqrt(a)) tmp = 0.0 if (rand <= -4.1e+101) tmp = t_0; elseif (rand <= 1.35e+109) tmp = Float64(a + -0.3333333333333333); else tmp = t_0; end return tmp end
function tmp_2 = code(a, rand) t_0 = (rand * 0.3333333333333333) * sqrt(a); tmp = 0.0; if (rand <= -4.1e+101) tmp = t_0; elseif (rand <= 1.35e+109) tmp = a + -0.3333333333333333; else tmp = t_0; end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(N[(rand * 0.3333333333333333), $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -4.1e+101], t$95$0, If[LessEqual[rand, 1.35e+109], N[(a + -0.3333333333333333), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(rand \cdot 0.3333333333333333\right) \cdot \sqrt{a}\\
\mathbf{if}\;rand \leq -4.1 \cdot 10^{+101}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;rand \leq 1.35 \cdot 10^{+109}:\\
\;\;\;\;a + -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if rand < -4.1e101 or 1.35000000000000001e109 < rand Initial program 99.7%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6497.9%
Simplified97.9%
Taylor expanded in a around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6494.6%
Simplified94.6%
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
pow1/2N/A
inv-powN/A
pow-powN/A
pow-plusN/A
metadata-evalN/A
metadata-evalN/A
pow1/2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6494.6%
Applied egg-rr94.6%
if -4.1e101 < rand < 1.35000000000000001e109Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6493.5%
Simplified93.5%
Final simplification93.9%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (* 0.3333333333333333 (* rand (sqrt a)))))
(if (<= rand -1.4e+98)
t_0
(if (<= rand 1.35e+109) (+ a -0.3333333333333333) t_0))))
double code(double a, double rand) {
double t_0 = 0.3333333333333333 * (rand * sqrt(a));
double tmp;
if (rand <= -1.4e+98) {
tmp = t_0;
} else if (rand <= 1.35e+109) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
real(8) :: tmp
t_0 = 0.3333333333333333d0 * (rand * sqrt(a))
if (rand <= (-1.4d+98)) then
tmp = t_0
else if (rand <= 1.35d+109) then
tmp = a + (-0.3333333333333333d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = 0.3333333333333333 * (rand * Math.sqrt(a));
double tmp;
if (rand <= -1.4e+98) {
tmp = t_0;
} else if (rand <= 1.35e+109) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0;
}
return tmp;
}
def code(a, rand): t_0 = 0.3333333333333333 * (rand * math.sqrt(a)) tmp = 0 if rand <= -1.4e+98: tmp = t_0 elif rand <= 1.35e+109: tmp = a + -0.3333333333333333 else: tmp = t_0 return tmp
function code(a, rand) t_0 = Float64(0.3333333333333333 * Float64(rand * sqrt(a))) tmp = 0.0 if (rand <= -1.4e+98) tmp = t_0; elseif (rand <= 1.35e+109) tmp = Float64(a + -0.3333333333333333); else tmp = t_0; end return tmp end
function tmp_2 = code(a, rand) t_0 = 0.3333333333333333 * (rand * sqrt(a)); tmp = 0.0; if (rand <= -1.4e+98) tmp = t_0; elseif (rand <= 1.35e+109) tmp = a + -0.3333333333333333; else tmp = t_0; end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(0.3333333333333333 * N[(rand * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -1.4e+98], t$95$0, If[LessEqual[rand, 1.35e+109], N[(a + -0.3333333333333333), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.3333333333333333 \cdot \left(rand \cdot \sqrt{a}\right)\\
\mathbf{if}\;rand \leq -1.4 \cdot 10^{+98}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;rand \leq 1.35 \cdot 10^{+109}:\\
\;\;\;\;a + -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if rand < -1.4e98 or 1.35000000000000001e109 < rand Initial program 99.7%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6497.9%
Simplified97.9%
Taylor expanded in a around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6494.5%
Simplified94.5%
if -1.4e98 < rand < 1.35000000000000001e109Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6493.5%
Simplified93.5%
Final simplification93.9%
(FPCore (a rand) :precision binary64 (if (<= a 700000000000.0) (+ a -0.3333333333333333) (+ a (* (/ rand 3.0) (sqrt a)))))
double code(double a, double rand) {
double tmp;
if (a <= 700000000000.0) {
tmp = a + -0.3333333333333333;
} else {
tmp = a + ((rand / 3.0) * sqrt(a));
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: tmp
if (a <= 700000000000.0d0) then
tmp = a + (-0.3333333333333333d0)
else
tmp = a + ((rand / 3.0d0) * sqrt(a))
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (a <= 700000000000.0) {
tmp = a + -0.3333333333333333;
} else {
tmp = a + ((rand / 3.0) * Math.sqrt(a));
}
return tmp;
}
def code(a, rand): tmp = 0 if a <= 700000000000.0: tmp = a + -0.3333333333333333 else: tmp = a + ((rand / 3.0) * math.sqrt(a)) return tmp
function code(a, rand) tmp = 0.0 if (a <= 700000000000.0) tmp = Float64(a + -0.3333333333333333); else tmp = Float64(a + Float64(Float64(rand / 3.0) * sqrt(a))); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (a <= 700000000000.0) tmp = a + -0.3333333333333333; else tmp = a + ((rand / 3.0) * sqrt(a)); end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[a, 700000000000.0], N[(a + -0.3333333333333333), $MachinePrecision], N[(a + N[(N[(rand / 3.0), $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 700000000000:\\
\;\;\;\;a + -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;a + \frac{rand}{3} \cdot \sqrt{a}\\
\end{array}
\end{array}
if a < 7e11Initial program 99.6%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.6%
Simplified99.6%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6476.0%
Simplified76.0%
if 7e11 < a Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.6%
Simplified99.6%
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
+-lowering-+.f64N/A
Applied egg-rr99.7%
Final simplification98.6%
(FPCore (a rand) :precision binary64 (+ (+ a -0.3333333333333333) (* (sqrt (+ a -0.3333333333333333)) (* rand 0.3333333333333333))))
double code(double a, double rand) {
return (a + -0.3333333333333333) + (sqrt((a + -0.3333333333333333)) * (rand * 0.3333333333333333));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = (a + (-0.3333333333333333d0)) + (sqrt((a + (-0.3333333333333333d0))) * (rand * 0.3333333333333333d0))
end function
public static double code(double a, double rand) {
return (a + -0.3333333333333333) + (Math.sqrt((a + -0.3333333333333333)) * (rand * 0.3333333333333333));
}
def code(a, rand): return (a + -0.3333333333333333) + (math.sqrt((a + -0.3333333333333333)) * (rand * 0.3333333333333333))
function code(a, rand) return Float64(Float64(a + -0.3333333333333333) + Float64(sqrt(Float64(a + -0.3333333333333333)) * Float64(rand * 0.3333333333333333))) end
function tmp = code(a, rand) tmp = (a + -0.3333333333333333) + (sqrt((a + -0.3333333333333333)) * (rand * 0.3333333333333333)); end
code[a_, rand_] := N[(N[(a + -0.3333333333333333), $MachinePrecision] + N[(N[Sqrt[N[(a + -0.3333333333333333), $MachinePrecision]], $MachinePrecision] * N[(rand * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(a + -0.3333333333333333\right) + \sqrt{a + -0.3333333333333333} \cdot \left(rand \cdot 0.3333333333333333\right)
\end{array}
Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
+-commutativeN/A
associate--l+N/A
metadata-evalN/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*l*N/A
+-lowering-+.f64N/A
Simplified99.9%
Final simplification99.9%
(FPCore (a rand) :precision binary64 (* (+ a -0.3333333333333333) (+ 1.0 (/ rand (sqrt (* a 9.0))))))
double code(double a, double rand) {
return (a + -0.3333333333333333) * (1.0 + (rand / sqrt((a * 9.0))));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = (a + (-0.3333333333333333d0)) * (1.0d0 + (rand / sqrt((a * 9.0d0))))
end function
public static double code(double a, double rand) {
return (a + -0.3333333333333333) * (1.0 + (rand / Math.sqrt((a * 9.0))));
}
def code(a, rand): return (a + -0.3333333333333333) * (1.0 + (rand / math.sqrt((a * 9.0))))
function code(a, rand) return Float64(Float64(a + -0.3333333333333333) * Float64(1.0 + Float64(rand / sqrt(Float64(a * 9.0))))) end
function tmp = code(a, rand) tmp = (a + -0.3333333333333333) * (1.0 + (rand / sqrt((a * 9.0)))); end
code[a_, rand_] := N[(N[(a + -0.3333333333333333), $MachinePrecision] * N[(1.0 + N[(rand / N[Sqrt[N[(a * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{a \cdot 9}}\right)
\end{array}
Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf
Simplified99.0%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (/ 1.0 (- -0.3333333333333333 a)))
(t_1 (* a (* a a)))
(t_2 (* a t_1))
(t_3 (- 0.0013717421124828531 (* a (* (* a a) t_1)))))
(if (<= rand -5e+134)
(*
(*
t_3
(+
81.0
(* a (* a (+ -729.0 (* t_2 (+ 59049.0 (* (* a a) -531441.0))))))))
t_0)
(if (<= rand 9.6e+141)
(+ a -0.3333333333333333)
(* t_0 (* t_3 (+ 81.0 (* (* a a) (+ -729.0 (* t_2 59049.0))))))))))
double code(double a, double rand) {
double t_0 = 1.0 / (-0.3333333333333333 - a);
double t_1 = a * (a * a);
double t_2 = a * t_1;
double t_3 = 0.0013717421124828531 - (a * ((a * a) * t_1));
double tmp;
if (rand <= -5e+134) {
tmp = (t_3 * (81.0 + (a * (a * (-729.0 + (t_2 * (59049.0 + ((a * a) * -531441.0)))))))) * t_0;
} else if (rand <= 9.6e+141) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0 * (t_3 * (81.0 + ((a * a) * (-729.0 + (t_2 * 59049.0)))));
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = 1.0d0 / ((-0.3333333333333333d0) - a)
t_1 = a * (a * a)
t_2 = a * t_1
t_3 = 0.0013717421124828531d0 - (a * ((a * a) * t_1))
if (rand <= (-5d+134)) then
tmp = (t_3 * (81.0d0 + (a * (a * ((-729.0d0) + (t_2 * (59049.0d0 + ((a * a) * (-531441.0d0))))))))) * t_0
else if (rand <= 9.6d+141) then
tmp = a + (-0.3333333333333333d0)
else
tmp = t_0 * (t_3 * (81.0d0 + ((a * a) * ((-729.0d0) + (t_2 * 59049.0d0)))))
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = 1.0 / (-0.3333333333333333 - a);
double t_1 = a * (a * a);
double t_2 = a * t_1;
double t_3 = 0.0013717421124828531 - (a * ((a * a) * t_1));
double tmp;
if (rand <= -5e+134) {
tmp = (t_3 * (81.0 + (a * (a * (-729.0 + (t_2 * (59049.0 + ((a * a) * -531441.0)))))))) * t_0;
} else if (rand <= 9.6e+141) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0 * (t_3 * (81.0 + ((a * a) * (-729.0 + (t_2 * 59049.0)))));
}
return tmp;
}
def code(a, rand): t_0 = 1.0 / (-0.3333333333333333 - a) t_1 = a * (a * a) t_2 = a * t_1 t_3 = 0.0013717421124828531 - (a * ((a * a) * t_1)) tmp = 0 if rand <= -5e+134: tmp = (t_3 * (81.0 + (a * (a * (-729.0 + (t_2 * (59049.0 + ((a * a) * -531441.0)))))))) * t_0 elif rand <= 9.6e+141: tmp = a + -0.3333333333333333 else: tmp = t_0 * (t_3 * (81.0 + ((a * a) * (-729.0 + (t_2 * 59049.0))))) return tmp
function code(a, rand) t_0 = Float64(1.0 / Float64(-0.3333333333333333 - a)) t_1 = Float64(a * Float64(a * a)) t_2 = Float64(a * t_1) t_3 = Float64(0.0013717421124828531 - Float64(a * Float64(Float64(a * a) * t_1))) tmp = 0.0 if (rand <= -5e+134) tmp = Float64(Float64(t_3 * Float64(81.0 + Float64(a * Float64(a * Float64(-729.0 + Float64(t_2 * Float64(59049.0 + Float64(Float64(a * a) * -531441.0)))))))) * t_0); elseif (rand <= 9.6e+141) tmp = Float64(a + -0.3333333333333333); else tmp = Float64(t_0 * Float64(t_3 * Float64(81.0 + Float64(Float64(a * a) * Float64(-729.0 + Float64(t_2 * 59049.0)))))); end return tmp end
function tmp_2 = code(a, rand) t_0 = 1.0 / (-0.3333333333333333 - a); t_1 = a * (a * a); t_2 = a * t_1; t_3 = 0.0013717421124828531 - (a * ((a * a) * t_1)); tmp = 0.0; if (rand <= -5e+134) tmp = (t_3 * (81.0 + (a * (a * (-729.0 + (t_2 * (59049.0 + ((a * a) * -531441.0)))))))) * t_0; elseif (rand <= 9.6e+141) tmp = a + -0.3333333333333333; else tmp = t_0 * (t_3 * (81.0 + ((a * a) * (-729.0 + (t_2 * 59049.0))))); end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(1.0 / N[(-0.3333333333333333 - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(0.0013717421124828531 - N[(a * N[(N[(a * a), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -5e+134], N[(N[(t$95$3 * N[(81.0 + N[(a * N[(a * N[(-729.0 + N[(t$95$2 * N[(59049.0 + N[(N[(a * a), $MachinePrecision] * -531441.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[rand, 9.6e+141], N[(a + -0.3333333333333333), $MachinePrecision], N[(t$95$0 * N[(t$95$3 * N[(81.0 + N[(N[(a * a), $MachinePrecision] * N[(-729.0 + N[(t$95$2 * 59049.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{-0.3333333333333333 - a}\\
t_1 := a \cdot \left(a \cdot a\right)\\
t_2 := a \cdot t\_1\\
t_3 := 0.0013717421124828531 - a \cdot \left(\left(a \cdot a\right) \cdot t\_1\right)\\
\mathbf{if}\;rand \leq -5 \cdot 10^{+134}:\\
\;\;\;\;\left(t\_3 \cdot \left(81 + a \cdot \left(a \cdot \left(-729 + t\_2 \cdot \left(59049 + \left(a \cdot a\right) \cdot -531441\right)\right)\right)\right)\right) \cdot t\_0\\
\mathbf{elif}\;rand \leq 9.6 \cdot 10^{+141}:\\
\;\;\;\;a + -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(t\_3 \cdot \left(81 + \left(a \cdot a\right) \cdot \left(-729 + t\_2 \cdot 59049\right)\right)\right)\\
\end{array}
\end{array}
if rand < -4.99999999999999981e134Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.4%
Simplified0.4%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f640.3%
Applied egg-rr0.3%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
--lowering--.f64N/A
metadata-evalN/A
cube-multN/A
swap-sqrN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
Applied egg-rr0.2%
Taylor expanded in a around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
Simplified60.6%
if -4.99999999999999981e134 < rand < 9.59999999999999989e141Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6489.4%
Simplified89.4%
if 9.59999999999999989e141 < rand Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.3%
Simplified5.3%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6436.8%
Applied egg-rr36.8%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
--lowering--.f64N/A
metadata-evalN/A
cube-multN/A
swap-sqrN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
Applied egg-rr6.5%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
unpow2N/A
associate-*l*N/A
unpow2N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.9%
Simplified48.9%
Final simplification79.2%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (* a (* a a)))
(t_1 (/ 1.0 (- -0.3333333333333333 a)))
(t_2 (- 0.0013717421124828531 (* a (* (* a a) t_0)))))
(if (<= rand -9.2e+134)
(* t_1 (* t_2 (+ 81.0 (* (* a a) -729.0))))
(if (<= rand 9.6e+141)
(+ a -0.3333333333333333)
(*
t_1
(* t_2 (+ 81.0 (* (* a a) (+ -729.0 (* (* a t_0) 59049.0))))))))))
double code(double a, double rand) {
double t_0 = a * (a * a);
double t_1 = 1.0 / (-0.3333333333333333 - a);
double t_2 = 0.0013717421124828531 - (a * ((a * a) * t_0));
double tmp;
if (rand <= -9.2e+134) {
tmp = t_1 * (t_2 * (81.0 + ((a * a) * -729.0)));
} else if (rand <= 9.6e+141) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_1 * (t_2 * (81.0 + ((a * a) * (-729.0 + ((a * t_0) * 59049.0)))));
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = a * (a * a)
t_1 = 1.0d0 / ((-0.3333333333333333d0) - a)
t_2 = 0.0013717421124828531d0 - (a * ((a * a) * t_0))
if (rand <= (-9.2d+134)) then
tmp = t_1 * (t_2 * (81.0d0 + ((a * a) * (-729.0d0))))
else if (rand <= 9.6d+141) then
tmp = a + (-0.3333333333333333d0)
else
tmp = t_1 * (t_2 * (81.0d0 + ((a * a) * ((-729.0d0) + ((a * t_0) * 59049.0d0)))))
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = a * (a * a);
double t_1 = 1.0 / (-0.3333333333333333 - a);
double t_2 = 0.0013717421124828531 - (a * ((a * a) * t_0));
double tmp;
if (rand <= -9.2e+134) {
tmp = t_1 * (t_2 * (81.0 + ((a * a) * -729.0)));
} else if (rand <= 9.6e+141) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_1 * (t_2 * (81.0 + ((a * a) * (-729.0 + ((a * t_0) * 59049.0)))));
}
return tmp;
}
def code(a, rand): t_0 = a * (a * a) t_1 = 1.0 / (-0.3333333333333333 - a) t_2 = 0.0013717421124828531 - (a * ((a * a) * t_0)) tmp = 0 if rand <= -9.2e+134: tmp = t_1 * (t_2 * (81.0 + ((a * a) * -729.0))) elif rand <= 9.6e+141: tmp = a + -0.3333333333333333 else: tmp = t_1 * (t_2 * (81.0 + ((a * a) * (-729.0 + ((a * t_0) * 59049.0))))) return tmp
function code(a, rand) t_0 = Float64(a * Float64(a * a)) t_1 = Float64(1.0 / Float64(-0.3333333333333333 - a)) t_2 = Float64(0.0013717421124828531 - Float64(a * Float64(Float64(a * a) * t_0))) tmp = 0.0 if (rand <= -9.2e+134) tmp = Float64(t_1 * Float64(t_2 * Float64(81.0 + Float64(Float64(a * a) * -729.0)))); elseif (rand <= 9.6e+141) tmp = Float64(a + -0.3333333333333333); else tmp = Float64(t_1 * Float64(t_2 * Float64(81.0 + Float64(Float64(a * a) * Float64(-729.0 + Float64(Float64(a * t_0) * 59049.0)))))); end return tmp end
function tmp_2 = code(a, rand) t_0 = a * (a * a); t_1 = 1.0 / (-0.3333333333333333 - a); t_2 = 0.0013717421124828531 - (a * ((a * a) * t_0)); tmp = 0.0; if (rand <= -9.2e+134) tmp = t_1 * (t_2 * (81.0 + ((a * a) * -729.0))); elseif (rand <= 9.6e+141) tmp = a + -0.3333333333333333; else tmp = t_1 * (t_2 * (81.0 + ((a * a) * (-729.0 + ((a * t_0) * 59049.0))))); end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / N[(-0.3333333333333333 - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.0013717421124828531 - N[(a * N[(N[(a * a), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -9.2e+134], N[(t$95$1 * N[(t$95$2 * N[(81.0 + N[(N[(a * a), $MachinePrecision] * -729.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 9.6e+141], N[(a + -0.3333333333333333), $MachinePrecision], N[(t$95$1 * N[(t$95$2 * N[(81.0 + N[(N[(a * a), $MachinePrecision] * N[(-729.0 + N[(N[(a * t$95$0), $MachinePrecision] * 59049.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot \left(a \cdot a\right)\\
t_1 := \frac{1}{-0.3333333333333333 - a}\\
t_2 := 0.0013717421124828531 - a \cdot \left(\left(a \cdot a\right) \cdot t\_0\right)\\
\mathbf{if}\;rand \leq -9.2 \cdot 10^{+134}:\\
\;\;\;\;t\_1 \cdot \left(t\_2 \cdot \left(81 + \left(a \cdot a\right) \cdot -729\right)\right)\\
\mathbf{elif}\;rand \leq 9.6 \cdot 10^{+141}:\\
\;\;\;\;a + -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(t\_2 \cdot \left(81 + \left(a \cdot a\right) \cdot \left(-729 + \left(a \cdot t\_0\right) \cdot 59049\right)\right)\right)\\
\end{array}
\end{array}
if rand < -9.1999999999999992e134Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.4%
Simplified0.4%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f640.3%
Applied egg-rr0.3%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
--lowering--.f64N/A
metadata-evalN/A
cube-multN/A
swap-sqrN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
Applied egg-rr0.2%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.3%
Simplified58.3%
if -9.1999999999999992e134 < rand < 9.59999999999999989e141Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6489.4%
Simplified89.4%
if 9.59999999999999989e141 < rand Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.3%
Simplified5.3%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6436.8%
Applied egg-rr36.8%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
--lowering--.f64N/A
metadata-evalN/A
cube-multN/A
swap-sqrN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
Applied egg-rr6.5%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
unpow2N/A
associate-*l*N/A
unpow2N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.9%
Simplified48.9%
Final simplification78.9%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (/ 1.0 (- -0.3333333333333333 a)))
(t_1 (- 0.0013717421124828531 (* a (* (* a a) (* a (* a a)))))))
(if (<= rand -8.2e+134)
(* t_0 (* t_1 (+ 81.0 (* (* a a) -729.0))))
(if (<= rand 9.6e+141) (+ a -0.3333333333333333) (* t_0 (* t_1 81.0))))))
double code(double a, double rand) {
double t_0 = 1.0 / (-0.3333333333333333 - a);
double t_1 = 0.0013717421124828531 - (a * ((a * a) * (a * (a * a))));
double tmp;
if (rand <= -8.2e+134) {
tmp = t_0 * (t_1 * (81.0 + ((a * a) * -729.0)));
} else if (rand <= 9.6e+141) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0 * (t_1 * 81.0);
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / ((-0.3333333333333333d0) - a)
t_1 = 0.0013717421124828531d0 - (a * ((a * a) * (a * (a * a))))
if (rand <= (-8.2d+134)) then
tmp = t_0 * (t_1 * (81.0d0 + ((a * a) * (-729.0d0))))
else if (rand <= 9.6d+141) then
tmp = a + (-0.3333333333333333d0)
else
tmp = t_0 * (t_1 * 81.0d0)
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = 1.0 / (-0.3333333333333333 - a);
double t_1 = 0.0013717421124828531 - (a * ((a * a) * (a * (a * a))));
double tmp;
if (rand <= -8.2e+134) {
tmp = t_0 * (t_1 * (81.0 + ((a * a) * -729.0)));
} else if (rand <= 9.6e+141) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0 * (t_1 * 81.0);
}
return tmp;
}
def code(a, rand): t_0 = 1.0 / (-0.3333333333333333 - a) t_1 = 0.0013717421124828531 - (a * ((a * a) * (a * (a * a)))) tmp = 0 if rand <= -8.2e+134: tmp = t_0 * (t_1 * (81.0 + ((a * a) * -729.0))) elif rand <= 9.6e+141: tmp = a + -0.3333333333333333 else: tmp = t_0 * (t_1 * 81.0) return tmp
function code(a, rand) t_0 = Float64(1.0 / Float64(-0.3333333333333333 - a)) t_1 = Float64(0.0013717421124828531 - Float64(a * Float64(Float64(a * a) * Float64(a * Float64(a * a))))) tmp = 0.0 if (rand <= -8.2e+134) tmp = Float64(t_0 * Float64(t_1 * Float64(81.0 + Float64(Float64(a * a) * -729.0)))); elseif (rand <= 9.6e+141) tmp = Float64(a + -0.3333333333333333); else tmp = Float64(t_0 * Float64(t_1 * 81.0)); end return tmp end
function tmp_2 = code(a, rand) t_0 = 1.0 / (-0.3333333333333333 - a); t_1 = 0.0013717421124828531 - (a * ((a * a) * (a * (a * a)))); tmp = 0.0; if (rand <= -8.2e+134) tmp = t_0 * (t_1 * (81.0 + ((a * a) * -729.0))); elseif (rand <= 9.6e+141) tmp = a + -0.3333333333333333; else tmp = t_0 * (t_1 * 81.0); end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(1.0 / N[(-0.3333333333333333 - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.0013717421124828531 - N[(a * N[(N[(a * a), $MachinePrecision] * N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -8.2e+134], N[(t$95$0 * N[(t$95$1 * N[(81.0 + N[(N[(a * a), $MachinePrecision] * -729.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 9.6e+141], N[(a + -0.3333333333333333), $MachinePrecision], N[(t$95$0 * N[(t$95$1 * 81.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{-0.3333333333333333 - a}\\
t_1 := 0.0013717421124828531 - a \cdot \left(\left(a \cdot a\right) \cdot \left(a \cdot \left(a \cdot a\right)\right)\right)\\
\mathbf{if}\;rand \leq -8.2 \cdot 10^{+134}:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot \left(81 + \left(a \cdot a\right) \cdot -729\right)\right)\\
\mathbf{elif}\;rand \leq 9.6 \cdot 10^{+141}:\\
\;\;\;\;a + -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot 81\right)\\
\end{array}
\end{array}
if rand < -8.2000000000000007e134Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.4%
Simplified0.4%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f640.3%
Applied egg-rr0.3%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
--lowering--.f64N/A
metadata-evalN/A
cube-multN/A
swap-sqrN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
Applied egg-rr0.2%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.3%
Simplified58.3%
if -8.2000000000000007e134 < rand < 9.59999999999999989e141Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6489.4%
Simplified89.4%
if 9.59999999999999989e141 < rand Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.3%
Simplified5.3%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6436.8%
Applied egg-rr36.8%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
--lowering--.f64N/A
metadata-evalN/A
cube-multN/A
swap-sqrN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
Applied egg-rr6.5%
Taylor expanded in a around 0
Simplified46.4%
Final simplification78.5%
(FPCore (a rand)
:precision binary64
(if (<= rand -2.1e+134)
(*
(- 0.1111111111111111 (* a a))
(+ -3.0 (* a (+ 9.0 (* a (+ -27.0 (* a 81.0)))))))
(if (<= rand 9.6e+141)
(+ a -0.3333333333333333)
(*
(/ 1.0 (- -0.3333333333333333 a))
(* (- 0.0013717421124828531 (* a (* (* a a) (* a (* a a))))) 81.0)))))
double code(double a, double rand) {
double tmp;
if (rand <= -2.1e+134) {
tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * (9.0 + (a * (-27.0 + (a * 81.0))))));
} else if (rand <= 9.6e+141) {
tmp = a + -0.3333333333333333;
} else {
tmp = (1.0 / (-0.3333333333333333 - a)) * ((0.0013717421124828531 - (a * ((a * a) * (a * (a * a))))) * 81.0);
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: tmp
if (rand <= (-2.1d+134)) then
tmp = (0.1111111111111111d0 - (a * a)) * ((-3.0d0) + (a * (9.0d0 + (a * ((-27.0d0) + (a * 81.0d0))))))
else if (rand <= 9.6d+141) then
tmp = a + (-0.3333333333333333d0)
else
tmp = (1.0d0 / ((-0.3333333333333333d0) - a)) * ((0.0013717421124828531d0 - (a * ((a * a) * (a * (a * a))))) * 81.0d0)
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= -2.1e+134) {
tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * (9.0 + (a * (-27.0 + (a * 81.0))))));
} else if (rand <= 9.6e+141) {
tmp = a + -0.3333333333333333;
} else {
tmp = (1.0 / (-0.3333333333333333 - a)) * ((0.0013717421124828531 - (a * ((a * a) * (a * (a * a))))) * 81.0);
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= -2.1e+134: tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * (9.0 + (a * (-27.0 + (a * 81.0)))))) elif rand <= 9.6e+141: tmp = a + -0.3333333333333333 else: tmp = (1.0 / (-0.3333333333333333 - a)) * ((0.0013717421124828531 - (a * ((a * a) * (a * (a * a))))) * 81.0) return tmp
function code(a, rand) tmp = 0.0 if (rand <= -2.1e+134) tmp = Float64(Float64(0.1111111111111111 - Float64(a * a)) * Float64(-3.0 + Float64(a * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(a * 81.0))))))); elseif (rand <= 9.6e+141) tmp = Float64(a + -0.3333333333333333); else tmp = Float64(Float64(1.0 / Float64(-0.3333333333333333 - a)) * Float64(Float64(0.0013717421124828531 - Float64(a * Float64(Float64(a * a) * Float64(a * Float64(a * a))))) * 81.0)); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= -2.1e+134) tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * (9.0 + (a * (-27.0 + (a * 81.0)))))); elseif (rand <= 9.6e+141) tmp = a + -0.3333333333333333; else tmp = (1.0 / (-0.3333333333333333 - a)) * ((0.0013717421124828531 - (a * ((a * a) * (a * (a * a))))) * 81.0); end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, -2.1e+134], N[(N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(-3.0 + N[(a * N[(9.0 + N[(a * N[(-27.0 + N[(a * 81.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 9.6e+141], N[(a + -0.3333333333333333), $MachinePrecision], N[(N[(1.0 / N[(-0.3333333333333333 - a), $MachinePrecision]), $MachinePrecision] * N[(N[(0.0013717421124828531 - N[(a * N[(N[(a * a), $MachinePrecision] * N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 81.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq -2.1 \cdot 10^{+134}:\\
\;\;\;\;\left(0.1111111111111111 - a \cdot a\right) \cdot \left(-3 + a \cdot \left(9 + a \cdot \left(-27 + a \cdot 81\right)\right)\right)\\
\mathbf{elif}\;rand \leq 9.6 \cdot 10^{+141}:\\
\;\;\;\;a + -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{-0.3333333333333333 - a} \cdot \left(\left(0.0013717421124828531 - a \cdot \left(\left(a \cdot a\right) \cdot \left(a \cdot \left(a \cdot a\right)\right)\right)\right) \cdot 81\right)\\
\end{array}
\end{array}
if rand < -2.1000000000000001e134Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.4%
Simplified0.4%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f640.3%
Applied egg-rr0.3%
Taylor expanded in a around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6458.2%
Simplified58.2%
if -2.1000000000000001e134 < rand < 9.59999999999999989e141Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6489.4%
Simplified89.4%
if 9.59999999999999989e141 < rand Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.3%
Simplified5.3%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6436.8%
Applied egg-rr36.8%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
metadata-evalN/A
--lowering--.f64N/A
metadata-evalN/A
cube-multN/A
swap-sqrN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
Applied egg-rr6.5%
Taylor expanded in a around 0
Simplified46.4%
Final simplification78.5%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (- 0.1111111111111111 (* a a))))
(if (<= rand -4.5e+133)
(* t_0 (+ -3.0 (* a (+ 9.0 (* a (+ -27.0 (* a 81.0)))))))
(if (<= rand 3.3e+150)
(+ a -0.3333333333333333)
(* t_0 (+ -3.0 (* a (+ 9.0 (* a -27.0)))))))))
double code(double a, double rand) {
double t_0 = 0.1111111111111111 - (a * a);
double tmp;
if (rand <= -4.5e+133) {
tmp = t_0 * (-3.0 + (a * (9.0 + (a * (-27.0 + (a * 81.0))))));
} else if (rand <= 3.3e+150) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0 * (-3.0 + (a * (9.0 + (a * -27.0))));
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
real(8) :: tmp
t_0 = 0.1111111111111111d0 - (a * a)
if (rand <= (-4.5d+133)) then
tmp = t_0 * ((-3.0d0) + (a * (9.0d0 + (a * ((-27.0d0) + (a * 81.0d0))))))
else if (rand <= 3.3d+150) then
tmp = a + (-0.3333333333333333d0)
else
tmp = t_0 * ((-3.0d0) + (a * (9.0d0 + (a * (-27.0d0)))))
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = 0.1111111111111111 - (a * a);
double tmp;
if (rand <= -4.5e+133) {
tmp = t_0 * (-3.0 + (a * (9.0 + (a * (-27.0 + (a * 81.0))))));
} else if (rand <= 3.3e+150) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0 * (-3.0 + (a * (9.0 + (a * -27.0))));
}
return tmp;
}
def code(a, rand): t_0 = 0.1111111111111111 - (a * a) tmp = 0 if rand <= -4.5e+133: tmp = t_0 * (-3.0 + (a * (9.0 + (a * (-27.0 + (a * 81.0)))))) elif rand <= 3.3e+150: tmp = a + -0.3333333333333333 else: tmp = t_0 * (-3.0 + (a * (9.0 + (a * -27.0)))) return tmp
function code(a, rand) t_0 = Float64(0.1111111111111111 - Float64(a * a)) tmp = 0.0 if (rand <= -4.5e+133) tmp = Float64(t_0 * Float64(-3.0 + Float64(a * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(a * 81.0))))))); elseif (rand <= 3.3e+150) tmp = Float64(a + -0.3333333333333333); else tmp = Float64(t_0 * Float64(-3.0 + Float64(a * Float64(9.0 + Float64(a * -27.0))))); end return tmp end
function tmp_2 = code(a, rand) t_0 = 0.1111111111111111 - (a * a); tmp = 0.0; if (rand <= -4.5e+133) tmp = t_0 * (-3.0 + (a * (9.0 + (a * (-27.0 + (a * 81.0)))))); elseif (rand <= 3.3e+150) tmp = a + -0.3333333333333333; else tmp = t_0 * (-3.0 + (a * (9.0 + (a * -27.0)))); end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -4.5e+133], N[(t$95$0 * N[(-3.0 + N[(a * N[(9.0 + N[(a * N[(-27.0 + N[(a * 81.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 3.3e+150], N[(a + -0.3333333333333333), $MachinePrecision], N[(t$95$0 * N[(-3.0 + N[(a * N[(9.0 + N[(a * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.1111111111111111 - a \cdot a\\
\mathbf{if}\;rand \leq -4.5 \cdot 10^{+133}:\\
\;\;\;\;t\_0 \cdot \left(-3 + a \cdot \left(9 + a \cdot \left(-27 + a \cdot 81\right)\right)\right)\\
\mathbf{elif}\;rand \leq 3.3 \cdot 10^{+150}:\\
\;\;\;\;a + -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(-3 + a \cdot \left(9 + a \cdot -27\right)\right)\\
\end{array}
\end{array}
if rand < -4.49999999999999985e133Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.4%
Simplified0.4%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f640.3%
Applied egg-rr0.3%
Taylor expanded in a around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6458.2%
Simplified58.2%
if -4.49999999999999985e133 < rand < 3.29999999999999981e150Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6488.5%
Simplified88.5%
if 3.29999999999999981e150 < rand Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.2%
Simplified5.2%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6438.7%
Applied egg-rr38.7%
Taylor expanded in a around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6443.1%
Simplified43.1%
Final simplification77.7%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (- 0.1111111111111111 (* a a))))
(if (<= rand -5e+134)
(* t_0 (+ (* a 9.0) -3.0))
(if (<= rand 8e+151)
(+ a -0.3333333333333333)
(* t_0 (+ -3.0 (* a (+ 9.0 (* a -27.0)))))))))
double code(double a, double rand) {
double t_0 = 0.1111111111111111 - (a * a);
double tmp;
if (rand <= -5e+134) {
tmp = t_0 * ((a * 9.0) + -3.0);
} else if (rand <= 8e+151) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0 * (-3.0 + (a * (9.0 + (a * -27.0))));
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
real(8) :: tmp
t_0 = 0.1111111111111111d0 - (a * a)
if (rand <= (-5d+134)) then
tmp = t_0 * ((a * 9.0d0) + (-3.0d0))
else if (rand <= 8d+151) then
tmp = a + (-0.3333333333333333d0)
else
tmp = t_0 * ((-3.0d0) + (a * (9.0d0 + (a * (-27.0d0)))))
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = 0.1111111111111111 - (a * a);
double tmp;
if (rand <= -5e+134) {
tmp = t_0 * ((a * 9.0) + -3.0);
} else if (rand <= 8e+151) {
tmp = a + -0.3333333333333333;
} else {
tmp = t_0 * (-3.0 + (a * (9.0 + (a * -27.0))));
}
return tmp;
}
def code(a, rand): t_0 = 0.1111111111111111 - (a * a) tmp = 0 if rand <= -5e+134: tmp = t_0 * ((a * 9.0) + -3.0) elif rand <= 8e+151: tmp = a + -0.3333333333333333 else: tmp = t_0 * (-3.0 + (a * (9.0 + (a * -27.0)))) return tmp
function code(a, rand) t_0 = Float64(0.1111111111111111 - Float64(a * a)) tmp = 0.0 if (rand <= -5e+134) tmp = Float64(t_0 * Float64(Float64(a * 9.0) + -3.0)); elseif (rand <= 8e+151) tmp = Float64(a + -0.3333333333333333); else tmp = Float64(t_0 * Float64(-3.0 + Float64(a * Float64(9.0 + Float64(a * -27.0))))); end return tmp end
function tmp_2 = code(a, rand) t_0 = 0.1111111111111111 - (a * a); tmp = 0.0; if (rand <= -5e+134) tmp = t_0 * ((a * 9.0) + -3.0); elseif (rand <= 8e+151) tmp = a + -0.3333333333333333; else tmp = t_0 * (-3.0 + (a * (9.0 + (a * -27.0)))); end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -5e+134], N[(t$95$0 * N[(N[(a * 9.0), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 8e+151], N[(a + -0.3333333333333333), $MachinePrecision], N[(t$95$0 * N[(-3.0 + N[(a * N[(9.0 + N[(a * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.1111111111111111 - a \cdot a\\
\mathbf{if}\;rand \leq -5 \cdot 10^{+134}:\\
\;\;\;\;t\_0 \cdot \left(a \cdot 9 + -3\right)\\
\mathbf{elif}\;rand \leq 8 \cdot 10^{+151}:\\
\;\;\;\;a + -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(-3 + a \cdot \left(9 + a \cdot -27\right)\right)\\
\end{array}
\end{array}
if rand < -4.99999999999999981e134Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.4%
Simplified0.4%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f640.3%
Applied egg-rr0.3%
Taylor expanded in a around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6455.5%
Simplified55.5%
if -4.99999999999999981e134 < rand < 8.00000000000000014e151Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6488.5%
Simplified88.5%
if 8.00000000000000014e151 < rand Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.2%
Simplified5.2%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6438.7%
Applied egg-rr38.7%
Taylor expanded in a around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6443.1%
Simplified43.1%
Final simplification77.3%
(FPCore (a rand) :precision binary64 (if (<= rand -2.7e+134) (* (- 0.1111111111111111 (* a a)) (+ (* a 9.0) -3.0)) (if (<= rand 1.95e+148) (+ a -0.3333333333333333) (* 9.0 (* a (* a a))))))
double code(double a, double rand) {
double tmp;
if (rand <= -2.7e+134) {
tmp = (0.1111111111111111 - (a * a)) * ((a * 9.0) + -3.0);
} else if (rand <= 1.95e+148) {
tmp = a + -0.3333333333333333;
} else {
tmp = 9.0 * (a * (a * a));
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: tmp
if (rand <= (-2.7d+134)) then
tmp = (0.1111111111111111d0 - (a * a)) * ((a * 9.0d0) + (-3.0d0))
else if (rand <= 1.95d+148) then
tmp = a + (-0.3333333333333333d0)
else
tmp = 9.0d0 * (a * (a * a))
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= -2.7e+134) {
tmp = (0.1111111111111111 - (a * a)) * ((a * 9.0) + -3.0);
} else if (rand <= 1.95e+148) {
tmp = a + -0.3333333333333333;
} else {
tmp = 9.0 * (a * (a * a));
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= -2.7e+134: tmp = (0.1111111111111111 - (a * a)) * ((a * 9.0) + -3.0) elif rand <= 1.95e+148: tmp = a + -0.3333333333333333 else: tmp = 9.0 * (a * (a * a)) return tmp
function code(a, rand) tmp = 0.0 if (rand <= -2.7e+134) tmp = Float64(Float64(0.1111111111111111 - Float64(a * a)) * Float64(Float64(a * 9.0) + -3.0)); elseif (rand <= 1.95e+148) tmp = Float64(a + -0.3333333333333333); else tmp = Float64(9.0 * Float64(a * Float64(a * a))); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= -2.7e+134) tmp = (0.1111111111111111 - (a * a)) * ((a * 9.0) + -3.0); elseif (rand <= 1.95e+148) tmp = a + -0.3333333333333333; else tmp = 9.0 * (a * (a * a)); end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, -2.7e+134], N[(N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(N[(a * 9.0), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 1.95e+148], N[(a + -0.3333333333333333), $MachinePrecision], N[(9.0 * N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq -2.7 \cdot 10^{+134}:\\
\;\;\;\;\left(0.1111111111111111 - a \cdot a\right) \cdot \left(a \cdot 9 + -3\right)\\
\mathbf{elif}\;rand \leq 1.95 \cdot 10^{+148}:\\
\;\;\;\;a + -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(a \cdot \left(a \cdot a\right)\right)\\
\end{array}
\end{array}
if rand < -2.7e134Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.4%
Simplified0.4%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f640.3%
Applied egg-rr0.3%
Taylor expanded in a around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6455.5%
Simplified55.5%
if -2.7e134 < rand < 1.95000000000000001e148Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6488.5%
Simplified88.5%
if 1.95000000000000001e148 < rand Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.2%
Simplified5.2%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f642.7%
Applied egg-rr2.7%
Taylor expanded in a around 0
Simplified40.4%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.4%
Simplified40.4%
Final simplification77.0%
(FPCore (a rand) :precision binary64 (if (<= rand 4.3e+148) (+ a -0.3333333333333333) (* 9.0 (* a (* a a)))))
double code(double a, double rand) {
double tmp;
if (rand <= 4.3e+148) {
tmp = a + -0.3333333333333333;
} else {
tmp = 9.0 * (a * (a * a));
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: tmp
if (rand <= 4.3d+148) then
tmp = a + (-0.3333333333333333d0)
else
tmp = 9.0d0 * (a * (a * a))
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= 4.3e+148) {
tmp = a + -0.3333333333333333;
} else {
tmp = 9.0 * (a * (a * a));
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= 4.3e+148: tmp = a + -0.3333333333333333 else: tmp = 9.0 * (a * (a * a)) return tmp
function code(a, rand) tmp = 0.0 if (rand <= 4.3e+148) tmp = Float64(a + -0.3333333333333333); else tmp = Float64(9.0 * Float64(a * Float64(a * a))); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= 4.3e+148) tmp = a + -0.3333333333333333; else tmp = 9.0 * (a * (a * a)); end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, 4.3e+148], N[(a + -0.3333333333333333), $MachinePrecision], N[(9.0 * N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq 4.3 \cdot 10^{+148}:\\
\;\;\;\;a + -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(a \cdot \left(a \cdot a\right)\right)\\
\end{array}
\end{array}
if rand < 4.3000000000000002e148Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6472.6%
Simplified72.6%
if 4.3000000000000002e148 < rand Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.2%
Simplified5.2%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f642.7%
Applied egg-rr2.7%
Taylor expanded in a around 0
Simplified40.4%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.4%
Simplified40.4%
Final simplification68.4%
(FPCore (a rand) :precision binary64 (+ a -0.3333333333333333))
double code(double a, double rand) {
return a + -0.3333333333333333;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = a + (-0.3333333333333333d0)
end function
public static double code(double a, double rand) {
return a + -0.3333333333333333;
}
def code(a, rand): return a + -0.3333333333333333
function code(a, rand) return Float64(a + -0.3333333333333333) end
function tmp = code(a, rand) tmp = a + -0.3333333333333333; end
code[a_, rand_] := N[(a + -0.3333333333333333), $MachinePrecision]
\begin{array}{l}
\\
a + -0.3333333333333333
\end{array}
Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6463.7%
Simplified63.7%
Final simplification63.7%
(FPCore (a rand) :precision binary64 a)
double code(double a, double rand) {
return a;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = a
end function
public static double code(double a, double rand) {
return a;
}
def code(a, rand): return a
function code(a, rand) return a end
function tmp = code(a, rand) tmp = a; end
code[a_, rand_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6463.7%
Simplified63.7%
Taylor expanded in a around inf
Simplified61.7%
(FPCore (a rand) :precision binary64 -0.3333333333333333)
double code(double a, double rand) {
return -0.3333333333333333;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = -0.3333333333333333d0
end function
public static double code(double a, double rand) {
return -0.3333333333333333;
}
def code(a, rand): return -0.3333333333333333
function code(a, rand) return -0.3333333333333333 end
function tmp = code(a, rand) tmp = -0.3333333333333333; end
code[a_, rand_] := -0.3333333333333333
\begin{array}{l}
\\
-0.3333333333333333
\end{array}
Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6463.7%
Simplified63.7%
Taylor expanded in a around 0
Simplified1.5%
herbie shell --seed 2024150
(FPCore (a rand)
:name "Octave 3.8, oct_fill_randg"
:precision binary64
(* (- a (/ 1.0 3.0)) (+ 1.0 (* (/ 1.0 (sqrt (* 9.0 (- a (/ 1.0 3.0))))) rand))))