Skip to content

Commit

Permalink
Do not pollute scope with @uncertain macro (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano authored Mar 14, 2021
1 parent d83e542 commit 287f575
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ macro uncertain(expr::Expr)
if n == 1
a = esc(expr.args[2]) # Argument, of Measurement type
return quote
x = measurement($a)
result($f(x.val), Calculus.derivative($f, x.val), x)
let x = measurement($a)
result($f(x.val), Calculus.derivative($f, x.val), x)
end
end
else
a = expr.args[2:end] # Arguments, as an array of expressions
Expand Down

0 comments on commit 287f575

Please sign in to comment.