
(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) (/ (* (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(Float64(sqrt(Float64(-0.3333333333333333 + a)) * 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[(N[Sqrt[N[(-0.3333333333333333 + a), $MachinePrecision]], $MachinePrecision] * rand), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-0.3333333333333333 + a\right) + \frac{\sqrt{-0.3333333333333333 + a} \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.8%
Simplified99.8%
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
metadata-evalN/A
div-invN/A
/-lowering-/.f6499.8%
Applied egg-rr99.8%
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f6499.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (* (sqrt (+ -0.3333333333333333 a)) (/ rand 3.0))))
(if (<= rand -1.4e+42)
t_0
(if (<= rand 8.5e+56) (+ -0.3333333333333333 a) t_0))))
double code(double a, double rand) {
double t_0 = sqrt((-0.3333333333333333 + a)) * (rand / 3.0);
double tmp;
if (rand <= -1.4e+42) {
tmp = t_0;
} else if (rand <= 8.5e+56) {
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 / 3.0d0)
if (rand <= (-1.4d+42)) then
tmp = t_0
else if (rand <= 8.5d+56) 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 / 3.0);
double tmp;
if (rand <= -1.4e+42) {
tmp = t_0;
} else if (rand <= 8.5e+56) {
tmp = -0.3333333333333333 + a;
} else {
tmp = t_0;
}
return tmp;
}
def code(a, rand): t_0 = math.sqrt((-0.3333333333333333 + a)) * (rand / 3.0) tmp = 0 if rand <= -1.4e+42: tmp = t_0 elif rand <= 8.5e+56: tmp = -0.3333333333333333 + a else: tmp = t_0 return tmp
function code(a, rand) t_0 = Float64(sqrt(Float64(-0.3333333333333333 + a)) * Float64(rand / 3.0)) tmp = 0.0 if (rand <= -1.4e+42) tmp = t_0; elseif (rand <= 8.5e+56) 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 / 3.0); tmp = 0.0; if (rand <= -1.4e+42) tmp = t_0; elseif (rand <= 8.5e+56) 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 / 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -1.4e+42], t$95$0, If[LessEqual[rand, 8.5e+56], N[(-0.3333333333333333 + a), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{-0.3333333333333333 + a} \cdot \frac{rand}{3}\\
\mathbf{if}\;rand \leq -1.4 \cdot 10^{+42}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;rand \leq 8.5 \cdot 10^{+56}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if rand < -1.4e42 or 8.4999999999999998e56 < rand Initial program 99.5%
*-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.5%
Simplified99.5%
div-invN/A
metadata-evalN/A
metadata-evalN/A
sub-negN/A
*-commutativeN/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr99.5%
Taylor expanded in rand around inf
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f6491.1%
Simplified91.1%
*-commutativeN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f6491.2%
Applied egg-rr91.2%
if -1.4e42 < rand < 8.4999999999999998e56Initial 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-+.f6498.1%
Simplified98.1%
Final simplification95.2%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (* (sqrt (+ -0.3333333333333333 a)) (* rand 0.3333333333333333))))
(if (<= rand -1.4e+42)
t_0
(if (<= rand 8.5e+56) (+ -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 <= -1.4e+42) {
tmp = t_0;
} else if (rand <= 8.5e+56) {
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 <= (-1.4d+42)) then
tmp = t_0
else if (rand <= 8.5d+56) 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 <= -1.4e+42) {
tmp = t_0;
} else if (rand <= 8.5e+56) {
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 <= -1.4e+42: tmp = t_0 elif rand <= 8.5e+56: 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 <= -1.4e+42) tmp = t_0; elseif (rand <= 8.5e+56) 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 <= -1.4e+42) tmp = t_0; elseif (rand <= 8.5e+56) 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, -1.4e+42], t$95$0, If[LessEqual[rand, 8.5e+56], 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 -1.4 \cdot 10^{+42}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;rand \leq 8.5 \cdot 10^{+56}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if rand < -1.4e42 or 8.4999999999999998e56 < rand Initial program 99.5%
*-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.5%
Simplified99.5%
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-*.f6491.1%
Simplified91.1%
if -1.4e42 < rand < 8.4999999999999998e56Initial 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-+.f6498.1%
Simplified98.1%
Final simplification95.2%
(FPCore (a rand)
:precision binary64
(if (<= rand -1.4e+42)
(* rand (* 0.3333333333333333 (sqrt a)))
(if (<= rand 8.5e+56)
(+ -0.3333333333333333 a)
(* (* rand 0.3333333333333333) (sqrt a)))))
double code(double a, double rand) {
double tmp;
if (rand <= -1.4e+42) {
tmp = rand * (0.3333333333333333 * sqrt(a));
} else if (rand <= 8.5e+56) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (rand * 0.3333333333333333) * 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 <= (-1.4d+42)) then
tmp = rand * (0.3333333333333333d0 * sqrt(a))
else if (rand <= 8.5d+56) then
tmp = (-0.3333333333333333d0) + a
else
tmp = (rand * 0.3333333333333333d0) * sqrt(a)
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= -1.4e+42) {
tmp = rand * (0.3333333333333333 * Math.sqrt(a));
} else if (rand <= 8.5e+56) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (rand * 0.3333333333333333) * Math.sqrt(a);
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= -1.4e+42: tmp = rand * (0.3333333333333333 * math.sqrt(a)) elif rand <= 8.5e+56: tmp = -0.3333333333333333 + a else: tmp = (rand * 0.3333333333333333) * math.sqrt(a) return tmp
function code(a, rand) tmp = 0.0 if (rand <= -1.4e+42) tmp = Float64(rand * Float64(0.3333333333333333 * sqrt(a))); elseif (rand <= 8.5e+56) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(Float64(rand * 0.3333333333333333) * sqrt(a)); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= -1.4e+42) tmp = rand * (0.3333333333333333 * sqrt(a)); elseif (rand <= 8.5e+56) tmp = -0.3333333333333333 + a; else tmp = (rand * 0.3333333333333333) * sqrt(a); end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, -1.4e+42], N[(rand * N[(0.3333333333333333 * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 8.5e+56], N[(-0.3333333333333333 + a), $MachinePrecision], N[(N[(rand * 0.3333333333333333), $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq -1.4 \cdot 10^{+42}:\\
\;\;\;\;rand \cdot \left(0.3333333333333333 \cdot \sqrt{a}\right)\\
\mathbf{elif}\;rand \leq 8.5 \cdot 10^{+56}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;\left(rand \cdot 0.3333333333333333\right) \cdot \sqrt{a}\\
\end{array}
\end{array}
if rand < -1.4e42Initial program 99.5%
*-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.5%
Simplified99.5%
div-invN/A
metadata-evalN/A
metadata-evalN/A
sub-negN/A
*-commutativeN/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr99.6%
Taylor expanded in rand around inf
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f6494.0%
Simplified94.0%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6492.5%
Simplified92.5%
if -1.4e42 < rand < 8.4999999999999998e56Initial 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-+.f6498.1%
Simplified98.1%
if 8.4999999999999998e56 < 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%
div-invN/A
metadata-evalN/A
metadata-evalN/A
sub-negN/A
*-commutativeN/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr99.5%
Taylor expanded in rand around inf
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f6488.1%
Simplified88.1%
Taylor expanded in a around inf
sqrt-lowering-sqrt.f6486.2%
Simplified86.2%
Final simplification94.5%
(FPCore (a rand)
:precision binary64
(if (<= rand -1.4e+42)
(* rand (* 0.3333333333333333 (sqrt a)))
(if (<= rand 8.5e+56)
(+ -0.3333333333333333 a)
(* 0.3333333333333333 (* rand (sqrt a))))))
double code(double a, double rand) {
double tmp;
if (rand <= -1.4e+42) {
tmp = rand * (0.3333333333333333 * sqrt(a));
} else if (rand <= 8.5e+56) {
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 <= (-1.4d+42)) then
tmp = rand * (0.3333333333333333d0 * sqrt(a))
else if (rand <= 8.5d+56) 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 <= -1.4e+42) {
tmp = rand * (0.3333333333333333 * Math.sqrt(a));
} else if (rand <= 8.5e+56) {
tmp = -0.3333333333333333 + a;
} else {
tmp = 0.3333333333333333 * (rand * Math.sqrt(a));
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= -1.4e+42: tmp = rand * (0.3333333333333333 * math.sqrt(a)) elif rand <= 8.5e+56: tmp = -0.3333333333333333 + a else: tmp = 0.3333333333333333 * (rand * math.sqrt(a)) return tmp
function code(a, rand) tmp = 0.0 if (rand <= -1.4e+42) tmp = Float64(rand * Float64(0.3333333333333333 * sqrt(a))); elseif (rand <= 8.5e+56) 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 <= -1.4e+42) tmp = rand * (0.3333333333333333 * sqrt(a)); elseif (rand <= 8.5e+56) tmp = -0.3333333333333333 + a; else tmp = 0.3333333333333333 * (rand * sqrt(a)); end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, -1.4e+42], N[(rand * N[(0.3333333333333333 * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 8.5e+56], 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 -1.4 \cdot 10^{+42}:\\
\;\;\;\;rand \cdot \left(0.3333333333333333 \cdot \sqrt{a}\right)\\
\mathbf{elif}\;rand \leq 8.5 \cdot 10^{+56}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(rand \cdot \sqrt{a}\right)\\
\end{array}
\end{array}
if rand < -1.4e42Initial program 99.5%
*-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.5%
Simplified99.5%
div-invN/A
metadata-evalN/A
metadata-evalN/A
sub-negN/A
*-commutativeN/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr99.6%
Taylor expanded in rand around inf
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f6494.0%
Simplified94.0%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6492.5%
Simplified92.5%
if -1.4e42 < rand < 8.4999999999999998e56Initial 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-+.f6498.1%
Simplified98.1%
if 8.4999999999999998e56 < 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 a around inf
Simplified97.6%
Taylor expanded in a around inf
Simplified97.6%
Taylor expanded in a around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6486.2%
Simplified86.2%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (* 0.3333333333333333 (* rand (sqrt a)))))
(if (<= rand -1.4e+42)
t_0
(if (<= rand 8.5e+56) (+ -0.3333333333333333 a) t_0))))
double code(double a, double rand) {
double t_0 = 0.3333333333333333 * (rand * sqrt(a));
double tmp;
if (rand <= -1.4e+42) {
tmp = t_0;
} else if (rand <= 8.5e+56) {
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.4d+42)) then
tmp = t_0
else if (rand <= 8.5d+56) 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.4e+42) {
tmp = t_0;
} else if (rand <= 8.5e+56) {
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.4e+42: tmp = t_0 elif rand <= 8.5e+56: 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.4e+42) tmp = t_0; elseif (rand <= 8.5e+56) 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.4e+42) tmp = t_0; elseif (rand <= 8.5e+56) 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.4e+42], t$95$0, If[LessEqual[rand, 8.5e+56], 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.4 \cdot 10^{+42}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;rand \leq 8.5 \cdot 10^{+56}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if rand < -1.4e42 or 8.4999999999999998e56 < rand Initial program 99.5%
*-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.5%
Simplified99.5%
Taylor expanded in a around inf
Simplified97.7%
Taylor expanded in a around inf
Simplified97.7%
Taylor expanded in a around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6489.2%
Simplified89.2%
if -1.4e42 < rand < 8.4999999999999998e56Initial 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-+.f6498.1%
Simplified98.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.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.8%
Simplified99.8%
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
metadata-evalN/A
div-invN/A
/-lowering-/.f6499.8%
Applied egg-rr99.8%
Final simplification99.8%
(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.8%
Simplified99.8%
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 (* (+ -0.3333333333333333 a) (+ 1.0 (/ (/ rand (sqrt a)) 3.0))))
double code(double a, double rand) {
return (-0.3333333333333333 + a) * (1.0 + ((rand / sqrt(a)) / 3.0));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = ((-0.3333333333333333d0) + a) * (1.0d0 + ((rand / sqrt(a)) / 3.0d0))
end function
public static double code(double a, double rand) {
return (-0.3333333333333333 + a) * (1.0 + ((rand / Math.sqrt(a)) / 3.0));
}
def code(a, rand): return (-0.3333333333333333 + a) * (1.0 + ((rand / math.sqrt(a)) / 3.0))
function code(a, rand) return Float64(Float64(-0.3333333333333333 + a) * Float64(1.0 + Float64(Float64(rand / sqrt(a)) / 3.0))) end
function tmp = code(a, rand) tmp = (-0.3333333333333333 + a) * (1.0 + ((rand / sqrt(a)) / 3.0)); end
code[a_, rand_] := N[(N[(-0.3333333333333333 + a), $MachinePrecision] * N[(1.0 + N[(N[(rand / N[Sqrt[a], $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-0.3333333333333333 + a\right) \cdot \left(1 + \frac{\frac{rand}{\sqrt{a}}}{3}\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.8%
Simplified99.8%
Taylor expanded in a around inf
Simplified99.0%
sqrt-prodN/A
pow1/2N/A
metadata-evalN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6499.0%
Applied egg-rr99.0%
Final simplification99.0%
(FPCore (a rand) :precision binary64 (* (+ -0.3333333333333333 a) (+ 1.0 (/ rand (sqrt (* a 9.0))))))
double code(double a, double rand) {
return (-0.3333333333333333 + a) * (1.0 + (rand / sqrt((a * 9.0))));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = ((-0.3333333333333333d0) + a) * (1.0d0 + (rand / sqrt((a * 9.0d0))))
end function
public static double code(double a, double rand) {
return (-0.3333333333333333 + a) * (1.0 + (rand / Math.sqrt((a * 9.0))));
}
def code(a, rand): return (-0.3333333333333333 + a) * (1.0 + (rand / math.sqrt((a * 9.0))))
function code(a, rand) return Float64(Float64(-0.3333333333333333 + a) * Float64(1.0 + Float64(rand / sqrt(Float64(a * 9.0))))) end
function tmp = code(a, rand) tmp = (-0.3333333333333333 + a) * (1.0 + (rand / sqrt((a * 9.0)))); end
code[a_, rand_] := N[(N[(-0.3333333333333333 + a), $MachinePrecision] * N[(1.0 + N[(rand / N[Sqrt[N[(a * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-0.3333333333333333 + a\right) \cdot \left(1 + \frac{rand}{\sqrt{a \cdot 9}}\right)
\end{array}
Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf
Simplified99.0%
Final simplification99.0%
(FPCore (a rand) :precision binary64 (- (+ a (* rand (* 0.3333333333333333 (sqrt a)))) 0.3333333333333333))
double code(double a, double rand) {
return (a + (rand * (0.3333333333333333 * sqrt(a)))) - 0.3333333333333333;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = (a + (rand * (0.3333333333333333d0 * sqrt(a)))) - 0.3333333333333333d0
end function
public static double code(double a, double rand) {
return (a + (rand * (0.3333333333333333 * Math.sqrt(a)))) - 0.3333333333333333;
}
def code(a, rand): return (a + (rand * (0.3333333333333333 * math.sqrt(a)))) - 0.3333333333333333
function code(a, rand) return Float64(Float64(a + Float64(rand * Float64(0.3333333333333333 * sqrt(a)))) - 0.3333333333333333) end
function tmp = code(a, rand) tmp = (a + (rand * (0.3333333333333333 * sqrt(a)))) - 0.3333333333333333; end
code[a_, rand_] := N[(N[(a + N[(rand * N[(0.3333333333333333 * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.3333333333333333), $MachinePrecision]
\begin{array}{l}
\\
\left(a + rand \cdot \left(0.3333333333333333 \cdot \sqrt{a}\right)\right) - 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.8%
Simplified99.8%
metadata-evalN/A
metadata-evalN/A
sub-negN/A
*-commutativeN/A
+-commutativeN/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
sub-negN/A
*-commutativeN/A
*-commutativeN/A
distribute-lft1-inN/A
associate-+r-N/A
--lowering--.f64N/A
Applied egg-rr99.8%
Taylor expanded in a around inf
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6499.0%
Simplified99.0%
Final simplification99.0%
(FPCore (a rand) :precision binary64 (+ (+ -0.3333333333333333 a) (* (* rand 0.3333333333333333) (sqrt a))))
double code(double a, double rand) {
return (-0.3333333333333333 + a) + ((rand * 0.3333333333333333) * sqrt(a));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = ((-0.3333333333333333d0) + a) + ((rand * 0.3333333333333333d0) * sqrt(a))
end function
public static double code(double a, double rand) {
return (-0.3333333333333333 + a) + ((rand * 0.3333333333333333) * Math.sqrt(a));
}
def code(a, rand): return (-0.3333333333333333 + a) + ((rand * 0.3333333333333333) * math.sqrt(a))
function code(a, rand) return Float64(Float64(-0.3333333333333333 + a) + Float64(Float64(rand * 0.3333333333333333) * sqrt(a))) end
function tmp = code(a, rand) tmp = (-0.3333333333333333 + a) + ((rand * 0.3333333333333333) * sqrt(a)); end
code[a_, rand_] := N[(N[(-0.3333333333333333 + a), $MachinePrecision] + N[(N[(rand * 0.3333333333333333), $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-0.3333333333333333 + a\right) + \left(rand \cdot 0.3333333333333333\right) \cdot \sqrt{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.8%
Simplified99.8%
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
Simplified98.9%
Final simplification98.9%
(FPCore (a rand) :precision binary64 (* a (+ 1.0 (/ rand (sqrt (* a 9.0))))))
double code(double a, double rand) {
return a * (1.0 + (rand / sqrt((a * 9.0))));
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = a * (1.0d0 + (rand / sqrt((a * 9.0d0))))
end function
public static double code(double a, double rand) {
return a * (1.0 + (rand / Math.sqrt((a * 9.0))));
}
def code(a, rand): return a * (1.0 + (rand / math.sqrt((a * 9.0))))
function code(a, rand) return Float64(a * Float64(1.0 + Float64(rand / sqrt(Float64(a * 9.0))))) end
function tmp = code(a, rand) tmp = a * (1.0 + (rand / sqrt((a * 9.0)))); end
code[a_, rand_] := N[(a * N[(1.0 + N[(rand / N[Sqrt[N[(a * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot \left(1 + \frac{rand}{\sqrt{a \cdot 9}}\right)
\end{array}
Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf
Simplified99.0%
Taylor expanded in a around inf
Simplified98.1%
(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.8%
Simplified99.8%
Taylor expanded in a around inf
Simplified99.0%
Taylor expanded in a around inf
Simplified98.1%
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 (/ 1.0 (- 0.1111111111111111 (* a a)))))
(if (<= rand -8.5e+76)
(/ (+ (* a (+ 9.0 (* a (+ -27.0 (* a 81.0))))) -3.0) t_0)
(if (<= rand 1.85e+123)
(+ -0.3333333333333333 a)
(/ (+ -3.0 (* a (+ 9.0 (* a -27.0)))) t_0)))))
double code(double a, double rand) {
double t_0 = 1.0 / (0.1111111111111111 - (a * a));
double tmp;
if (rand <= -8.5e+76) {
tmp = ((a * (9.0 + (a * (-27.0 + (a * 81.0))))) + -3.0) / t_0;
} else if (rand <= 1.85e+123) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (-3.0 + (a * (9.0 + (a * -27.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 = 1.0d0 / (0.1111111111111111d0 - (a * a))
if (rand <= (-8.5d+76)) then
tmp = ((a * (9.0d0 + (a * ((-27.0d0) + (a * 81.0d0))))) + (-3.0d0)) / t_0
else if (rand <= 1.85d+123) then
tmp = (-0.3333333333333333d0) + a
else
tmp = ((-3.0d0) + (a * (9.0d0 + (a * (-27.0d0))))) / t_0
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = 1.0 / (0.1111111111111111 - (a * a));
double tmp;
if (rand <= -8.5e+76) {
tmp = ((a * (9.0 + (a * (-27.0 + (a * 81.0))))) + -3.0) / t_0;
} else if (rand <= 1.85e+123) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (-3.0 + (a * (9.0 + (a * -27.0)))) / t_0;
}
return tmp;
}
def code(a, rand): t_0 = 1.0 / (0.1111111111111111 - (a * a)) tmp = 0 if rand <= -8.5e+76: tmp = ((a * (9.0 + (a * (-27.0 + (a * 81.0))))) + -3.0) / t_0 elif rand <= 1.85e+123: tmp = -0.3333333333333333 + a else: tmp = (-3.0 + (a * (9.0 + (a * -27.0)))) / t_0 return tmp
function code(a, rand) t_0 = Float64(1.0 / Float64(0.1111111111111111 - Float64(a * a))) tmp = 0.0 if (rand <= -8.5e+76) tmp = Float64(Float64(Float64(a * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(a * 81.0))))) + -3.0) / t_0); elseif (rand <= 1.85e+123) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(Float64(-3.0 + Float64(a * Float64(9.0 + Float64(a * -27.0)))) / t_0); end return tmp end
function tmp_2 = code(a, rand) t_0 = 1.0 / (0.1111111111111111 - (a * a)); tmp = 0.0; if (rand <= -8.5e+76) tmp = ((a * (9.0 + (a * (-27.0 + (a * 81.0))))) + -3.0) / t_0; elseif (rand <= 1.85e+123) tmp = -0.3333333333333333 + a; else tmp = (-3.0 + (a * (9.0 + (a * -27.0)))) / t_0; end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(1.0 / N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -8.5e+76], N[(N[(N[(a * N[(9.0 + N[(a * N[(-27.0 + N[(a * 81.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -3.0), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[rand, 1.85e+123], N[(-0.3333333333333333 + a), $MachinePrecision], N[(N[(-3.0 + N[(a * N[(9.0 + N[(a * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{0.1111111111111111 - a \cdot a}\\
\mathbf{if}\;rand \leq -8.5 \cdot 10^{+76}:\\
\;\;\;\;\frac{a \cdot \left(9 + a \cdot \left(-27 + a \cdot 81\right)\right) + -3}{t\_0}\\
\mathbf{elif}\;rand \leq 1.85 \cdot 10^{+123}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;\frac{-3 + a \cdot \left(9 + a \cdot -27\right)}{t\_0}\\
\end{array}
\end{array}
if rand < -8.49999999999999992e76Initial program 99.5%
*-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.5%
Simplified99.5%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.6%
Simplified0.6%
flip-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f640.5%
Applied egg-rr0.5%
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f640.5%
Applied egg-rr0.5%
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-eval27.5%
Simplified27.5%
if -8.49999999999999992e76 < rand < 1.84999999999999998e123Initial 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-+.f6491.4%
Simplified91.4%
if 1.84999999999999998e123 < rand Initial program 99.5%
*-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.5%
Simplified99.5%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f646.4%
Simplified6.4%
flip-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f6429.7%
Applied egg-rr29.7%
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f6429.7%
Applied egg-rr29.7%
Taylor expanded in a around 0
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval33.6%
Simplified33.6%
Final simplification70.1%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (/ 1.0 (- 0.1111111111111111 (* a a)))))
(if (<= rand -8.5e+76)
(/ (+ (* a 9.0) -3.0) t_0)
(if (<= rand 1.85e+123)
(+ -0.3333333333333333 a)
(/ (+ -3.0 (* a (+ 9.0 (* a -27.0)))) t_0)))))
double code(double a, double rand) {
double t_0 = 1.0 / (0.1111111111111111 - (a * a));
double tmp;
if (rand <= -8.5e+76) {
tmp = ((a * 9.0) + -3.0) / t_0;
} else if (rand <= 1.85e+123) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (-3.0 + (a * (9.0 + (a * -27.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 = 1.0d0 / (0.1111111111111111d0 - (a * a))
if (rand <= (-8.5d+76)) then
tmp = ((a * 9.0d0) + (-3.0d0)) / t_0
else if (rand <= 1.85d+123) then
tmp = (-0.3333333333333333d0) + a
else
tmp = ((-3.0d0) + (a * (9.0d0 + (a * (-27.0d0))))) / t_0
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = 1.0 / (0.1111111111111111 - (a * a));
double tmp;
if (rand <= -8.5e+76) {
tmp = ((a * 9.0) + -3.0) / t_0;
} else if (rand <= 1.85e+123) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (-3.0 + (a * (9.0 + (a * -27.0)))) / t_0;
}
return tmp;
}
def code(a, rand): t_0 = 1.0 / (0.1111111111111111 - (a * a)) tmp = 0 if rand <= -8.5e+76: tmp = ((a * 9.0) + -3.0) / t_0 elif rand <= 1.85e+123: tmp = -0.3333333333333333 + a else: tmp = (-3.0 + (a * (9.0 + (a * -27.0)))) / t_0 return tmp
function code(a, rand) t_0 = Float64(1.0 / Float64(0.1111111111111111 - Float64(a * a))) tmp = 0.0 if (rand <= -8.5e+76) tmp = Float64(Float64(Float64(a * 9.0) + -3.0) / t_0); elseif (rand <= 1.85e+123) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(Float64(-3.0 + Float64(a * Float64(9.0 + Float64(a * -27.0)))) / t_0); end return tmp end
function tmp_2 = code(a, rand) t_0 = 1.0 / (0.1111111111111111 - (a * a)); tmp = 0.0; if (rand <= -8.5e+76) tmp = ((a * 9.0) + -3.0) / t_0; elseif (rand <= 1.85e+123) tmp = -0.3333333333333333 + a; else tmp = (-3.0 + (a * (9.0 + (a * -27.0)))) / t_0; end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(1.0 / N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -8.5e+76], N[(N[(N[(a * 9.0), $MachinePrecision] + -3.0), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[rand, 1.85e+123], N[(-0.3333333333333333 + a), $MachinePrecision], N[(N[(-3.0 + N[(a * N[(9.0 + N[(a * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{0.1111111111111111 - a \cdot a}\\
\mathbf{if}\;rand \leq -8.5 \cdot 10^{+76}:\\
\;\;\;\;\frac{a \cdot 9 + -3}{t\_0}\\
\mathbf{elif}\;rand \leq 1.85 \cdot 10^{+123}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;\frac{-3 + a \cdot \left(9 + a \cdot -27\right)}{t\_0}\\
\end{array}
\end{array}
if rand < -8.49999999999999992e76Initial program 99.5%
*-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.5%
Simplified99.5%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.6%
Simplified0.6%
flip-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f640.5%
Applied egg-rr0.5%
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f640.5%
Applied egg-rr0.5%
Taylor expanded in a around 0
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval27.4%
Simplified27.4%
if -8.49999999999999992e76 < rand < 1.84999999999999998e123Initial 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-+.f6491.4%
Simplified91.4%
if 1.84999999999999998e123 < rand Initial program 99.5%
*-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.5%
Simplified99.5%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f646.4%
Simplified6.4%
flip-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f6429.7%
Applied egg-rr29.7%
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f6429.7%
Applied egg-rr29.7%
Taylor expanded in a around 0
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval33.6%
Simplified33.6%
Final simplification70.1%
(FPCore (a rand)
:precision binary64
(if (<= rand -8.5e+76)
(/ (+ (* a 9.0) -3.0) (/ 1.0 (- 0.1111111111111111 (* a a))))
(if (<= rand 2.3e+154)
(+ -0.3333333333333333 a)
(/
(- 0.0013717421124828531 (* (* a a) (* a (* a (* a a)))))
-0.00411522633744856))))
double code(double a, double rand) {
double tmp;
if (rand <= -8.5e+76) {
tmp = ((a * 9.0) + -3.0) / (1.0 / (0.1111111111111111 - (a * a)));
} else if (rand <= 2.3e+154) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (0.0013717421124828531 - ((a * a) * (a * (a * (a * a))))) / -0.00411522633744856;
}
return tmp;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: tmp
if (rand <= (-8.5d+76)) then
tmp = ((a * 9.0d0) + (-3.0d0)) / (1.0d0 / (0.1111111111111111d0 - (a * a)))
else if (rand <= 2.3d+154) then
tmp = (-0.3333333333333333d0) + a
else
tmp = (0.0013717421124828531d0 - ((a * a) * (a * (a * (a * a))))) / (-0.00411522633744856d0)
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= -8.5e+76) {
tmp = ((a * 9.0) + -3.0) / (1.0 / (0.1111111111111111 - (a * a)));
} else if (rand <= 2.3e+154) {
tmp = -0.3333333333333333 + a;
} else {
tmp = (0.0013717421124828531 - ((a * a) * (a * (a * (a * a))))) / -0.00411522633744856;
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= -8.5e+76: tmp = ((a * 9.0) + -3.0) / (1.0 / (0.1111111111111111 - (a * a))) elif rand <= 2.3e+154: tmp = -0.3333333333333333 + a else: tmp = (0.0013717421124828531 - ((a * a) * (a * (a * (a * a))))) / -0.00411522633744856 return tmp
function code(a, rand) tmp = 0.0 if (rand <= -8.5e+76) tmp = Float64(Float64(Float64(a * 9.0) + -3.0) / Float64(1.0 / Float64(0.1111111111111111 - Float64(a * a)))); elseif (rand <= 2.3e+154) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(Float64(0.0013717421124828531 - Float64(Float64(a * a) * Float64(a * Float64(a * Float64(a * a))))) / -0.00411522633744856); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= -8.5e+76) tmp = ((a * 9.0) + -3.0) / (1.0 / (0.1111111111111111 - (a * a))); elseif (rand <= 2.3e+154) tmp = -0.3333333333333333 + a; else tmp = (0.0013717421124828531 - ((a * a) * (a * (a * (a * a))))) / -0.00411522633744856; end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, -8.5e+76], N[(N[(N[(a * 9.0), $MachinePrecision] + -3.0), $MachinePrecision] / N[(1.0 / N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 2.3e+154], N[(-0.3333333333333333 + a), $MachinePrecision], N[(N[(0.0013717421124828531 - N[(N[(a * a), $MachinePrecision] * N[(a * N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / -0.00411522633744856), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq -8.5 \cdot 10^{+76}:\\
\;\;\;\;\frac{a \cdot 9 + -3}{\frac{1}{0.1111111111111111 - a \cdot a}}\\
\mathbf{elif}\;rand \leq 2.3 \cdot 10^{+154}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;\frac{0.0013717421124828531 - \left(a \cdot a\right) \cdot \left(a \cdot \left(a \cdot \left(a \cdot a\right)\right)\right)}{-0.00411522633744856}\\
\end{array}
\end{array}
if rand < -8.49999999999999992e76Initial program 99.5%
*-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.5%
Simplified99.5%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.6%
Simplified0.6%
flip-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f640.5%
Applied egg-rr0.5%
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f640.5%
Applied egg-rr0.5%
Taylor expanded in a around 0
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval27.4%
Simplified27.4%
if -8.49999999999999992e76 < rand < 2.3e154Initial 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-+.f6487.1%
Simplified87.1%
if 2.3e154 < rand Initial program 99.5%
*-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-+.f646.1%
Simplified6.1%
flip-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f6436.3%
Applied egg-rr36.3%
clear-numN/A
flip3--N/A
associate-/l/N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
metadata-evalN/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
Applied egg-rr0.6%
Taylor expanded in a around 0
Simplified40.4%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (/ 1.0 (- 0.1111111111111111 (* a a)))))
(if (<= rand -8.5e+76)
(/ (+ (* a 9.0) -3.0) t_0)
(if (<= rand 3.5e+141) (+ -0.3333333333333333 a) (/ -3.0 t_0)))))
double code(double a, double rand) {
double t_0 = 1.0 / (0.1111111111111111 - (a * a));
double tmp;
if (rand <= -8.5e+76) {
tmp = ((a * 9.0) + -3.0) / t_0;
} else if (rand <= 3.5e+141) {
tmp = -0.3333333333333333 + a;
} else {
tmp = -3.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 = 1.0d0 / (0.1111111111111111d0 - (a * a))
if (rand <= (-8.5d+76)) then
tmp = ((a * 9.0d0) + (-3.0d0)) / t_0
else if (rand <= 3.5d+141) then
tmp = (-0.3333333333333333d0) + a
else
tmp = (-3.0d0) / t_0
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = 1.0 / (0.1111111111111111 - (a * a));
double tmp;
if (rand <= -8.5e+76) {
tmp = ((a * 9.0) + -3.0) / t_0;
} else if (rand <= 3.5e+141) {
tmp = -0.3333333333333333 + a;
} else {
tmp = -3.0 / t_0;
}
return tmp;
}
def code(a, rand): t_0 = 1.0 / (0.1111111111111111 - (a * a)) tmp = 0 if rand <= -8.5e+76: tmp = ((a * 9.0) + -3.0) / t_0 elif rand <= 3.5e+141: tmp = -0.3333333333333333 + a else: tmp = -3.0 / t_0 return tmp
function code(a, rand) t_0 = Float64(1.0 / Float64(0.1111111111111111 - Float64(a * a))) tmp = 0.0 if (rand <= -8.5e+76) tmp = Float64(Float64(Float64(a * 9.0) + -3.0) / t_0); elseif (rand <= 3.5e+141) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(-3.0 / t_0); end return tmp end
function tmp_2 = code(a, rand) t_0 = 1.0 / (0.1111111111111111 - (a * a)); tmp = 0.0; if (rand <= -8.5e+76) tmp = ((a * 9.0) + -3.0) / t_0; elseif (rand <= 3.5e+141) tmp = -0.3333333333333333 + a; else tmp = -3.0 / t_0; end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(1.0 / N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -8.5e+76], N[(N[(N[(a * 9.0), $MachinePrecision] + -3.0), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[rand, 3.5e+141], N[(-0.3333333333333333 + a), $MachinePrecision], N[(-3.0 / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{0.1111111111111111 - a \cdot a}\\
\mathbf{if}\;rand \leq -8.5 \cdot 10^{+76}:\\
\;\;\;\;\frac{a \cdot 9 + -3}{t\_0}\\
\mathbf{elif}\;rand \leq 3.5 \cdot 10^{+141}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;\frac{-3}{t\_0}\\
\end{array}
\end{array}
if rand < -8.49999999999999992e76Initial program 99.5%
*-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.5%
Simplified99.5%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f640.6%
Simplified0.6%
flip-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f640.5%
Applied egg-rr0.5%
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f640.5%
Applied egg-rr0.5%
Taylor expanded in a around 0
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval27.4%
Simplified27.4%
if -8.49999999999999992e76 < rand < 3.5e141Initial program 99.9%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6488.4%
Simplified88.4%
if 3.5e141 < rand Initial program 99.5%
*-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-+.f646.3%
Simplified6.3%
flip-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f6433.8%
Applied egg-rr33.8%
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f6433.8%
Applied egg-rr33.8%
Taylor expanded in a around 0
Simplified34.9%
(FPCore (a rand) :precision binary64 (if (<= rand 5.4e+142) (+ -0.3333333333333333 a) (/ -3.0 (/ 1.0 (- 0.1111111111111111 (* a a))))))
double code(double a, double rand) {
double tmp;
if (rand <= 5.4e+142) {
tmp = -0.3333333333333333 + a;
} else {
tmp = -3.0 / (1.0 / (0.1111111111111111 - (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 <= 5.4d+142) then
tmp = (-0.3333333333333333d0) + a
else
tmp = (-3.0d0) / (1.0d0 / (0.1111111111111111d0 - (a * a)))
end if
code = tmp
end function
public static double code(double a, double rand) {
double tmp;
if (rand <= 5.4e+142) {
tmp = -0.3333333333333333 + a;
} else {
tmp = -3.0 / (1.0 / (0.1111111111111111 - (a * a)));
}
return tmp;
}
def code(a, rand): tmp = 0 if rand <= 5.4e+142: tmp = -0.3333333333333333 + a else: tmp = -3.0 / (1.0 / (0.1111111111111111 - (a * a))) return tmp
function code(a, rand) tmp = 0.0 if (rand <= 5.4e+142) tmp = Float64(-0.3333333333333333 + a); else tmp = Float64(-3.0 / Float64(1.0 / Float64(0.1111111111111111 - Float64(a * a)))); end return tmp end
function tmp_2 = code(a, rand) tmp = 0.0; if (rand <= 5.4e+142) tmp = -0.3333333333333333 + a; else tmp = -3.0 / (1.0 / (0.1111111111111111 - (a * a))); end tmp_2 = tmp; end
code[a_, rand_] := If[LessEqual[rand, 5.4e+142], N[(-0.3333333333333333 + a), $MachinePrecision], N[(-3.0 / N[(1.0 / N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;rand \leq 5.4 \cdot 10^{+142}:\\
\;\;\;\;-0.3333333333333333 + a\\
\mathbf{else}:\\
\;\;\;\;\frac{-3}{\frac{1}{0.1111111111111111 - a \cdot a}}\\
\end{array}
\end{array}
if rand < 5.39999999999999965e142Initial 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.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6469.0%
Simplified69.0%
if 5.39999999999999965e142 < rand Initial program 99.5%
*-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-+.f646.3%
Simplified6.3%
flip-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-evalN/A
*-lowering-*.f6433.8%
Applied egg-rr33.8%
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f6433.8%
Applied egg-rr33.8%
Taylor expanded in a around 0
Simplified34.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.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6460.7%
Simplified60.7%
(FPCore (a rand) :precision binary64 a)
double code(double a, double rand) {
return a;
}
real(8) function code(a, rand)
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = a
end function
public static double code(double a, double rand) {
return a;
}
def code(a, rand): return a
function code(a, rand) return a end
function tmp = code(a, rand) tmp = a; end
code[a_, rand_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.8%
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
metadata-eval99.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6460.7%
Simplified60.7%
Taylor expanded in a around inf
Simplified59.9%
(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.8%
Simplified99.8%
Taylor expanded in rand around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6460.7%
Simplified60.7%
Taylor expanded in a around 0
Simplified1.7%
herbie shell --seed 2024139
(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))))