
(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 18 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) rand) 3.0)))
double code(double a, double rand) {
return (-0.3333333333333333 + a) + ((pow((-0.3333333333333333 + a), 0.5) * rand) / 3.0);
}
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) * rand) / 3.0d0)
end function
public static double code(double a, double rand) {
return (-0.3333333333333333 + a) + ((Math.pow((-0.3333333333333333 + a), 0.5) * rand) / 3.0);
}
def code(a, rand): return (-0.3333333333333333 + a) + ((math.pow((-0.3333333333333333 + a), 0.5) * rand) / 3.0)
function code(a, rand) return Float64(Float64(-0.3333333333333333 + a) + Float64(Float64((Float64(-0.3333333333333333 + a) ^ 0.5) * rand) / 3.0)) end
function tmp = code(a, rand) tmp = (-0.3333333333333333 + a) + ((((-0.3333333333333333 + a) ^ 0.5) * rand) / 3.0); end
code[a_, rand_] := N[(N[(-0.3333333333333333 + a), $MachinePrecision] + N[(N[(N[Power[N[(-0.3333333333333333 + a), $MachinePrecision], 0.5], $MachinePrecision] * rand), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-0.3333333333333333 + a\right) + \frac{{\left(-0.3333333333333333 + a\right)}^{0.5} \cdot rand}{3}
\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.8%
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
+-commutativeN/A
pow-lowering-pow.f64N/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 -6.3e+69)
t_0
(if (<= rand 2.7e+63) (+ -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 <= -6.3e+69) {
tmp = t_0;
} else if (rand <= 2.7e+63) {
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 <= (-6.3d+69)) then
tmp = t_0
else if (rand <= 2.7d+63) 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 <= -6.3e+69) {
tmp = t_0;
} else if (rand <= 2.7e+63) {
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 <= -6.3e+69: tmp = t_0 elif rand <= 2.7e+63: 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 <= -6.3e+69) tmp = t_0; elseif (rand <= 2.7e+63) 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 <= -6.3e+69) tmp = t_0; elseif (rand <= 2.7e+63) 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, -6.3e+69], t$95$0, If[LessEqual[rand, 2.7e+63], 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 -6.3 \cdot 10^{+69}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;rand \leq 2.7 \cdot 10^{+63}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if rand < -6.30000000000000007e69 or 2.70000000000000017e63 < 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-*.f6487.3%
Simplified87.3%
if -6.30000000000000007e69 < rand < 2.70000000000000017e63Initial 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-+.f6495.7%
Simplified95.7%
Final simplification92.7%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (* 0.3333333333333333 (* rand (sqrt a)))))
(if (<= rand -7e+71)
t_0
(if (<= rand 2.9e+63) (+ -0.3333333333333333 a) t_0))))
double code(double a, double rand) {
double t_0 = 0.3333333333333333 * (rand * sqrt(a));
double tmp;
if (rand <= -7e+71) {
tmp = t_0;
} else if (rand <= 2.9e+63) {
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 <= (-7d+71)) then
tmp = t_0
else if (rand <= 2.9d+63) 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 <= -7e+71) {
tmp = t_0;
} else if (rand <= 2.9e+63) {
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 <= -7e+71: tmp = t_0 elif rand <= 2.9e+63: 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 <= -7e+71) tmp = t_0; elseif (rand <= 2.9e+63) 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 <= -7e+71) tmp = t_0; elseif (rand <= 2.9e+63) 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, -7e+71], t$95$0, If[LessEqual[rand, 2.9e+63], 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 -7 \cdot 10^{+71}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;rand \leq 2.9 \cdot 10^{+63}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if rand < -6.9999999999999998e71 or 2.8999999999999999e63 < 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.0%
Simplified97.0%
Taylor expanded in a around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6484.9%
Simplified84.9%
if -6.9999999999999998e71 < rand < 2.8999999999999999e63Initial 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-+.f6495.7%
Simplified95.7%
(FPCore (a rand) :precision binary64 (+ (+ -0.3333333333333333 a) (* rand (/ (pow (+ -0.3333333333333333 a) 0.5) 3.0))))
double code(double a, double rand) {
return (-0.3333333333333333 + a) + (rand * (pow((-0.3333333333333333 + a), 0.5) / 3.0));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = ((-0.3333333333333333d0) + a) + (rand * ((((-0.3333333333333333d0) + a) ** 0.5d0) / 3.0d0))
end function
public static double code(double a, double rand) {
return (-0.3333333333333333 + a) + (rand * (Math.pow((-0.3333333333333333 + a), 0.5) / 3.0));
}
def code(a, rand): return (-0.3333333333333333 + a) + (rand * (math.pow((-0.3333333333333333 + a), 0.5) / 3.0))
function code(a, rand) return Float64(Float64(-0.3333333333333333 + a) + Float64(rand * Float64((Float64(-0.3333333333333333 + a) ^ 0.5) / 3.0))) end
function tmp = code(a, rand) tmp = (-0.3333333333333333 + a) + (rand * (((-0.3333333333333333 + a) ^ 0.5) / 3.0)); end
code[a_, rand_] := N[(N[(-0.3333333333333333 + a), $MachinePrecision] + N[(rand * N[(N[Power[N[(-0.3333333333333333 + a), $MachinePrecision], 0.5], $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-0.3333333333333333 + a\right) + rand \cdot \frac{{\left(-0.3333333333333333 + a\right)}^{0.5}}{3}
\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.8%
+-commutativeN/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
+-commutativeN/A
pow-lowering-pow.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/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.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.8%
Final simplification99.8%
(FPCore (a rand)
:precision binary64
(if (<= rand -1.42e+148)
(* (pow a 7.0) -729.0)
(if (<= rand 5.5e+147)
(+ -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.42e+148) {
tmp = pow(a, 7.0) * -729.0;
} else if (rand <= 5.5e+147) {
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.42d+148)) then
tmp = (a ** 7.0d0) * (-729.0d0)
else if (rand <= 5.5d+147) 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.42e+148) {
tmp = Math.pow(a, 7.0) * -729.0;
} else if (rand <= 5.5e+147) {
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.42e+148: tmp = math.pow(a, 7.0) * -729.0 elif rand <= 5.5e+147: 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.42e+148) tmp = Float64((a ^ 7.0) * -729.0); elseif (rand <= 5.5e+147) 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.42e+148) tmp = (a ^ 7.0) * -729.0; elseif (rand <= 5.5e+147) 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.42e+148], N[(N[Power[a, 7.0], $MachinePrecision] * -729.0), $MachinePrecision], If[LessEqual[rand, 5.5e+147], 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.42 \cdot 10^{+148}:\\
\;\;\;\;{a}^{7} \cdot -729\\
\mathbf{elif}\;rand \leq 5.5 \cdot 10^{+147}:\\
\;\;\;\;-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.42e148Initial 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.5%
Simplified0.5%
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.4%
Applied egg-rr0.4%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6448.9%
Simplified48.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
pow-lowering-pow.f6448.9%
Simplified48.9%
if -1.42e148 < rand < 5.4999999999999997e147Initial 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-+.f6486.9%
Simplified86.9%
if 5.4999999999999997e147 < rand Initial 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-+.f645.7%
Simplified5.7%
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-+.f644.7%
Applied egg-rr4.7%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f640.1%
Simplified0.1%
Taylor expanded in a around 0
*-commutativeN/A
*-lowering-*.f6448.4%
Simplified48.4%
(FPCore (a rand) :precision binary64 (+ a (* (sqrt (+ -0.3333333333333333 a)) (* rand 0.3333333333333333))))
double code(double a, double rand) {
return 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 = a + (sqrt(((-0.3333333333333333d0) + a)) * (rand * 0.3333333333333333d0))
end function
public static double code(double a, double rand) {
return a + (Math.sqrt((-0.3333333333333333 + a)) * (rand * 0.3333333333333333));
}
def code(a, rand): return a + (math.sqrt((-0.3333333333333333 + a)) * (rand * 0.3333333333333333))
function code(a, rand) return Float64(a + Float64(sqrt(Float64(-0.3333333333333333 + a)) * Float64(rand * 0.3333333333333333))) end
function tmp = code(a, rand) tmp = a + (sqrt((-0.3333333333333333 + a)) * (rand * 0.3333333333333333)); end
code[a_, rand_] := N[(a + N[(N[Sqrt[N[(-0.3333333333333333 + a), $MachinePrecision]], $MachinePrecision] * N[(rand * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \sqrt{-0.3333333333333333 + a} \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.8%
Taylor expanded in a around inf
Simplified99.3%
Final simplification99.3%
(FPCore (a rand) :precision binary64 (+ a (* 0.3333333333333333 (* rand (sqrt a)))))
double code(double a, double rand) {
return a + (0.3333333333333333 * (rand * sqrt(a)));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = a + (0.3333333333333333d0 * (rand * sqrt(a)))
end function
public static double code(double a, double rand) {
return a + (0.3333333333333333 * (rand * Math.sqrt(a)));
}
def code(a, rand): return a + (0.3333333333333333 * (rand * math.sqrt(a)))
function code(a, rand) return Float64(a + Float64(0.3333333333333333 * Float64(rand * sqrt(a)))) end
function tmp = code(a, rand) tmp = a + (0.3333333333333333 * (rand * sqrt(a))); end
code[a_, rand_] := N[(a + N[(0.3333333333333333 * N[(rand * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + 0.3333333333333333 \cdot \left(rand \cdot \sqrt{a}\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
*-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-*.f6498.0%
Simplified98.0%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6498.1%
Simplified98.1%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (+ -0.037037037037037035 (* a (* a a)))))
(if (<= rand -1.42e+148)
(* t_0 (+ 9.0 (* a (+ -27.0 (* a (* -729.0 (* a a)))))))
(if (<= rand 1.35e+147)
(+ -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.42e+148) {
tmp = t_0 * (9.0 + (a * (-27.0 + (a * (-729.0 * (a * a))))));
} else if (rand <= 1.35e+147) {
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.42d+148)) then
tmp = t_0 * (9.0d0 + (a * ((-27.0d0) + (a * ((-729.0d0) * (a * a))))))
else if (rand <= 1.35d+147) 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.42e+148) {
tmp = t_0 * (9.0 + (a * (-27.0 + (a * (-729.0 * (a * a))))));
} else if (rand <= 1.35e+147) {
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.42e+148: tmp = t_0 * (9.0 + (a * (-27.0 + (a * (-729.0 * (a * a)))))) elif rand <= 1.35e+147: 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.42e+148) tmp = Float64(t_0 * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(a * Float64(-729.0 * Float64(a * a))))))); elseif (rand <= 1.35e+147) 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.42e+148) tmp = t_0 * (9.0 + (a * (-27.0 + (a * (-729.0 * (a * a)))))); elseif (rand <= 1.35e+147) 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.42e+148], N[(t$95$0 * N[(9.0 + N[(a * N[(-27.0 + N[(a * N[(-729.0 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 1.35e+147], 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.42 \cdot 10^{+148}:\\
\;\;\;\;t\_0 \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(-729 \cdot \left(a \cdot a\right)\right)\right)\right)\\
\mathbf{elif}\;rand \leq 1.35 \cdot 10^{+147}:\\
\;\;\;\;-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.42e148Initial 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.5%
Simplified0.5%
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.4%
Applied egg-rr0.4%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6448.9%
Simplified48.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.9%
Simplified48.9%
if -1.42e148 < rand < 1.34999999999999999e147Initial 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-+.f6486.9%
Simplified86.9%
if 1.34999999999999999e147 < rand Initial 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-+.f645.7%
Simplified5.7%
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-+.f644.7%
Applied egg-rr4.7%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f640.1%
Simplified0.1%
Taylor expanded in a around 0
*-commutativeN/A
*-lowering-*.f6448.4%
Simplified48.4%
Final simplification77.5%
(FPCore (a rand)
:precision binary64
(if (<= rand -7e+147)
(*
(- 0.1111111111111111 (* a a))
(+ (* a (+ 9.0 (* a (+ -27.0 (* a 81.0))))) -3.0))
(if (<= rand 5.5e+147)
(+ -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 <= -7e+147) {
tmp = (0.1111111111111111 - (a * a)) * ((a * (9.0 + (a * (-27.0 + (a * 81.0))))) + -3.0);
} else if (rand <= 5.5e+147) {
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 <= (-7d+147)) then
tmp = (0.1111111111111111d0 - (a * a)) * ((a * (9.0d0 + (a * ((-27.0d0) + (a * 81.0d0))))) + (-3.0d0))
else if (rand <= 5.5d+147) 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 <= -7e+147) {
tmp = (0.1111111111111111 - (a * a)) * ((a * (9.0 + (a * (-27.0 + (a * 81.0))))) + -3.0);
} else if (rand <= 5.5e+147) {
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 <= -7e+147: tmp = (0.1111111111111111 - (a * a)) * ((a * (9.0 + (a * (-27.0 + (a * 81.0))))) + -3.0) elif rand <= 5.5e+147: 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 <= -7e+147) 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 <= 5.5e+147) 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 <= -7e+147) tmp = (0.1111111111111111 - (a * a)) * ((a * (9.0 + (a * (-27.0 + (a * 81.0))))) + -3.0); elseif (rand <= 5.5e+147) 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, -7e+147], 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, 5.5e+147], 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 -7 \cdot 10^{+147}:\\
\;\;\;\;\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 5.5 \cdot 10^{+147}:\\
\;\;\;\;-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 < -6.99999999999999949e147Initial 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.5%
Simplified0.5%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f640.4%
Applied egg-rr0.4%
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-eval42.9%
Simplified42.9%
if -6.99999999999999949e147 < rand < 5.4999999999999997e147Initial 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-+.f6486.9%
Simplified86.9%
if 5.4999999999999997e147 < rand Initial 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-+.f645.7%
Simplified5.7%
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-+.f644.7%
Applied egg-rr4.7%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f640.1%
Simplified0.1%
Taylor expanded in a around 0
*-commutativeN/A
*-lowering-*.f6448.4%
Simplified48.4%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (+ -0.037037037037037035 (* a (* a a)))))
(if (<= rand -1.15e+149)
(* t_0 (* a -27.0))
(if (<= rand 5.5e+147)
(+ -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.15e+149) {
tmp = t_0 * (a * -27.0);
} else if (rand <= 5.5e+147) {
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.15d+149)) then
tmp = t_0 * (a * (-27.0d0))
else if (rand <= 5.5d+147) 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.15e+149) {
tmp = t_0 * (a * -27.0);
} else if (rand <= 5.5e+147) {
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.15e+149: tmp = t_0 * (a * -27.0) elif rand <= 5.5e+147: 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.15e+149) tmp = Float64(t_0 * Float64(a * -27.0)); elseif (rand <= 5.5e+147) 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.15e+149) tmp = t_0 * (a * -27.0); elseif (rand <= 5.5e+147) 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.15e+149], N[(t$95$0 * N[(a * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 5.5e+147], 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.15 \cdot 10^{+149}:\\
\;\;\;\;t\_0 \cdot \left(a \cdot -27\right)\\
\mathbf{elif}\;rand \leq 5.5 \cdot 10^{+147}:\\
\;\;\;\;-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.1499999999999999e149Initial 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.5%
Simplified0.5%
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.4%
Applied egg-rr0.4%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6442.6%
Simplified42.6%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6442.6%
Simplified42.6%
if -1.1499999999999999e149 < rand < 5.4999999999999997e147Initial 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-+.f6486.9%
Simplified86.9%
if 5.4999999999999997e147 < rand Initial 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-+.f645.7%
Simplified5.7%
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-+.f644.7%
Applied egg-rr4.7%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f640.1%
Simplified0.1%
Taylor expanded in a around 0
*-commutativeN/A
*-lowering-*.f6448.4%
Simplified48.4%
(FPCore (a rand)
:precision binary64
(if (<= rand -7e+147)
(* (+ -0.037037037037037035 (* a (* a a))) (* a -27.0))
(if (<= rand 1.62e+146)
(+ -0.3333333333333333 a)
(* (- 0.1111111111111111 (* a a)) (+ -3.0 (* a (+ 9.0 (* a -27.0))))))))
double code(double a, double rand) {
double tmp;
if (rand <= -7e+147) {
tmp = (-0.037037037037037035 + (a * (a * a))) * (a * -27.0);
} else if (rand <= 1.62e+146) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (0.1111111111111111 - (a * a)) * (-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) :: tmp
if (rand <= (-7d+147)) then
tmp = ((-0.037037037037037035d0) + (a * (a * a))) * (a * (-27.0d0))
else if (rand <= 1.62d+146) then
tmp = (-0.3333333333333333d0) + a
else
tmp = (0.1111111111111111d0 - (a * a)) * ((-3.0d0) + (a * (9.0d0 + (a * (-27.0d0)))))
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= -7e+147) {
tmp = (-0.037037037037037035 + (a * (a * a))) * (a * -27.0);
} else if (rand <= 1.62e+146) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * (9.0 + (a * -27.0))));
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= -7e+147: tmp = (-0.037037037037037035 + (a * (a * a))) * (a * -27.0) elif rand <= 1.62e+146: tmp = -0.3333333333333333 + a else: tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * (9.0 + (a * -27.0)))) return tmp
function code(a, rand) tmp = 0.0 if (rand <= -7e+147) tmp = Float64(Float64(-0.037037037037037035 + Float64(a * Float64(a * a))) * Float64(a * -27.0)); elseif (rand <= 1.62e+146) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(Float64(0.1111111111111111 - Float64(a * a)) * Float64(-3.0 + Float64(a * Float64(9.0 + Float64(a * -27.0))))); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= -7e+147) tmp = (-0.037037037037037035 + (a * (a * a))) * (a * -27.0); elseif (rand <= 1.62e+146) tmp = -0.3333333333333333 + a; else tmp = (0.1111111111111111 - (a * a)) * (-3.0 + (a * (9.0 + (a * -27.0)))); end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, -7e+147], N[(N[(-0.037037037037037035 + N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 1.62e+146], N[(-0.3333333333333333 + a), $MachinePrecision], N[(N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(-3.0 + N[(a * N[(9.0 + N[(a * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq -7 \cdot 10^{+147}:\\
\;\;\;\;\left(-0.037037037037037035 + a \cdot \left(a \cdot a\right)\right) \cdot \left(a \cdot -27\right)\\
\mathbf{elif}\;rand \leq 1.62 \cdot 10^{+146}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;\left(0.1111111111111111 - a \cdot a\right) \cdot \left(-3 + a \cdot \left(9 + a \cdot -27\right)\right)\\
\end{array}
\end{array}
if rand < -6.99999999999999949e147Initial 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.5%
Simplified0.5%
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.4%
Applied egg-rr0.4%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6442.6%
Simplified42.6%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6442.6%
Simplified42.6%
if -6.99999999999999949e147 < rand < 1.62e146Initial 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-+.f6486.9%
Simplified86.9%
if 1.62e146 < rand Initial 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-+.f645.7%
Simplified5.7%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6438.4%
Applied egg-rr38.4%
Taylor expanded in a around 0
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval42.2%
Simplified42.2%
Final simplification76.0%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (+ -0.037037037037037035 (* a (* a a)))))
(if (<= rand -7e+147)
(* t_0 (* a -27.0))
(if (<= rand 1.7e+142) (+ -0.3333333333333333 a) (* t_0 9.0)))))
double code(double a, double rand) {
double t_0 = -0.037037037037037035 + (a * (a * a));
double tmp;
if (rand <= -7e+147) {
tmp = t_0 * (a * -27.0);
} else if (rand <= 1.7e+142) {
tmp = -0.3333333333333333 + a;
} else {
tmp = t_0 * 9.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 <= (-7d+147)) then
tmp = t_0 * (a * (-27.0d0))
else if (rand <= 1.7d+142) then
tmp = (-0.3333333333333333d0) + a
else
tmp = t_0 * 9.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 <= -7e+147) {
tmp = t_0 * (a * -27.0);
} else if (rand <= 1.7e+142) {
tmp = -0.3333333333333333 + a;
} else {
tmp = t_0 * 9.0;
}
return tmp;
}
def code(a, rand): t_0 = -0.037037037037037035 + (a * (a * a)) tmp = 0 if rand <= -7e+147: tmp = t_0 * (a * -27.0) elif rand <= 1.7e+142: tmp = -0.3333333333333333 + a else: tmp = t_0 * 9.0 return tmp
function code(a, rand) t_0 = Float64(-0.037037037037037035 + Float64(a * Float64(a * a))) tmp = 0.0 if (rand <= -7e+147) tmp = Float64(t_0 * Float64(a * -27.0)); elseif (rand <= 1.7e+142) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(t_0 * 9.0); end return tmp end
function tmp_2 = code(a, rand) t_0 = -0.037037037037037035 + (a * (a * a)); tmp = 0.0; if (rand <= -7e+147) tmp = t_0 * (a * -27.0); elseif (rand <= 1.7e+142) tmp = -0.3333333333333333 + a; else tmp = t_0 * 9.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, -7e+147], N[(t$95$0 * N[(a * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 1.7e+142], N[(-0.3333333333333333 + a), $MachinePrecision], N[(t$95$0 * 9.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.037037037037037035 + a \cdot \left(a \cdot a\right)\\
\mathbf{if}\;rand \leq -7 \cdot 10^{+147}:\\
\;\;\;\;t\_0 \cdot \left(a \cdot -27\right)\\
\mathbf{elif}\;rand \leq 1.7 \cdot 10^{+142}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot 9\\
\end{array}
\end{array}
if rand < -6.99999999999999949e147Initial 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.5%
Simplified0.5%
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.4%
Applied egg-rr0.4%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6442.6%
Simplified42.6%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6442.6%
Simplified42.6%
if -6.99999999999999949e147 < rand < 1.6999999999999999e142Initial 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-+.f6486.9%
Simplified86.9%
if 1.6999999999999999e142 < rand Initial 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-+.f645.7%
Simplified5.7%
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-+.f644.7%
Applied egg-rr4.7%
Taylor expanded in a around 0
Simplified42.1%
(FPCore (a rand) :precision binary64 (if (<= rand 1.7e+142) (+ -0.3333333333333333 a) (* (+ -0.037037037037037035 (* a (* a a))) 9.0)))
double code(double a, double rand) {
double tmp;
if (rand <= 1.7e+142) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (-0.037037037037037035 + (a * (a * a))) * 9.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.7d+142) then
tmp = (-0.3333333333333333d0) + a
else
tmp = ((-0.037037037037037035d0) + (a * (a * a))) * 9.0d0
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= 1.7e+142) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (-0.037037037037037035 + (a * (a * a))) * 9.0;
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= 1.7e+142: tmp = -0.3333333333333333 + a else: tmp = (-0.037037037037037035 + (a * (a * a))) * 9.0 return tmp
function code(a, rand) tmp = 0.0 if (rand <= 1.7e+142) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(Float64(-0.037037037037037035 + Float64(a * Float64(a * a))) * 9.0); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= 1.7e+142) tmp = -0.3333333333333333 + a; else tmp = (-0.037037037037037035 + (a * (a * a))) * 9.0; end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, 1.7e+142], N[(-0.3333333333333333 + a), $MachinePrecision], N[(N[(-0.037037037037037035 + N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq 1.7 \cdot 10^{+142}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;\left(-0.037037037037037035 + a \cdot \left(a \cdot a\right)\right) \cdot 9\\
\end{array}
\end{array}
if rand < 1.6999999999999999e142Initial 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-+.f6475.0%
Simplified75.0%
if 1.6999999999999999e142 < rand Initial 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-+.f645.7%
Simplified5.7%
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-+.f644.7%
Applied egg-rr4.7%
Taylor expanded in a around 0
Simplified42.1%
(FPCore (a rand) :precision binary64 (if (<= rand 3e+147) (+ -0.3333333333333333 a) (* (- 0.1111111111111111 (* a a)) -3.0)))
double code(double a, double rand) {
double tmp;
if (rand <= 3e+147) {
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 <= 3d+147) 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 <= 3e+147) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (0.1111111111111111 - (a * a)) * -3.0;
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= 3e+147: tmp = -0.3333333333333333 + a else: tmp = (0.1111111111111111 - (a * a)) * -3.0 return tmp
function code(a, rand) tmp = 0.0 if (rand <= 3e+147) 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 <= 3e+147) tmp = -0.3333333333333333 + a; else tmp = (0.1111111111111111 - (a * a)) * -3.0; end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, 3e+147], 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 3 \cdot 10^{+147}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;\left(0.1111111111111111 - a \cdot a\right) \cdot -3\\
\end{array}
\end{array}
if rand < 2.99999999999999993e147Initial 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-+.f6475.0%
Simplified75.0%
if 2.99999999999999993e147 < rand Initial 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-+.f645.7%
Simplified5.7%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6438.4%
Applied egg-rr38.4%
Taylor expanded in a around 0
Simplified38.9%
(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.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-+.f6466.3%
Simplified66.3%
(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-+.f6466.3%
Simplified66.3%
Taylor expanded in a around inf
Simplified65.8%
(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-+.f6466.3%
Simplified66.3%
Taylor expanded in a around 0
Simplified1.5%
herbie shell --seed 2024161
(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))))