Skip to content

Commit 3e17f18

Browse files
committed
Refactor
1 parent 5726bab commit 3e17f18

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎RandomDo/NumLean/Distributions.lean‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ tail is the exponential's own, memoryless, so one draw beyond `Ziggurat.expR` su
134134
deviation. -/
135135
@[inline] def normal' (loc : Float := 0) (var : Float := 1) : RandPCG IO Float := do
136136
if var < 0 then throw <| IO.userError "var < 0"
137-
return Float.fma (Float.sqrt var) (← standardNormal) loc
137+
normal loc (Float.sqrt var)
138138

139139
/-- Draw samples from an exponential distribution. -/
140140
@[inline] def exponential (scale : Float := 1) : RandPCG IO Float := do

0 commit comments

Comments
 (0)