Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8117625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:14:04+00:00 2026-06-06T04:14:04+00:00

This project is in Obj-C for iphone. I’m using the double float version of

  • 0

This project is in Obj-C for iphone. I’m using the double float version of sfmt available here: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/#dSFMT

After seeding dsmft with the current time, I’m calling:

r = dsfmt_gv_genrand_close_open()

to generate a random float between 0 and 1. There are also two other options, namely:

r = dsfmt_gv_genrand_open_close()
r = dsfmt_gv_genrand_open_open()

I know by the documents that the distinction is whether the 0 or 1 side is open or closed, and is shown mathematically: [0,1), (0,1], or (0,1).

But I don’t know what this means, or which to use for my needs. I just want the most uniformly distributed float between 0 and 1.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T04:14:07+00:00Added an answer on June 6, 2026 at 4:14 am

    [0, 1) means that the generated float may be 0, but never 1 (closed interval on the left, open interval on the right)

    (0, 1] means that the generated float may be 1, but never 0 (close interval on the right, open interval on the left)

    (0, 1) means the generated number cannot be 0 neither 1.

    Which one to choose? I assume the library is well-written so all of these three functions should return a uniformly distributed number. The exact function to choose depends entirely on what you are trying to accomplish.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on this project: http://www.e-pedkelnes.beta.verskis.lt/ Actually what I have to do is
I have found this project on Codeplex. http://www.codeplex.com/ProjNET I need to integrate this code
I am referring to this project by Jimmy Bogard: http://www.codeplex.com/AutoMapper The code repository site
I installed this JavaScript project which attempts to obtain the user's geolocation using client-side
Update: A sample project reproducing this bug can be found here at Microsoft Connect
I'm using Matt Gemmell's amazing MGTwitterEngine for an iPhone project, and my lack of
When compiling my Android JNI project, I got this error: make: Circular /obj/local/armeabi/libstlport_static.a <-
i'm trying out this jquery plugin http://plugins.jquery.com/project/stylish-select-box/ it works good but with prototype +
I am working on a project for iPhone in Obj-C with iOS 4 and
written by Jeff Atwood, this program cleans the project folders from bin, obj and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.