
(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 22 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 (+ (+ -0.3333333333333333 a) (/ (pow (+ -0.3333333333333333 a) 0.5) (/ 3.0 rand))))
double code(double a, double rand) {
return (-0.3333333333333333 + a) + (pow((-0.3333333333333333 + a), 0.5) / (3.0 / rand));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = ((-0.3333333333333333d0) + a) + ((((-0.3333333333333333d0) + a) ** 0.5d0) / (3.0d0 / rand))
end function
public static double code(double a, double rand) {
return (-0.3333333333333333 + a) + (Math.pow((-0.3333333333333333 + a), 0.5) / (3.0 / rand));
}
def code(a, rand): return (-0.3333333333333333 + a) + (math.pow((-0.3333333333333333 + a), 0.5) / (3.0 / rand))
function code(a, rand) return Float64(Float64(-0.3333333333333333 + a) + Float64((Float64(-0.3333333333333333 + a) ^ 0.5) / Float64(3.0 / rand))) end
function tmp = code(a, rand) tmp = (-0.3333333333333333 + a) + (((-0.3333333333333333 + a) ^ 0.5) / (3.0 / rand)); end
code[a_, rand_] := N[(N[(-0.3333333333333333 + a), $MachinePrecision] + N[(N[Power[N[(-0.3333333333333333 + a), $MachinePrecision], 0.5], $MachinePrecision] / N[(3.0 / rand), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-0.3333333333333333 + a\right) + \frac{{\left(-0.3333333333333333 + a\right)}^{0.5}}{\frac{3}{rand}}
\end{array}
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 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%
+-commutativeN/A
+-lowering-+.f64N/A
pow1/2N/A
+-commutativeN/A
metadata-evalN/A
associate-/r/N/A
un-div-invN/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (* (sqrt (+ -0.3333333333333333 a)) (* rand 0.3333333333333333))))
(if (<= rand -3.2e+88)
t_0
(if (<= rand 6e+85) (+ -0.3333333333333333 a) t_0))))
double code(double a, double rand) {
double t_0 = sqrt((-0.3333333333333333 + a)) * (rand * 0.3333333333333333);
double tmp;
if (rand <= -3.2e+88) {
tmp = t_0;
} else if (rand <= 6e+85) {
tmp = -0.3333333333333333 + a;
} 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(((-0.3333333333333333d0) + a)) * (rand * 0.3333333333333333d0)
if (rand <= (-3.2d+88)) then
tmp = t_0
else if (rand <= 6d+85) then
tmp = (-0.3333333333333333d0) + a
else
tmp = t_0
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = Math.sqrt((-0.3333333333333333 + a)) * (rand * 0.3333333333333333);
double tmp;
if (rand <= -3.2e+88) {
tmp = t_0;
} else if (rand <= 6e+85) {
tmp = -0.3333333333333333 + a;
} else {
tmp = t_0;
}
return tmp;
}
def code(a, rand): t_0 = math.sqrt((-0.3333333333333333 + a)) * (rand * 0.3333333333333333) tmp = 0 if rand <= -3.2e+88: tmp = t_0 elif rand <= 6e+85: tmp = -0.3333333333333333 + a else: tmp = t_0 return tmp
function code(a, rand) t_0 = Float64(sqrt(Float64(-0.3333333333333333 + a)) * Float64(rand * 0.3333333333333333)) tmp = 0.0 if (rand <= -3.2e+88) tmp = t_0; elseif (rand <= 6e+85) tmp = Float64(-0.3333333333333333 + a); else tmp = t_0; end return tmp end
function tmp_2 = code(a, rand) t_0 = sqrt((-0.3333333333333333 + a)) * (rand * 0.3333333333333333); tmp = 0.0; if (rand <= -3.2e+88) tmp = t_0; elseif (rand <= 6e+85) tmp = -0.3333333333333333 + a; else tmp = t_0; end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(N[Sqrt[N[(-0.3333333333333333 + a), $MachinePrecision]], $MachinePrecision] * N[(rand * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -3.2e+88], t$95$0, If[LessEqual[rand, 6e+85], N[(-0.3333333333333333 + a), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{-0.3333333333333333 + a} \cdot \left(rand \cdot 0.3333333333333333\right)\\
\mathbf{if}\;rand \leq -3.2 \cdot 10^{+88}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;rand \leq 6 \cdot 10^{+85}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if rand < -3.1999999999999999e88 or 6.0000000000000001e85 < 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-*.f6494.6%
Simplified94.6%
if -3.1999999999999999e88 < rand < 6.0000000000000001e85Initial program 100.0%
*-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-eval100.0%
Simplified100.0%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6493.1%
Simplified93.1%
Final simplification93.6%
(FPCore (a rand)
:precision binary64
(if (<= rand -9.5e+90)
(* (* rand 0.3333333333333333) (sqrt a))
(if (<= rand 1.32e+87)
(+ -0.3333333333333333 a)
(* 0.3333333333333333 (* rand (sqrt a))))))
double code(double a, double rand) {
double tmp;
if (rand <= -9.5e+90) {
tmp = (rand * 0.3333333333333333) * sqrt(a);
} else if (rand <= 1.32e+87) {
tmp = -0.3333333333333333 + a;
} else {
tmp = 0.3333333333333333 * (rand * sqrt(a));
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: tmp
if (rand <= (-9.5d+90)) then
tmp = (rand * 0.3333333333333333d0) * sqrt(a)
else if (rand <= 1.32d+87) then
tmp = (-0.3333333333333333d0) + a
else
tmp = 0.3333333333333333d0 * (rand * sqrt(a))
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= -9.5e+90) {
tmp = (rand * 0.3333333333333333) * Math.sqrt(a);
} else if (rand <= 1.32e+87) {
tmp = -0.3333333333333333 + a;
} else {
tmp = 0.3333333333333333 * (rand * Math.sqrt(a));
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= -9.5e+90: tmp = (rand * 0.3333333333333333) * math.sqrt(a) elif rand <= 1.32e+87: tmp = -0.3333333333333333 + a else: tmp = 0.3333333333333333 * (rand * math.sqrt(a)) return tmp
function code(a, rand) tmp = 0.0 if (rand <= -9.5e+90) tmp = Float64(Float64(rand * 0.3333333333333333) * sqrt(a)); elseif (rand <= 1.32e+87) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(0.3333333333333333 * Float64(rand * sqrt(a))); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= -9.5e+90) tmp = (rand * 0.3333333333333333) * sqrt(a); elseif (rand <= 1.32e+87) tmp = -0.3333333333333333 + a; else tmp = 0.3333333333333333 * (rand * sqrt(a)); end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, -9.5e+90], N[(N[(rand * 0.3333333333333333), $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 1.32e+87], N[(-0.3333333333333333 + a), $MachinePrecision], N[(0.3333333333333333 * N[(rand * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq -9.5 \cdot 10^{+90}:\\
\;\;\;\;\left(rand \cdot 0.3333333333333333\right) \cdot \sqrt{a}\\
\mathbf{elif}\;rand \leq 1.32 \cdot 10^{+87}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(rand \cdot \sqrt{a}\right)\\
\end{array}
\end{array}
if rand < -9.4999999999999994e90Initial 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 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-*.f6494.1%
Simplified94.1%
Taylor expanded in a around inf
Simplified93.9%
if -9.4999999999999994e90 < rand < 1.32e87Initial program 100.0%
*-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-eval100.0%
Simplified100.0%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6493.1%
Simplified93.1%
if 1.32e87 < 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.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-*.f6499.1%
Simplified99.1%
Taylor expanded in a around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6494.7%
Simplified94.7%
Final simplification93.5%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (* 0.3333333333333333 (* rand (sqrt a)))))
(if (<= rand -1.2e+89)
t_0
(if (<= rand 7.8e+88) (+ -0.3333333333333333 a) t_0))))
double code(double a, double rand) {
double t_0 = 0.3333333333333333 * (rand * sqrt(a));
double tmp;
if (rand <= -1.2e+89) {
tmp = t_0;
} else if (rand <= 7.8e+88) {
tmp = -0.3333333333333333 + a;
} 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.2d+89)) then
tmp = t_0
else if (rand <= 7.8d+88) then
tmp = (-0.3333333333333333d0) + a
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.2e+89) {
tmp = t_0;
} else if (rand <= 7.8e+88) {
tmp = -0.3333333333333333 + a;
} else {
tmp = t_0;
}
return tmp;
}
def code(a, rand): t_0 = 0.3333333333333333 * (rand * math.sqrt(a)) tmp = 0 if rand <= -1.2e+89: tmp = t_0 elif rand <= 7.8e+88: tmp = -0.3333333333333333 + a 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.2e+89) tmp = t_0; elseif (rand <= 7.8e+88) tmp = Float64(-0.3333333333333333 + a); 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.2e+89) tmp = t_0; elseif (rand <= 7.8e+88) tmp = -0.3333333333333333 + a; 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.2e+89], t$95$0, If[LessEqual[rand, 7.8e+88], N[(-0.3333333333333333 + a), $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.2 \cdot 10^{+89}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;rand \leq 7.8 \cdot 10^{+88}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if rand < -1.20000000000000002e89 or 7.8000000000000002e88 < 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-*.f6499.2%
Simplified99.2%
Taylor expanded in a around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6494.3%
Simplified94.3%
if -1.20000000000000002e89 < rand < 7.8000000000000002e88Initial program 100.0%
*-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-eval100.0%
Simplified100.0%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6493.1%
Simplified93.1%
(FPCore (a rand) :precision binary64 (+ (+ -0.3333333333333333 a) (* (sqrt (+ -0.3333333333333333 a)) (/ rand 3.0))))
double code(double a, double rand) {
return (-0.3333333333333333 + a) + (sqrt((-0.3333333333333333 + a)) * (rand / 3.0));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = ((-0.3333333333333333d0) + a) + (sqrt(((-0.3333333333333333d0) + a)) * (rand / 3.0d0))
end function
public static double code(double a, double rand) {
return (-0.3333333333333333 + a) + (Math.sqrt((-0.3333333333333333 + a)) * (rand / 3.0));
}
def code(a, rand): return (-0.3333333333333333 + a) + (math.sqrt((-0.3333333333333333 + a)) * (rand / 3.0))
function code(a, rand) return Float64(Float64(-0.3333333333333333 + a) + Float64(sqrt(Float64(-0.3333333333333333 + a)) * Float64(rand / 3.0))) end
function tmp = code(a, rand) tmp = (-0.3333333333333333 + a) + (sqrt((-0.3333333333333333 + a)) * (rand / 3.0)); end
code[a_, rand_] := N[(N[(-0.3333333333333333 + a), $MachinePrecision] + N[(N[Sqrt[N[(-0.3333333333333333 + a), $MachinePrecision]], $MachinePrecision] * N[(rand / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-0.3333333333333333 + a\right) + \sqrt{-0.3333333333333333 + a} \cdot \frac{rand}{3}
\end{array}
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 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%
*-commutativeN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f6499.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (a rand) :precision binary64 (+ (+ -0.3333333333333333 a) (* (sqrt (+ -0.3333333333333333 a)) (* rand 0.3333333333333333))))
double code(double a, double rand) {
return (-0.3333333333333333 + a) + (sqrt((-0.3333333333333333 + a)) * (rand * 0.3333333333333333));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = ((-0.3333333333333333d0) + a) + (sqrt(((-0.3333333333333333d0) + a)) * (rand * 0.3333333333333333d0))
end function
public static double code(double a, double rand) {
return (-0.3333333333333333 + a) + (Math.sqrt((-0.3333333333333333 + a)) * (rand * 0.3333333333333333));
}
def code(a, rand): return (-0.3333333333333333 + a) + (math.sqrt((-0.3333333333333333 + a)) * (rand * 0.3333333333333333))
function code(a, rand) return Float64(Float64(-0.3333333333333333 + a) + Float64(sqrt(Float64(-0.3333333333333333 + a)) * Float64(rand * 0.3333333333333333))) end
function tmp = code(a, rand) tmp = (-0.3333333333333333 + a) + (sqrt((-0.3333333333333333 + a)) * (rand * 0.3333333333333333)); end
code[a_, rand_] := N[(N[(-0.3333333333333333 + a), $MachinePrecision] + N[(N[Sqrt[N[(-0.3333333333333333 + a), $MachinePrecision]], $MachinePrecision] * N[(rand * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-0.3333333333333333 + a\right) + \sqrt{-0.3333333333333333 + a} \cdot \left(rand \cdot 0.3333333333333333\right)
\end{array}
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 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 (/ (pow (+ -0.3333333333333333 a) 0.5) (/ 3.0 rand))))
double code(double a, double rand) {
return a + (pow((-0.3333333333333333 + a), 0.5) / (3.0 / rand));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = a + ((((-0.3333333333333333d0) + a) ** 0.5d0) / (3.0d0 / rand))
end function
public static double code(double a, double rand) {
return a + (Math.pow((-0.3333333333333333 + a), 0.5) / (3.0 / rand));
}
def code(a, rand): return a + (math.pow((-0.3333333333333333 + a), 0.5) / (3.0 / rand))
function code(a, rand) return Float64(a + Float64((Float64(-0.3333333333333333 + a) ^ 0.5) / Float64(3.0 / rand))) end
function tmp = code(a, rand) tmp = a + (((-0.3333333333333333 + a) ^ 0.5) / (3.0 / rand)); end
code[a_, rand_] := N[(a + N[(N[Power[N[(-0.3333333333333333 + a), $MachinePrecision], 0.5], $MachinePrecision] / N[(3.0 / rand), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \frac{{\left(-0.3333333333333333 + a\right)}^{0.5}}{\frac{3}{rand}}
\end{array}
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 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%
+-commutativeN/A
+-lowering-+.f64N/A
pow1/2N/A
+-commutativeN/A
metadata-evalN/A
associate-/r/N/A
un-div-invN/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in a around inf
Simplified99.5%
Final simplification99.5%
(FPCore (a rand) :precision binary64 (+ a (/ (sqrt a) (/ 3.0 rand))))
double code(double a, double rand) {
return a + (sqrt(a) / (3.0 / rand));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = a + (sqrt(a) / (3.0d0 / rand))
end function
public static double code(double a, double rand) {
return a + (Math.sqrt(a) / (3.0 / rand));
}
def code(a, rand): return a + (math.sqrt(a) / (3.0 / rand))
function code(a, rand) return Float64(a + Float64(sqrt(a) / Float64(3.0 / rand))) end
function tmp = code(a, rand) tmp = a + (sqrt(a) / (3.0 / rand)); end
code[a_, rand_] := N[(a + N[(N[Sqrt[a], $MachinePrecision] / N[(3.0 / rand), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \frac{\sqrt{a}}{\frac{3}{rand}}
\end{array}
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.0%
Simplified99.0%
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/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
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6499.1%
Applied egg-rr99.1%
+-lowering-+.f64N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6499.1%
Applied egg-rr99.1%
Final simplification99.1%
(FPCore (a rand) :precision binary64 (+ a (* rand (/ (sqrt a) 3.0))))
double code(double a, double rand) {
return a + (rand * (sqrt(a) / 3.0));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = a + (rand * (sqrt(a) / 3.0d0))
end function
public static double code(double a, double rand) {
return a + (rand * (Math.sqrt(a) / 3.0));
}
def code(a, rand): return a + (rand * (math.sqrt(a) / 3.0))
function code(a, rand) return Float64(a + Float64(rand * Float64(sqrt(a) / 3.0))) end
function tmp = code(a, rand) tmp = a + (rand * (sqrt(a) / 3.0)); end
code[a_, rand_] := N[(a + N[(rand * N[(N[Sqrt[a], $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + rand \cdot \frac{\sqrt{a}}{3}
\end{array}
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.0%
Simplified99.0%
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/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
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6499.1%
Applied egg-rr99.1%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6499.1%
Applied egg-rr99.1%
Final simplification99.1%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (/ 1.0 (- -0.3333333333333333 a)))
(t_1 (- 0.012345679012345678 (* (* a a) (* a a)))))
(if (<= rand -2.25e+126)
(*
(*
t_1
(+ 9.0 (* (* a a) (+ -81.0 (* (* a a) (+ 729.0 (* (* a a) -6561.0)))))))
t_0)
(if (<= rand 2e+154)
(+ -0.3333333333333333 a)
(* t_0 (* t_1 (+ 9.0 (* a (* a (+ -81.0 (* (* a a) 729.0)))))))))))
double code(double a, double rand) {
double t_0 = 1.0 / (-0.3333333333333333 - a);
double t_1 = 0.012345679012345678 - ((a * a) * (a * a));
double tmp;
if (rand <= -2.25e+126) {
tmp = (t_1 * (9.0 + ((a * a) * (-81.0 + ((a * a) * (729.0 + ((a * a) * -6561.0))))))) * t_0;
} else if (rand <= 2e+154) {
tmp = -0.3333333333333333 + a;
} else {
tmp = t_0 * (t_1 * (9.0 + (a * (a * (-81.0 + ((a * a) * 729.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.012345679012345678d0 - ((a * a) * (a * a))
if (rand <= (-2.25d+126)) then
tmp = (t_1 * (9.0d0 + ((a * a) * ((-81.0d0) + ((a * a) * (729.0d0 + ((a * a) * (-6561.0d0)))))))) * t_0
else if (rand <= 2d+154) then
tmp = (-0.3333333333333333d0) + a
else
tmp = t_0 * (t_1 * (9.0d0 + (a * (a * ((-81.0d0) + ((a * a) * 729.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.012345679012345678 - ((a * a) * (a * a));
double tmp;
if (rand <= -2.25e+126) {
tmp = (t_1 * (9.0 + ((a * a) * (-81.0 + ((a * a) * (729.0 + ((a * a) * -6561.0))))))) * t_0;
} else if (rand <= 2e+154) {
tmp = -0.3333333333333333 + a;
} else {
tmp = t_0 * (t_1 * (9.0 + (a * (a * (-81.0 + ((a * a) * 729.0))))));
}
return tmp;
}
def code(a, rand): t_0 = 1.0 / (-0.3333333333333333 - a) t_1 = 0.012345679012345678 - ((a * a) * (a * a)) tmp = 0 if rand <= -2.25e+126: tmp = (t_1 * (9.0 + ((a * a) * (-81.0 + ((a * a) * (729.0 + ((a * a) * -6561.0))))))) * t_0 elif rand <= 2e+154: tmp = -0.3333333333333333 + a else: tmp = t_0 * (t_1 * (9.0 + (a * (a * (-81.0 + ((a * a) * 729.0)))))) return tmp
function code(a, rand) t_0 = Float64(1.0 / Float64(-0.3333333333333333 - a)) t_1 = Float64(0.012345679012345678 - Float64(Float64(a * a) * Float64(a * a))) tmp = 0.0 if (rand <= -2.25e+126) tmp = Float64(Float64(t_1 * Float64(9.0 + Float64(Float64(a * a) * Float64(-81.0 + Float64(Float64(a * a) * Float64(729.0 + Float64(Float64(a * a) * -6561.0))))))) * t_0); elseif (rand <= 2e+154) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(t_0 * Float64(t_1 * Float64(9.0 + Float64(a * Float64(a * Float64(-81.0 + Float64(Float64(a * a) * 729.0))))))); end return tmp end
function tmp_2 = code(a, rand) t_0 = 1.0 / (-0.3333333333333333 - a); t_1 = 0.012345679012345678 - ((a * a) * (a * a)); tmp = 0.0; if (rand <= -2.25e+126) tmp = (t_1 * (9.0 + ((a * a) * (-81.0 + ((a * a) * (729.0 + ((a * a) * -6561.0))))))) * t_0; elseif (rand <= 2e+154) tmp = -0.3333333333333333 + a; else tmp = t_0 * (t_1 * (9.0 + (a * (a * (-81.0 + ((a * a) * 729.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.012345679012345678 - N[(N[(a * a), $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -2.25e+126], N[(N[(t$95$1 * N[(9.0 + N[(N[(a * a), $MachinePrecision] * N[(-81.0 + N[(N[(a * a), $MachinePrecision] * N[(729.0 + N[(N[(a * a), $MachinePrecision] * -6561.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[rand, 2e+154], N[(-0.3333333333333333 + a), $MachinePrecision], N[(t$95$0 * N[(t$95$1 * N[(9.0 + N[(a * N[(a * N[(-81.0 + N[(N[(a * a), $MachinePrecision] * 729.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{-0.3333333333333333 - a}\\
t_1 := 0.012345679012345678 - \left(a \cdot a\right) \cdot \left(a \cdot a\right)\\
\mathbf{if}\;rand \leq -2.25 \cdot 10^{+126}:\\
\;\;\;\;\left(t\_1 \cdot \left(9 + \left(a \cdot a\right) \cdot \left(-81 + \left(a \cdot a\right) \cdot \left(729 + \left(a \cdot a\right) \cdot -6561\right)\right)\right)\right) \cdot t\_0\\
\mathbf{elif}\;rand \leq 2 \cdot 10^{+154}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot \left(9 + a \cdot \left(a \cdot \left(-81 + \left(a \cdot a\right) \cdot 729\right)\right)\right)\right)\\
\end{array}
\end{array}
if rand < -2.24999999999999987e126Initial 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 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.3%
Simplified0.3%
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%
flip--N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f640.1%
Applied egg-rr0.1%
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
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.9%
Simplified49.9%
if -2.24999999999999987e126 < rand < 2.00000000000000007e154Initial 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-+.f6484.2%
Simplified84.2%
if 2.00000000000000007e154 < rand 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.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.9%
Simplified5.9%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6444.5%
Applied egg-rr44.5%
flip--N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6419.8%
Applied egg-rr19.8%
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
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.8%
Simplified62.8%
Final simplification76.8%
(FPCore (a rand)
:precision binary64
(if (<= rand -1.85e+126)
(*
(+ -0.037037037037037035 (* a (* a a)))
(+ 9.0 (* a (+ -27.0 (* (* a a) (+ 243.0 (* a -729.0)))))))
(if (<= rand 1.4e+154)
(+ -0.3333333333333333 a)
(*
(/ 1.0 (- -0.3333333333333333 a))
(*
(- 0.012345679012345678 (* (* a a) (* a a)))
(+ 9.0 (* a (* a (+ -81.0 (* (* a a) 729.0))))))))))
double code(double a, double rand) {
double tmp;
if (rand <= -1.85e+126) {
tmp = (-0.037037037037037035 + (a * (a * a))) * (9.0 + (a * (-27.0 + ((a * a) * (243.0 + (a * -729.0))))));
} else if (rand <= 1.4e+154) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (1.0 / (-0.3333333333333333 - a)) * ((0.012345679012345678 - ((a * a) * (a * a))) * (9.0 + (a * (a * (-81.0 + ((a * a) * 729.0))))));
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: tmp
if (rand <= (-1.85d+126)) then
tmp = ((-0.037037037037037035d0) + (a * (a * a))) * (9.0d0 + (a * ((-27.0d0) + ((a * a) * (243.0d0 + (a * (-729.0d0)))))))
else if (rand <= 1.4d+154) then
tmp = (-0.3333333333333333d0) + a
else
tmp = (1.0d0 / ((-0.3333333333333333d0) - a)) * ((0.012345679012345678d0 - ((a * a) * (a * a))) * (9.0d0 + (a * (a * ((-81.0d0) + ((a * a) * 729.0d0))))))
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= -1.85e+126) {
tmp = (-0.037037037037037035 + (a * (a * a))) * (9.0 + (a * (-27.0 + ((a * a) * (243.0 + (a * -729.0))))));
} else if (rand <= 1.4e+154) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (1.0 / (-0.3333333333333333 - a)) * ((0.012345679012345678 - ((a * a) * (a * a))) * (9.0 + (a * (a * (-81.0 + ((a * a) * 729.0))))));
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= -1.85e+126: tmp = (-0.037037037037037035 + (a * (a * a))) * (9.0 + (a * (-27.0 + ((a * a) * (243.0 + (a * -729.0)))))) elif rand <= 1.4e+154: tmp = -0.3333333333333333 + a else: tmp = (1.0 / (-0.3333333333333333 - a)) * ((0.012345679012345678 - ((a * a) * (a * a))) * (9.0 + (a * (a * (-81.0 + ((a * a) * 729.0)))))) return tmp
function code(a, rand) tmp = 0.0 if (rand <= -1.85e+126) tmp = Float64(Float64(-0.037037037037037035 + Float64(a * Float64(a * a))) * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(Float64(a * a) * Float64(243.0 + Float64(a * -729.0))))))); elseif (rand <= 1.4e+154) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(Float64(1.0 / Float64(-0.3333333333333333 - a)) * Float64(Float64(0.012345679012345678 - Float64(Float64(a * a) * Float64(a * a))) * Float64(9.0 + Float64(a * Float64(a * Float64(-81.0 + Float64(Float64(a * a) * 729.0))))))); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= -1.85e+126) tmp = (-0.037037037037037035 + (a * (a * a))) * (9.0 + (a * (-27.0 + ((a * a) * (243.0 + (a * -729.0)))))); elseif (rand <= 1.4e+154) tmp = -0.3333333333333333 + a; else tmp = (1.0 / (-0.3333333333333333 - a)) * ((0.012345679012345678 - ((a * a) * (a * a))) * (9.0 + (a * (a * (-81.0 + ((a * a) * 729.0)))))); end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, -1.85e+126], N[(N[(-0.037037037037037035 + N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(9.0 + N[(a * N[(-27.0 + N[(N[(a * a), $MachinePrecision] * N[(243.0 + N[(a * -729.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 1.4e+154], N[(-0.3333333333333333 + a), $MachinePrecision], N[(N[(1.0 / N[(-0.3333333333333333 - a), $MachinePrecision]), $MachinePrecision] * N[(N[(0.012345679012345678 - N[(N[(a * a), $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(9.0 + N[(a * N[(a * N[(-81.0 + N[(N[(a * a), $MachinePrecision] * 729.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq -1.85 \cdot 10^{+126}:\\
\;\;\;\;\left(-0.037037037037037035 + a \cdot \left(a \cdot a\right)\right) \cdot \left(9 + a \cdot \left(-27 + \left(a \cdot a\right) \cdot \left(243 + a \cdot -729\right)\right)\right)\\
\mathbf{elif}\;rand \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{-0.3333333333333333 - a} \cdot \left(\left(0.012345679012345678 - \left(a \cdot a\right) \cdot \left(a \cdot a\right)\right) \cdot \left(9 + a \cdot \left(a \cdot \left(-81 + \left(a \cdot a\right) \cdot 729\right)\right)\right)\right)\\
\end{array}
\end{array}
if rand < -1.8499999999999999e126Initial 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 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.3%
Simplified0.3%
flip3-+N/A
div-invN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/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-+.f640.2%
Applied egg-rr0.2%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6449.7%
Simplified49.7%
if -1.8499999999999999e126 < rand < 1.4e154Initial 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-+.f6484.2%
Simplified84.2%
if 1.4e154 < rand 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.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.9%
Simplified5.9%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6444.5%
Applied egg-rr44.5%
flip--N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6419.8%
Applied egg-rr19.8%
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
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.8%
Simplified62.8%
Final simplification76.8%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (+ -0.037037037037037035 (* a (* a a)))))
(if (<= rand -1.85e+126)
(* t_0 (+ 9.0 (* a (+ -27.0 (* (* a a) (+ 243.0 (* a -729.0)))))))
(if (<= rand 2.65e+154)
(+ -0.3333333333333333 a)
(* t_0 (+ 9.0 (* a (+ -27.0 (* a (* a 243.0))))))))))
double code(double a, double rand) {
double t_0 = -0.037037037037037035 + (a * (a * a));
double tmp;
if (rand <= -1.85e+126) {
tmp = t_0 * (9.0 + (a * (-27.0 + ((a * a) * (243.0 + (a * -729.0))))));
} else if (rand <= 2.65e+154) {
tmp = -0.3333333333333333 + a;
} else {
tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.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.037037037037037035d0) + (a * (a * a))
if (rand <= (-1.85d+126)) then
tmp = t_0 * (9.0d0 + (a * ((-27.0d0) + ((a * a) * (243.0d0 + (a * (-729.0d0)))))))
else if (rand <= 2.65d+154) then
tmp = (-0.3333333333333333d0) + a
else
tmp = t_0 * (9.0d0 + (a * ((-27.0d0) + (a * (a * 243.0d0)))))
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = -0.037037037037037035 + (a * (a * a));
double tmp;
if (rand <= -1.85e+126) {
tmp = t_0 * (9.0 + (a * (-27.0 + ((a * a) * (243.0 + (a * -729.0))))));
} else if (rand <= 2.65e+154) {
tmp = -0.3333333333333333 + a;
} else {
tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0)))));
}
return tmp;
}
def code(a, rand): t_0 = -0.037037037037037035 + (a * (a * a)) tmp = 0 if rand <= -1.85e+126: tmp = t_0 * (9.0 + (a * (-27.0 + ((a * a) * (243.0 + (a * -729.0)))))) elif rand <= 2.65e+154: tmp = -0.3333333333333333 + a else: tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0))))) return tmp
function code(a, rand) t_0 = Float64(-0.037037037037037035 + Float64(a * Float64(a * a))) tmp = 0.0 if (rand <= -1.85e+126) tmp = Float64(t_0 * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(Float64(a * a) * Float64(243.0 + Float64(a * -729.0))))))); elseif (rand <= 2.65e+154) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(t_0 * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(a * Float64(a * 243.0)))))); end return tmp end
function tmp_2 = code(a, rand) t_0 = -0.037037037037037035 + (a * (a * a)); tmp = 0.0; if (rand <= -1.85e+126) tmp = t_0 * (9.0 + (a * (-27.0 + ((a * a) * (243.0 + (a * -729.0)))))); elseif (rand <= 2.65e+154) tmp = -0.3333333333333333 + a; else tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0))))); end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(-0.037037037037037035 + N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -1.85e+126], N[(t$95$0 * N[(9.0 + N[(a * N[(-27.0 + N[(N[(a * a), $MachinePrecision] * N[(243.0 + N[(a * -729.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 2.65e+154], N[(-0.3333333333333333 + a), $MachinePrecision], N[(t$95$0 * N[(9.0 + N[(a * N[(-27.0 + N[(a * N[(a * 243.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.037037037037037035 + a \cdot \left(a \cdot a\right)\\
\mathbf{if}\;rand \leq -1.85 \cdot 10^{+126}:\\
\;\;\;\;t\_0 \cdot \left(9 + a \cdot \left(-27 + \left(a \cdot a\right) \cdot \left(243 + a \cdot -729\right)\right)\right)\\
\mathbf{elif}\;rand \leq 2.65 \cdot 10^{+154}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot 243\right)\right)\right)\\
\end{array}
\end{array}
if rand < -1.8499999999999999e126Initial 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 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.3%
Simplified0.3%
flip3-+N/A
div-invN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/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-+.f640.2%
Applied egg-rr0.2%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6449.7%
Simplified49.7%
if -1.8499999999999999e126 < rand < 2.65000000000000012e154Initial 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-+.f6484.2%
Simplified84.2%
if 2.65000000000000012e154 < rand 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.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.9%
Simplified5.9%
flip3-+N/A
div-invN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/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-+.f6411.9%
Applied egg-rr11.9%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.8%
Simplified62.8%
(FPCore (a rand)
:precision binary64
(if (<= rand -1.4e+126)
(*
(- 0.1111111111111111 (* a a))
(+ (* a (+ 9.0 (* a (+ -27.0 (* a 81.0))))) -3.0))
(if (<= rand 1.1e+154)
(+ -0.3333333333333333 a)
(*
(+ -0.037037037037037035 (* a (* a a)))
(+ 9.0 (* a (+ -27.0 (* a (* a 243.0)))))))))
double code(double a, double rand) {
double tmp;
if (rand <= -1.4e+126) {
tmp = (0.1111111111111111 - (a * a)) * ((a * (9.0 + (a * (-27.0 + (a * 81.0))))) + -3.0);
} else if (rand <= 1.1e+154) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (-0.037037037037037035 + (a * (a * a))) * (9.0 + (a * (-27.0 + (a * (a * 243.0)))));
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: tmp
if (rand <= (-1.4d+126)) then
tmp = (0.1111111111111111d0 - (a * a)) * ((a * (9.0d0 + (a * ((-27.0d0) + (a * 81.0d0))))) + (-3.0d0))
else if (rand <= 1.1d+154) then
tmp = (-0.3333333333333333d0) + a
else
tmp = ((-0.037037037037037035d0) + (a * (a * a))) * (9.0d0 + (a * ((-27.0d0) + (a * (a * 243.0d0)))))
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= -1.4e+126) {
tmp = (0.1111111111111111 - (a * a)) * ((a * (9.0 + (a * (-27.0 + (a * 81.0))))) + -3.0);
} else if (rand <= 1.1e+154) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (-0.037037037037037035 + (a * (a * a))) * (9.0 + (a * (-27.0 + (a * (a * 243.0)))));
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= -1.4e+126: tmp = (0.1111111111111111 - (a * a)) * ((a * (9.0 + (a * (-27.0 + (a * 81.0))))) + -3.0) elif rand <= 1.1e+154: tmp = -0.3333333333333333 + a else: tmp = (-0.037037037037037035 + (a * (a * a))) * (9.0 + (a * (-27.0 + (a * (a * 243.0))))) return tmp
function code(a, rand) tmp = 0.0 if (rand <= -1.4e+126) tmp = Float64(Float64(0.1111111111111111 - Float64(a * a)) * Float64(Float64(a * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(a * 81.0))))) + -3.0)); elseif (rand <= 1.1e+154) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(Float64(-0.037037037037037035 + Float64(a * Float64(a * a))) * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(a * Float64(a * 243.0)))))); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= -1.4e+126) tmp = (0.1111111111111111 - (a * a)) * ((a * (9.0 + (a * (-27.0 + (a * 81.0))))) + -3.0); elseif (rand <= 1.1e+154) tmp = -0.3333333333333333 + a; else tmp = (-0.037037037037037035 + (a * (a * a))) * (9.0 + (a * (-27.0 + (a * (a * 243.0))))); end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, -1.4e+126], N[(N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(N[(a * N[(9.0 + N[(a * N[(-27.0 + N[(a * 81.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 1.1e+154], N[(-0.3333333333333333 + a), $MachinePrecision], N[(N[(-0.037037037037037035 + N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(9.0 + N[(a * N[(-27.0 + N[(a * N[(a * 243.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq -1.4 \cdot 10^{+126}:\\
\;\;\;\;\left(0.1111111111111111 - a \cdot a\right) \cdot \left(a \cdot \left(9 + a \cdot \left(-27 + a \cdot 81\right)\right) + -3\right)\\
\mathbf{elif}\;rand \leq 1.1 \cdot 10^{+154}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;\left(-0.037037037037037035 + a \cdot \left(a \cdot a\right)\right) \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot 243\right)\right)\right)\\
\end{array}
\end{array}
if rand < -1.40000000000000005e126Initial 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 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.3%
Simplified0.3%
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
+-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-*.f64N/A
metadata-eval49.6%
Simplified49.6%
if -1.40000000000000005e126 < rand < 1.1000000000000001e154Initial 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-+.f6484.2%
Simplified84.2%
if 1.1000000000000001e154 < rand 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.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.9%
Simplified5.9%
flip3-+N/A
div-invN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/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-+.f6411.9%
Applied egg-rr11.9%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.8%
Simplified62.8%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (+ -0.037037037037037035 (* a (* a a)))))
(if (<= rand -2.05e+126)
(* t_0 (+ 9.0 (* a -27.0)))
(if (<= rand 3.2e+153)
(+ -0.3333333333333333 a)
(* t_0 (+ 9.0 (* a (+ -27.0 (* a (* a 243.0))))))))))
double code(double a, double rand) {
double t_0 = -0.037037037037037035 + (a * (a * a));
double tmp;
if (rand <= -2.05e+126) {
tmp = t_0 * (9.0 + (a * -27.0));
} else if (rand <= 3.2e+153) {
tmp = -0.3333333333333333 + a;
} else {
tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.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.037037037037037035d0) + (a * (a * a))
if (rand <= (-2.05d+126)) then
tmp = t_0 * (9.0d0 + (a * (-27.0d0)))
else if (rand <= 3.2d+153) then
tmp = (-0.3333333333333333d0) + a
else
tmp = t_0 * (9.0d0 + (a * ((-27.0d0) + (a * (a * 243.0d0)))))
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = -0.037037037037037035 + (a * (a * a));
double tmp;
if (rand <= -2.05e+126) {
tmp = t_0 * (9.0 + (a * -27.0));
} else if (rand <= 3.2e+153) {
tmp = -0.3333333333333333 + a;
} else {
tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0)))));
}
return tmp;
}
def code(a, rand): t_0 = -0.037037037037037035 + (a * (a * a)) tmp = 0 if rand <= -2.05e+126: tmp = t_0 * (9.0 + (a * -27.0)) elif rand <= 3.2e+153: tmp = -0.3333333333333333 + a else: tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0))))) return tmp
function code(a, rand) t_0 = Float64(-0.037037037037037035 + Float64(a * Float64(a * a))) tmp = 0.0 if (rand <= -2.05e+126) tmp = Float64(t_0 * Float64(9.0 + Float64(a * -27.0))); elseif (rand <= 3.2e+153) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(t_0 * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(a * Float64(a * 243.0)))))); end return tmp end
function tmp_2 = code(a, rand) t_0 = -0.037037037037037035 + (a * (a * a)); tmp = 0.0; if (rand <= -2.05e+126) tmp = t_0 * (9.0 + (a * -27.0)); elseif (rand <= 3.2e+153) tmp = -0.3333333333333333 + a; else tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0))))); end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(-0.037037037037037035 + N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -2.05e+126], N[(t$95$0 * N[(9.0 + N[(a * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 3.2e+153], N[(-0.3333333333333333 + a), $MachinePrecision], N[(t$95$0 * N[(9.0 + N[(a * N[(-27.0 + N[(a * N[(a * 243.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.037037037037037035 + a \cdot \left(a \cdot a\right)\\
\mathbf{if}\;rand \leq -2.05 \cdot 10^{+126}:\\
\;\;\;\;t\_0 \cdot \left(9 + a \cdot -27\right)\\
\mathbf{elif}\;rand \leq 3.2 \cdot 10^{+153}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot 243\right)\right)\right)\\
\end{array}
\end{array}
if rand < -2.05e126Initial 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 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.3%
Simplified0.3%
flip3-+N/A
div-invN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/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-+.f640.2%
Applied egg-rr0.2%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6446.6%
Simplified46.6%
if -2.05e126 < rand < 3.2000000000000001e153Initial 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-+.f6484.2%
Simplified84.2%
if 3.2000000000000001e153 < rand 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.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.9%
Simplified5.9%
flip3-+N/A
div-invN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/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-+.f6411.9%
Applied egg-rr11.9%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.8%
Simplified62.8%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (+ 9.0 (* a -27.0))))
(if (<= rand -2.25e+126)
(* (+ -0.037037037037037035 (* a (* a a))) t_0)
(if (<= rand 2.1e+153)
(+ -0.3333333333333333 a)
(* (- 0.1111111111111111 (* a a)) (+ -3.0 (* a t_0)))))))
double code(double a, double rand) {
double t_0 = 9.0 + (a * -27.0);
double tmp;
if (rand <= -2.25e+126) {
tmp = (-0.037037037037037035 + (a * (a * a))) * t_0;
} else if (rand <= 2.1e+153) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * 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 = 9.0d0 + (a * (-27.0d0))
if (rand <= (-2.25d+126)) then
tmp = ((-0.037037037037037035d0) + (a * (a * a))) * t_0
else if (rand <= 2.1d+153) then
tmp = (-0.3333333333333333d0) + a
else
tmp = (0.1111111111111111d0 - (a * a)) * ((-3.0d0) + (a * t_0))
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = 9.0 + (a * -27.0);
double tmp;
if (rand <= -2.25e+126) {
tmp = (-0.037037037037037035 + (a * (a * a))) * t_0;
} else if (rand <= 2.1e+153) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * t_0));
}
return tmp;
}
def code(a, rand): t_0 = 9.0 + (a * -27.0) tmp = 0 if rand <= -2.25e+126: tmp = (-0.037037037037037035 + (a * (a * a))) * t_0 elif rand <= 2.1e+153: tmp = -0.3333333333333333 + a else: tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * t_0)) return tmp
function code(a, rand) t_0 = Float64(9.0 + Float64(a * -27.0)) tmp = 0.0 if (rand <= -2.25e+126) tmp = Float64(Float64(-0.037037037037037035 + Float64(a * Float64(a * a))) * t_0); elseif (rand <= 2.1e+153) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(Float64(0.1111111111111111 - Float64(a * a)) * Float64(-3.0 + Float64(a * t_0))); end return tmp end
function tmp_2 = code(a, rand) t_0 = 9.0 + (a * -27.0); tmp = 0.0; if (rand <= -2.25e+126) tmp = (-0.037037037037037035 + (a * (a * a))) * t_0; elseif (rand <= 2.1e+153) tmp = -0.3333333333333333 + a; else tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * t_0)); end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(9.0 + N[(a * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -2.25e+126], N[(N[(-0.037037037037037035 + N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[rand, 2.1e+153], N[(-0.3333333333333333 + a), $MachinePrecision], N[(N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(-3.0 + N[(a * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 9 + a \cdot -27\\
\mathbf{if}\;rand \leq -2.25 \cdot 10^{+126}:\\
\;\;\;\;\left(-0.037037037037037035 + a \cdot \left(a \cdot a\right)\right) \cdot t\_0\\
\mathbf{elif}\;rand \leq 2.1 \cdot 10^{+153}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;\left(0.1111111111111111 - a \cdot a\right) \cdot \left(-3 + a \cdot t\_0\right)\\
\end{array}
\end{array}
if rand < -2.24999999999999987e126Initial 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 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.3%
Simplified0.3%
flip3-+N/A
div-invN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/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-+.f640.2%
Applied egg-rr0.2%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6446.6%
Simplified46.6%
if -2.24999999999999987e126 < rand < 2.10000000000000017e153Initial 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-+.f6484.2%
Simplified84.2%
if 2.10000000000000017e153 < rand 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.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.9%
Simplified5.9%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6444.5%
Applied egg-rr44.5%
Taylor expanded in a around 0
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval62.7%
Simplified62.7%
Final simplification76.4%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (+ -0.037037037037037035 (* a (* a a)))))
(if (<= rand -2.25e+126)
(* t_0 (+ 9.0 (* a -27.0)))
(if (<= rand 1.7e+153) (+ -0.3333333333333333 a) (* 9.0 t_0)))))
double code(double a, double rand) {
double t_0 = -0.037037037037037035 + (a * (a * a));
double tmp;
if (rand <= -2.25e+126) {
tmp = t_0 * (9.0 + (a * -27.0));
} else if (rand <= 1.7e+153) {
tmp = -0.3333333333333333 + a;
} else {
tmp = 9.0 * 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.037037037037037035d0) + (a * (a * a))
if (rand <= (-2.25d+126)) then
tmp = t_0 * (9.0d0 + (a * (-27.0d0)))
else if (rand <= 1.7d+153) then
tmp = (-0.3333333333333333d0) + a
else
tmp = 9.0d0 * t_0
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = -0.037037037037037035 + (a * (a * a));
double tmp;
if (rand <= -2.25e+126) {
tmp = t_0 * (9.0 + (a * -27.0));
} else if (rand <= 1.7e+153) {
tmp = -0.3333333333333333 + a;
} else {
tmp = 9.0 * t_0;
}
return tmp;
}
def code(a, rand): t_0 = -0.037037037037037035 + (a * (a * a)) tmp = 0 if rand <= -2.25e+126: tmp = t_0 * (9.0 + (a * -27.0)) elif rand <= 1.7e+153: tmp = -0.3333333333333333 + a else: tmp = 9.0 * t_0 return tmp
function code(a, rand) t_0 = Float64(-0.037037037037037035 + Float64(a * Float64(a * a))) tmp = 0.0 if (rand <= -2.25e+126) tmp = Float64(t_0 * Float64(9.0 + Float64(a * -27.0))); elseif (rand <= 1.7e+153) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(9.0 * t_0); end return tmp end
function tmp_2 = code(a, rand) t_0 = -0.037037037037037035 + (a * (a * a)); tmp = 0.0; if (rand <= -2.25e+126) tmp = t_0 * (9.0 + (a * -27.0)); elseif (rand <= 1.7e+153) tmp = -0.3333333333333333 + a; else tmp = 9.0 * t_0; end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(-0.037037037037037035 + N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -2.25e+126], N[(t$95$0 * N[(9.0 + N[(a * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 1.7e+153], N[(-0.3333333333333333 + a), $MachinePrecision], N[(9.0 * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.037037037037037035 + a \cdot \left(a \cdot a\right)\\
\mathbf{if}\;rand \leq -2.25 \cdot 10^{+126}:\\
\;\;\;\;t\_0 \cdot \left(9 + a \cdot -27\right)\\
\mathbf{elif}\;rand \leq 1.7 \cdot 10^{+153}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;9 \cdot t\_0\\
\end{array}
\end{array}
if rand < -2.24999999999999987e126Initial 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 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.3%
Simplified0.3%
flip3-+N/A
div-invN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/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-+.f640.2%
Applied egg-rr0.2%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6446.6%
Simplified46.6%
if -2.24999999999999987e126 < rand < 1.6999999999999999e153Initial 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-+.f6484.2%
Simplified84.2%
if 1.6999999999999999e153 < rand 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.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.9%
Simplified5.9%
flip3-+N/A
div-invN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/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-+.f6411.9%
Applied egg-rr11.9%
Taylor expanded in a around 0
Simplified55.4%
Final simplification75.3%
(FPCore (a rand)
:precision binary64
(if (<= rand -2.25e+126)
(* (- 0.1111111111111111 (* a a)) (+ -3.0 (* a 9.0)))
(if (<= rand 2.5e+153)
(+ -0.3333333333333333 a)
(* 9.0 (+ -0.037037037037037035 (* a (* a a)))))))
double code(double a, double rand) {
double tmp;
if (rand <= -2.25e+126) {
tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * 9.0));
} else if (rand <= 2.5e+153) {
tmp = -0.3333333333333333 + a;
} else {
tmp = 9.0 * (-0.037037037037037035 + (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.25d+126)) then
tmp = (0.1111111111111111d0 - (a * a)) * ((-3.0d0) + (a * 9.0d0))
else if (rand <= 2.5d+153) then
tmp = (-0.3333333333333333d0) + a
else
tmp = 9.0d0 * ((-0.037037037037037035d0) + (a * (a * a)))
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= -2.25e+126) {
tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * 9.0));
} else if (rand <= 2.5e+153) {
tmp = -0.3333333333333333 + a;
} else {
tmp = 9.0 * (-0.037037037037037035 + (a * (a * a)));
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= -2.25e+126: tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * 9.0)) elif rand <= 2.5e+153: tmp = -0.3333333333333333 + a else: tmp = 9.0 * (-0.037037037037037035 + (a * (a * a))) return tmp
function code(a, rand) tmp = 0.0 if (rand <= -2.25e+126) tmp = Float64(Float64(0.1111111111111111 - Float64(a * a)) * Float64(-3.0 + Float64(a * 9.0))); elseif (rand <= 2.5e+153) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(9.0 * Float64(-0.037037037037037035 + Float64(a * Float64(a * a)))); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= -2.25e+126) tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * 9.0)); elseif (rand <= 2.5e+153) tmp = -0.3333333333333333 + a; else tmp = 9.0 * (-0.037037037037037035 + (a * (a * a))); end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, -2.25e+126], N[(N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(-3.0 + N[(a * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 2.5e+153], N[(-0.3333333333333333 + a), $MachinePrecision], N[(9.0 * N[(-0.037037037037037035 + N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq -2.25 \cdot 10^{+126}:\\
\;\;\;\;\left(0.1111111111111111 - a \cdot a\right) \cdot \left(-3 + a \cdot 9\right)\\
\mathbf{elif}\;rand \leq 2.5 \cdot 10^{+153}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(-0.037037037037037035 + a \cdot \left(a \cdot a\right)\right)\\
\end{array}
\end{array}
if rand < -2.24999999999999987e126Initial 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 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.3%
Simplified0.3%
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
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval40.6%
Simplified40.6%
if -2.24999999999999987e126 < rand < 2.50000000000000009e153Initial 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-+.f6484.2%
Simplified84.2%
if 2.50000000000000009e153 < rand 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.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.9%
Simplified5.9%
flip3-+N/A
div-invN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/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-+.f6411.9%
Applied egg-rr11.9%
Taylor expanded in a around 0
Simplified55.4%
Final simplification74.5%
(FPCore (a rand) :precision binary64 (if (<= rand 1.85e+153) (+ -0.3333333333333333 a) (* 9.0 (+ -0.037037037037037035 (* a (* a a))))))
double code(double a, double rand) {
double tmp;
if (rand <= 1.85e+153) {
tmp = -0.3333333333333333 + a;
} else {
tmp = 9.0 * (-0.037037037037037035 + (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 <= 1.85d+153) then
tmp = (-0.3333333333333333d0) + a
else
tmp = 9.0d0 * ((-0.037037037037037035d0) + (a * (a * a)))
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= 1.85e+153) {
tmp = -0.3333333333333333 + a;
} else {
tmp = 9.0 * (-0.037037037037037035 + (a * (a * a)));
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= 1.85e+153: tmp = -0.3333333333333333 + a else: tmp = 9.0 * (-0.037037037037037035 + (a * (a * a))) return tmp
function code(a, rand) tmp = 0.0 if (rand <= 1.85e+153) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(9.0 * Float64(-0.037037037037037035 + Float64(a * Float64(a * a)))); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= 1.85e+153) tmp = -0.3333333333333333 + a; else tmp = 9.0 * (-0.037037037037037035 + (a * (a * a))); end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, 1.85e+153], N[(-0.3333333333333333 + a), $MachinePrecision], N[(9.0 * N[(-0.037037037037037035 + N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq 1.85 \cdot 10^{+153}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(-0.037037037037037035 + a \cdot \left(a \cdot a\right)\right)\\
\end{array}
\end{array}
if rand < 1.8500000000000001e153Initial 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.2%
Simplified72.2%
if 1.8500000000000001e153 < rand 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.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.9%
Simplified5.9%
flip3-+N/A
div-invN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/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-+.f6411.9%
Applied egg-rr11.9%
Taylor expanded in a around 0
Simplified55.4%
Final simplification69.7%
(FPCore (a rand) :precision binary64 (if (<= rand 2.9e+148) (+ -0.3333333333333333 a) (* (- 0.1111111111111111 (* a a)) -3.0)))
double code(double a, double rand) {
double tmp;
if (rand <= 2.9e+148) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (0.1111111111111111 - (a * a)) * -3.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.9d+148) then
tmp = (-0.3333333333333333d0) + a
else
tmp = (0.1111111111111111d0 - (a * a)) * (-3.0d0)
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= 2.9e+148) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (0.1111111111111111 - (a * a)) * -3.0;
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= 2.9e+148: tmp = -0.3333333333333333 + a else: tmp = (0.1111111111111111 - (a * a)) * -3.0 return tmp
function code(a, rand) tmp = 0.0 if (rand <= 2.9e+148) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(Float64(0.1111111111111111 - Float64(a * a)) * -3.0); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= 2.9e+148) tmp = -0.3333333333333333 + a; else tmp = (0.1111111111111111 - (a * a)) * -3.0; end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, 2.9e+148], N[(-0.3333333333333333 + a), $MachinePrecision], N[(N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision] * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq 2.9 \cdot 10^{+148}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;\left(0.1111111111111111 - a \cdot a\right) \cdot -3\\
\end{array}
\end{array}
if rand < 2.9e148Initial 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.5%
Simplified72.5%
if 2.9e148 < rand 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.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f645.9%
Simplified5.9%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6443.5%
Applied egg-rr43.5%
Taylor expanded in a around 0
Simplified44.8%
(FPCore (a rand) :precision binary64 (+ -0.3333333333333333 a))
double code(double a, double rand) {
return -0.3333333333333333 + a;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = (-0.3333333333333333d0) + a
end function
public static double code(double a, double rand) {
return -0.3333333333333333 + a;
}
def code(a, rand): return -0.3333333333333333 + a
function code(a, rand) return Float64(-0.3333333333333333 + a) end
function tmp = code(a, rand) tmp = -0.3333333333333333 + a; end
code[a_, rand_] := N[(-0.3333333333333333 + a), $MachinePrecision]
\begin{array}{l}
\\
-0.3333333333333333 + a
\end{array}
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 rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6462.1%
Simplified62.1%
(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.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-+.f6462.1%
Simplified62.1%
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.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-+.f6462.1%
Simplified62.1%
Taylor expanded in a around 0
Simplified1.4%
herbie shell --seed 2024141
(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))))