10

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".)

Moderat
  • 4,437

3 Answers3

20

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

Seamus
  • 4,005
  • 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. – bryn Aug 15 '10 at 02:08
  • 4
    "Numbers in the unit interval" works. – Michael Lugo Aug 15 '10 at 05:28
  • 3
    Thank you very much. Now I don't have to name my function "parseNumberBetweenZeroAndOne". –  Aug 15 '10 at 20:43
  • 4
    You should still call your function parseWombatNumbers. Semantic function names are for wimps. All my functions are called "foo78" "bar429" and so on – Seamus Aug 16 '10 at 09:26
  • 1
    @Seamus To the contrary, naming things is one of the hard problems. Only wimps give up on meaningful names. ;) – jpmc26 Feb 14 '14 at 06:23
0

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

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

goblin GONE
  • 67,744
0

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!

Kal
  • 101