Live data from Hacker News

A word for a value between 0 and 1 (inclusive)

english.stackexchange.com

31–40 of 325 posts

Re: A word for a value between 0 and 1 (inclusive)

#31
post #30

Why is everybody else suggesting things like 'accuracy', and 'between_0_1" when there exists an actual term: "unit interval" (the top answer) https://en.wikipedia.org/wiki/Unit_interval#:~:text=In%20mat... If you google accuracy, you'll get the noun. If you use a made up term, it'll probably return useless results.

Unit interval is the interval between 0 and 1. We need a word for a value within that interval.

Re: A word for a value between 0 and 1 (inclusive)

#32

I'd personally go with "percent", but because there's so many correct options, it shouldn't matter as long as it's consistent in the code base. Otherwise it just becomes bike-shedding bait.

Right but it’s specifically not, and liable to make people think “3” is an acceptable input

Again, this is bike shedding bait. I'm going by my own experience with basic mathematics in my American education where "percent" is something you multiply a number by, and usually ranges from 0 to 1.

Ex. 50% of 12 marbles is 6 (*.5, 50%).

But just looking at all the different answers in the comments here means there's no consensus on a "right" way. Hence bike shedding. A decent code base should be consistent so it can focus on more important things.

Re: A word for a value between 0 and 1 (inclusive)

#34
post #31
post #30

Why is everybody else suggesting things like 'accuracy', and 'between_0_1" when there exists an actual term: "unit interval" (the top answer) https://en.wikipedia.org/wiki/Unit_interval#:~:text=In%20mat... If you google accuracy, you'll get the noun. If you use a made up term, it'll probably return useless results.

Unit interval is the interval between 0 and 1. We need a word for a value within that interval.

Then "unitIntervalValue"

Re: A word for a value between 0 and 1 (inclusive)

#35
post #27

"Normalized". That's what we call data that have been scaled to fit on a tidy axis.

Normalized could also imply demeaned.

You could also call that centred to clear up confusion, or mean-subtracted to be more specific. I think if you're specifically dealing with statistical quantities it should be obvious, e.g. standardised if you also scale to unit variance.

Personally if I saw normalised I would assume scaled by a constant, not offset (as in subtraction).

Re: A word for a value between 0 and 1 (inclusive)

#38
Is there a dictionary or thesaurus or something similar specifically designed to help programmers name things? I run into questions like this all the time. “There has to be a commonly used word for this concept, but I don’t know what it is”

Re: A word for a value between 0 and 1 (inclusive)

#39
post #8

I would actually call this a bit of an antipattern. `accuracy` seems fine to me -- although a more descriptive function name than `FuncName` might suggest a better parameter name as well. Digging through the dictionary to find the perfect word means that whoever reads this code is likely going to have to do the same -- why would you ask them to do that? If you aren't referring to a common mathematical or physical con…

You're not wrong but it would be nice to have a word for this incredibly common type of value still.

Re: A word for a value between 0 and 1 (inclusive)

#40
post #2

“mantissa” ( https://en.wikipedia.org/wiki/Common_logarithm#Mantissa_and_... ) comes close, but excludes 1. IEEE 754 sort-of has that as a part of a float, too ( https://en.wikipedia.org/wiki/Significand ), and people use the term “mantissa” for it, but it has to special-case 0. ⇒ barring better suggestions, I think I would stretch the definition of mantissa a bit further.

So the word mantissa has two different meanings that show up in really similar contexts. In

  log(120) = log(1.2 × 10²) = 2.079,
you could call both the .079 and the 1.2 a mantissa. The first is in the range [0,1) and the second, aka significand, is in [1,10) for base 10.

And really one mantissa is just the log of the other.

Post reply on HN