My REAL numbers displaying without the decimal

robert.mccarthyrobert.mccarthy Member Posts: 165
edited June 2012 in Working with GS (Mac)
Hi All,

I have some real numbers, which when I calculate on a calculator come out with a decimal place. However, when I put the calculation in GS, and then display the number, it is not showing the decimals.

My calculation is one which I have been given in another post:

changeattribute: numberOfDays = 365*year + year/4 - year/100 + year/400 + date + (153*month+8)/5

Year = 2012
Date = 22
Month = 2

Thanks,

Best Answer

  • MarkOnTheIronMarkOnTheIron Posts: 1,447
    Accepted Answer
    Real numbers are not limited. Maybe somewhere in your calculations you're rounding the values.

Answers

  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    Are you using Real attributes or Integer/Index attributes?
  • robert.mccarthyrobert.mccarthy Member Posts: 165
    Real attributes
  • robert.mccarthyrobert.mccarthy Member Posts: 165
    I think I found the issue. My answers are 6 numbers long with 2 decimals after (i.e 735060.11)

    Are REAL numbers limited to length in game salad?
  • robert.mccarthyrobert.mccarthy Member Posts: 165
    Right, it seems that it was the 'displaytext' function which would not display a text length with decimals longer than 6 full numbers and 2 decimals (or something similar).

    Has anyone else seen this? Possible bug??
Sign In or Register to comment.