11
$\begingroup$

When writing software, there are often situations where I need a parameter to be a floating point number $x \in [0,1]$. I don't know of a name for that category, but I think there must be one because it's such a useful categories. Perhaps there's a name in probability theory?

(If they don't have a name, I hereby declare them to be "wombat numbers".)

$\endgroup$
7
  • 5
    $\begingroup$ It's just the closed interval [0,1] $\endgroup$ Commented Aug 14, 2010 at 23:35
  • 6
    $\begingroup$ (tongue-in-cheek) Since there's no such thing as "irrational" or "transcendental" in floating-point... maybe "proper fractions"? $\endgroup$ Commented Aug 15, 2010 at 0:23
  • 4
    $\begingroup$ Just a curiosity: In Romanian they are sometimes called subunitary numbers (although it sometimes means in [-1,1]). Apparently in English "subunitary" is reserved for matrices. $\endgroup$
    – rgrig
    Commented Aug 15, 2010 at 5:51
  • 1
    $\begingroup$ Not sure I've seen "subunitary" in use, but "unitary" is indeed an adjective frequently used in the theory of matrices. $\endgroup$ Commented Aug 15, 2010 at 12:31
  • 1
    $\begingroup$ I'm running into the same question wrt probability numbers. Since all of the "official" answers seem to be multiword ("property fraction", "unit interval"), I'm going to go ahead and accept your declaration of "wombat" numbers, with my code reading getFloat(), getInt(), getWombat(). $\endgroup$ Commented Sep 22, 2013 at 2:35

3 Answers 3

20
$\begingroup$

Sometimes I've heard it called the "unit interval" as it "probability measures are functions from a boolean algebra to the unit interval"

$\endgroup$
5
  • $\begingroup$ I'd imagine the 'unit interval' refers to the set [0,1], but you wouldn't say that the number 0.3 is a "unit interval number" in the same way that you might say that 2/3 is a "rational number". It's not entirely clear from the question but I think it's asking for a term to describe any number in the set, not to describe the set itself. $\endgroup$
    – bryn
    Commented Aug 15, 2010 at 2:08
  • 4
    $\begingroup$ "Numbers in the unit interval" works. $\endgroup$ Commented Aug 15, 2010 at 5:28
  • 3
    $\begingroup$ Thank you very much. Now I don't have to name my function "parseNumberBetweenZeroAndOne". $\endgroup$
    – Amy de Buitléir
    Commented Aug 15, 2010 at 20:43
  • 4
    $\begingroup$ You should still call your function parseWombatNumbers. Semantic function names are for wimps. All my functions are called "foo78" "bar429" and so on $\endgroup$
    – Seamus
    Commented Aug 16, 2010 at 9:26
  • 1
    $\begingroup$ @Seamus To the contrary, naming things is one of the hard problems. Only wimps give up on meaningful names. ;) $\endgroup$
    – jpmc26
    Commented Feb 14, 2014 at 6:23
0
$\begingroup$

I guess you could call them fractional numbers. But that might be a bit confusing :)

Another option would be "fuzzy truthvalue" or "fuzzy boolean".

$\endgroup$
0
$\begingroup$

It seems you were looking for a name to describe any number in the range [0,1], not the range itself. To say, 'a number in the unit interval' is a bit of a mouthful. Surely there's a better English term for such a common programming requirement? I'll have a go…

Since we're talking about floating point numbers, which the programmer expresses with a finite (and therefor rational) decimal representation, these numbers are a subset of 'decimal fractions'. If the absolute value of the fraction is less than 1 (i.e. the numerator is less than the denominator), this is called a 'proper fraction'. And since we're not interested in negative numbers, we'd have to further clarify these as 'positive' numbers.

So, putting all that together, we could call these numbers positive proper decimal fractions.

Hmm… By word-count, it's a small improvement on 'a number in the unit interval', but it conveniently overlooks the cases of 0 and 1, which are not really 'proper' fractions. Sigh.

Okay, so I'm going to propose the term unidecimal. There, done. Yes, I made it up myself, but hey… these words are all made up by someone at some point!

$\endgroup$

You must log in to answer this question.