2

Here is an expression, check it yourself:

  • Julia: ((((9^0.5)^3)^2)^2)/((-2)^(-3))
  • Python: ((((9**0.5)**3)**2)**2)/((-2)**-3)

enter image description here

StefanKarpinski
  • 32,404
  • 10
  • 86
  • 111
Alitako
  • 31
  • 2
  • Perhaps it was calculated correctly. But since I'm not used to dots in integers, this is a little alarming, because I just started learning this language. – Alitako Jul 30 '20 at 06:19
  • 3
    1) Please paste all your code and results as text (you can just edit the question). Having all in a non-copyable, linked image is kind of annoying for people trying to help. 2) What's the actual error? Maybe give a comparison of expected and actual result. – phipsgabler Jul 30 '20 at 07:05
  • 1
    Those are the same value. – StefanKarpinski Jul 30 '20 at 07:06
  • 1
    Both are same values, but in different format – Ajay A Jul 30 '20 at 07:14

1 Answers1

2

Use PyCall to test whether the results are identical. The py"" string macro will allow you to easily compare results from Python and Julia.

julia> using PyCall

julia> py"((((9**0.5)**3)**2)**2)/((-2)**-3)" == ((((9^0.5)^3)^2)^2)/((-2)^(-3))
true
Przemyslaw Szufel
  • 40,002
  • 3
  • 32
  • 62