Uploaded image for project: 'Clojure'
  1. CLJ-782

long cast is not checked for Object decimal types

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Completed
    • Affects versions: None
    • Fix versions: Release 1.3
    • Labels:
      None
    • Approval:
      Ok
    • Patch:
      Code and Test

      Description

      E.g.:

      user=> (*' Long/MAX_VALUE 100M)
      922337203685477580700M
      user=> (long *1)
      -100
      user=> (Double/valueOf Double/MAX_VALUE)
      1.7976931348623157E308
      user=> (long *1)
      9223372036854775807
      

      And the numbers.clj test erroneously considers truncation as correct.

        Attachments

          Activity

            People

            • Assignee:
              ataggart Alexander Taggart
              Reporter:
              ataggart Alexander Taggart
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: