Earlier quoted context omitted.
Can we just represent 1 here as 0.999...?
There are many ways to represent 1, but it’s still 1.
The linked Wikipedia article just says that the mantissa is “the fractional part.”
111–120 of 325 posts
"Normalized". That's what we call data that have been scaled to fit on a tidy axis.
Does anyone know of a good site for these kind of questions other than the English stack exchange. I frequently run into programming related naming issues (who doesn't eh?). But I struggle to find accurate search terms to help answer them...and the results are usually downed out by non-technical related language Q&A's E.g. I was trying to name a table yesterday that would store events related to boxes, pallets, conta…
I 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.
https://en.wikipedia.org/wiki/Fraction#Proper_and_improper_f...
Earlier 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.
I don't think this is a naming issue at all. In the provided example, 'Accuracy' is the correct name for the parameter, as that's what the parameter represents, accuracy. The fact that accuracy should be given as a value in an interval from 0 to 1 should be a property of parameter type . In other words, the parameter should not be a float, but a more constrained type that allows floats only in [0,1]. EDIT: Some of yo…
I'm envisioning a programming language in which variable names and type names can become one. So instead of func call(Person person){} you just have func call(person){} where person is a known type AND the variable name. In that scenario 'accuracy' would be a type with known value between 0 and 1.
Earlier quoted context omitted.
yeah, right, so what do you call such a type? I believe that is the actual question.
The question was about the parameter name , though. The correct answer seems to be: function FuncName(UnitInterval accuracy)
UnitIntervalNumber would be better, but it's too long. Something like UnitNumber or UnitFloat could maybe work.
I don't think this is a naming issue at all. In the provided example, 'Accuracy' is the correct name for the parameter, as that's what the parameter represents, accuracy. The fact that accuracy should be given as a value in an interval from 0 to 1 should be a property of parameter type . In other words, the parameter should not be a float, but a more constrained type that allows floats only in [0,1]. EDIT: Some of yo…
That's a very good observation. We still could need a (new) term for this common type. Maybe floatbit, softbit, qubit(sic), pot, unitfloat, unit01 or just unitinterval as suggested? This begs an interesting tangential question: Which programming languages allow such resticted intervals as types? type percentage:=int[0,100] type hexdigit:=int[0,15] … since this might be overkill, sane programming languages might encou…