Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • SWIFTsim SWIFTsim
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 53
    • Issues 53
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • SWIFT
  • SWIFTsimSWIFTsim
  • Merge requests
  • !866

New random_unit_interval implementation

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Pedro Gonnet requested to merge new_random into master Jul 14, 2019
  • Overview 29
  • Commits 8
  • Changes 6

Re-wrote the random_unit_interval function to generate doubles with 48 bits of random mantissa (3.5e-15), as opposed to the current 32-bit version (2.3e-10).

This implementation uses rand_r (to blend the initial state bytes), and erand48 to generate the result over the initial state bytes. The implementation of both functions is inlined to avoid relatively expensive function calls.

This change passes both the testRandom and testRandomSpacing tests.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: new_random