Ruby or Perl are certainly good options, although some of Perl's syntax can by off-putting to the beginner, IMO. Right now, there is much better library support for astronomers in the Python ecosystem, though.
python
>>> 2 * 3.1 6.2000000000000002
perl -e "print 2 * 3.1" 6.2
ruby -e "print 2 * 3.1" 6.2
For example, in MATLAB, Octave and JavaScript, a value is displayed (formatted) as an `integer' if it's very close to an integer (closer than certain epsilon -- and that's configurable in case of M & O). At all the time, what the variable holds -- and what undergoes computations -- is a purely float value, never an integer.
>>> from decimal import Decimal
>>> 2 * Decimal("3.1")
Decimal('6.2')