-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
I was porting some Python code into Julia and forgot to change a Python exponentiation with ** into Julia's ^. I didn't notice this at first and the program ran ok, but was wondering why my results were weird.
After some examination, I realized that even though a**b gives a syntax error in Julia, (a)**(b) with the parenthesis is evaluated as a*b. This is because *(x) is a valid function call and *(x) == x so it's parsed as (a)*(*(b)). Not sure if this needs fixing, but it did cause some confusion, which was largely my own fault for not converting the syntax properly.
Metadata
Metadata
Assignees
Labels
No labels