Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pike pike
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 104
    • Issues 104
    • 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
    • Container 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
  • pikelang
  • pikepike
  • Issues
  • #1919
Closed
Open
Issue created Aug 01, 2001 by Peter Bortas@zinoOwner

inf and nan floats doesn't encode_value

Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1919

Reported by Mirar , Idonex Heavy Industries mirar@roxen.com

> Math.nan; decode_value(encode_value(Math.nan));
Result: nan
Result: -2.000000
> Math.inf; decode_value(encode_value(Math.inf));
Result: inf
Result: -2.000000

Suggested solution: Encode floats using IEEE standard (suitable size, 64 bits if pike is using doubles). Let people who need backwards-compatible encode_value use a backwards_compatible_encode_value function or similar.

Assignee
Assign to
Time tracking