changed ^ so that rationals are just converted to double