Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products.

Spaceclaim Scripting – math operations returning wrong result

    • Bjørn Hartmann
      Subscriber

      Hi, New to the forum, and I am sure there is a perfectly logical explanation to this, but how come Spaceclaim Scripting returns 4 for the expression 9/2 which is obviously 4.5?

    • Rob
      Forum Moderator

      Try print(9./2.) and report back. 

    • Bjørn Hartmann
      Subscriber

      9./2. gives correct result...

    • Rob
      Forum Moderator

      Excellent. It's linked to the default real/integer settings, newer versions of SpaceClaim don't suffer from this. 

Viewing 3 reply threads
  • The topic ‘Spaceclaim Scripting – math operations returning wrong result’ is closed to new replies.