Probability
A word for a value between 0 and 1 (inclusive)
81–90 of 325 posts
Re: A word for a value between 0 and 1 (inclusive)
#82Percentage. But in the code I'd probably use X_range depending on what 0..1 represents
percentage is 0 to 100, though. (Or even more, saying 200% is not technically wrong depending on context)
edit: but I guess it is wrong, because % is ambiguous - it can mean fraction, it can mean growth
Re: A word for a value between 0 and 1 (inclusive)
#83As the logic dealing with {0, 1} is named after its founder George Boole, a boolean or bool for short. I'd suggest we call a fuzzy truth value in the interval of [0,1] after its founder Lotfi A. Zadeh, a zadehan or zade for short. Edit: Fixed Bool to Boole thanks to globular-toast, my internal syntax checker must have auto corrected that one ;)
I like this idea, although I don't think English speakers would know how to pronounce "zadehan" by default. "Zadean" might be better. I don't think it will catch on, though, because "boolean" is really easy to say but "zadean" isn't.
Re: A word for a value between 0 and 1 (inclusive)
#84Depending on context I would use ratio saturated (if something is clamped to 0-1) normalized (if it is scaled down using a max value)
Re: A word for a value between 0 and 1 (inclusive)
#85Shoot. I thought "Proportion" was the One True Correct word, but it's not. Float values between 0 and 1 are very very useful, and I use them all over the place, and I actually thought everyone did (and everyone called them 'Proportions') Unlike percentages, you can just multiply them with the number you want the 'proportion' of, Quick, how do you calculate 20% of 50% of 12345!? (it's (20/100) * (50/100) * 12345) Ok,…
Re: A word for a value between 0 and 1 (inclusive)
#86Related question: what would be the best way to store such a value? A float would only use the mantissa-bits, so it would be rather inefficient. Perhaps as a uint16 with a representation of uint16 / (2^16)?
Re: A word for a value between 0 and 1 (inclusive)
#87“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.
Can we just represent 1 here as 0.999...?
Re: A word for a value between 0 and 1 (inclusive)
#88Earlier quoted context omitted.
Yeah, this is a pretty significant difference between a set and an element.
The fix is simple: Put the type of the variable in the type name. Then "UnitInterval proportion" tells you everything you need to know.
Re: A word for a value between 0 and 1 (inclusive)
#89I use "alpha" for this, as in A in RGBA. Obviously won't work for everyone, but it's a simple convention that's easy to grok and explain.
Re: A word for a value between 0 and 1 (inclusive)
#90EDIT: Some of you asked what about languages that don't support such more constrained types, so to answer all of you here: different languages have different capabilities, of course, so while some may make what I proposed trivial, in others it would be almost or literally impossible. However, I believe most of the more popular languages support creation of custom data types? So the idea (for those languages at least) is quite simple - hold the value as a float, but wrap it in a custom data type that makes sure the value stays within bounds through accessor methods.