4 ms·
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 nu
by spicybright 6y ago
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.
- v21 6y agofwiw, this post was inspired by a twitter thread i created yesterday (https://twitter.com/v21/status/1301451641699340288 https://twitter.com/v21/status/1301451641699340288), where i collected examples of people getting annoyed that this term doesn't exist... and most of those were inspired by frustration at this being called a percentage when it wasn't. so if you want a nice collection of people stubbing their toe on the word percentage, it's out there.
- fnord123 6y agoThere might be bike shedding for the best answer, but this is just incorrect. Percent literally means "for one hundred"
- deleted 6y ago[deleted]
- peteretep 6y ago> "percent" ... usually ranges from 0 to 1 That’s not a percentage. A percentage is between 0 and 100.
- qayxc 6y agoTechnically even that's incorrect - percentages can be negative and greater than 100 as well. A doubling expressed as a percentage of a given baseline would be 200%; economic growth during a recession is typically expressed by a negative percentage.
- systoll 6y ago‘Per’ means ‘divided by’, ‘cent’ means 100. Units implicitly multiply, and x/100 == x*0.01. Percent is a fancy way to 0.01, just as ‘dozen’ is a fancy way to say 12. Percent has some strong norms around its usage (no-one buys 1200% eggs at the supermarket) but you can’t ignore the mathematical meaning. In both cases, if someone used them as a type name, conversion to floats should involve multiplying by the unit.