Boo
  1. Boo
  2. BOO-458

Scientific notation with negatives.

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.5.6
    • Fix Version/s: 0.6
    • Component/s: Compiler
    • Labels:
      None
    • Number of attachments :
      0

      Description

      >>> 10e3
      10000
      >>> 10e-3
      ERROR: Error reading from 'input7': 'Value was either too large or too small for an Int64.'.
      >>> 10 * -(10 * 10 * 10)
      -10000
      >>>

        Activity

        Hide
        Doug H added a comment -

        10.0e-3 == 0.01
        not -10000

        It has to be a double or float, and boo only recognizes a number as a double or float if there is a decimal point.
        Which points out another bug. 10f should be recognized as a float but is not. I'll make a separate jira issue for that.

        Show
        Doug H added a comment - 10.0e-3 == 0.01 not -10000 It has to be a double or float, and boo only recognizes a number as a double or float if there is a decimal point. Which points out another bug. 10f should be recognized as a float but is not. I'll make a separate jira issue for that.
        Hide
        Rodrigo B. de Oliveira added a comment -

        use the f suffix to indicate a float number.

        >>> 30e-2f

        Show
        Rodrigo B. de Oliveira added a comment - use the f suffix to indicate a float number. >>> 30e-2f

          People

          • Assignee:
            Unassigned
            Reporter:
            Arron Washington
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: