Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • FPC Source FPC Source
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
    • Locked Files
  • Issues 1,357
    • Issues 1,357
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 73
    • Merge requests 73
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • FPCFPC
  • FPC SourceFPC Source
  • Issues
  • #36870
Closed
Open
Issue created Apr 04, 2020 by FPC Admin account@fpc_adminOwner

Math unit: MaxSingle is not precisely the maximum positive single point float

Original Reporter info from Mantis: Erik Roessiger @erikroe
  • Reporter name: Erik Rößiger

Description:

In the Math unit of FPC, MaxSingle is defined as follows (line 75):

MaxSingle = 3.4e+38;

Assigning this value to any Single variable outputs the following hexadecimal representation: $7F7F C99E
However, the correct maximum single point precision is defined as $7F7F FFFF.

MaxSingle should be changed to this:

MaxSingle = Single(3.402823466E+38);

The output hexadecimal representation of it gives exactly $7F7F FFFF.
Note the Single() cast, else it will be treated incorrectly.

Mantis conversion info:

  • Mantis ID: 36870
  • Version: 3.3.1
  • Fixed in version: 3.3.1
  • Fixed in revision: 44714 (#cd35cdad)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking