Hi I'm new to ruby.
Started with learning-ruby.
In first_steps it looks at using ruby as a calculator
1 + 2
3 / 2
3.0 / 2
all this I understand BUT
4.1 % 2
Should be .1
and whats more there has only been one decimal place used so the answer
should have only 1 decimal place.
3.945 * 2.62
=> 10.3359 4 decimals should only be three
- Re: Ruby Numbers
... In first_steps it looks at using ruby as a calculator ... are running into here is how Ruby handles floating point values. ... => 10.3359 4 decimals should only be three ...
- Re: Math errors in python
... They don't even share three digits beyond the decimal point. ... > yet not all fractions can be represented by decimals. ... Hardware designers have settled on a binary representation of floating ... And BTW, your calculator is not, in general, more accurate than the ...
- Re: calculating PI
... ' PI calculator ... When I assigned the expression to PIE at the end and printed PI-PIE, ... I'm trying to get the source-code to a fellow TI'ers program that calculates ... first 5200 decimals of Pi in 184 hours of continuous operation using ...
- Re: ((.99999.... == 1) == 1) = 1
... >Using Powertoys Calculator on Windows XP, I can disply up to 140 decimal ... as many digits as you want. ... 140 come no where near an infinite number of decimals. ...
- Calculator Answer Doesnt Match Excel Answer
... calculator, and got $106,000,000. ... Excel gives me $103,246,753.25 as the answer. ... as currency with two decimals. ... college-level Finance class exam. ...