Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A ArduinoJson
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Benoît Blanchon
  • ArduinoJson
  • Merge requests
  • !545

Fix #544: force large constants to double type

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/sarfata/bugfix/single-precision-constant into master Jul 03, 2017
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: sarfata

This helps when the compiler option -fsingle-precision-constant is set (teensy 3.x).

There is no suffix to make a constant a double. The L suffix on float constants makes them long double but for most platforms that should be the same as a double so this should not impact any other platform. See https://stackoverflow.com/questions/12205141/is-there-a-floating-point-literal-suffix-in-c-to-make-a-number-double-precisio for some discussion on this issue.

Another option would be to set the ARDUINOJSON_DOUBLE_IS_64BITS to 0 on Teensy but I think this approach is favorable.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/sarfata/bugfix/single-precision-constant