Question

a) Explain the concepts of Fixnum and Bignum in Ruby b) Explain the concepts of Float::EPSILON, Float::MIN, and Float::MAX in Ruby c) Explain and exemplify the inclusive range and exclusive range in R...

a) Explain the concepts of Fixnum and Bignum in Ruby

b) Explain the concepts of Float::EPSILON, Float::MIN, and Float::MAX in Ruby

c) Explain and exemplify the inclusive range and exclusive range in Ruby

d) Describe the concept of dynamic typing in Ruby

e) Explain the meaning of variables and the role and applicability of the following program:

def trace

return unless $trace

p @a / p @b / p @c

end

f) Show a short program that defines a hash and prints its values

g) Show a short program that opens a text file and displays its lines and index

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a) Fixnum and Bignum are classes to store integer values.

    Fixnum is used to store values for -262 to 262 - 1 and values greater or lesser than this range will be stored in

    Bignum class.

b) Float::EPSILON

    The difference between 1 and the smallest double-precision floating point number greater than 1.

    Defaults to 2.2204460492503131e-16.

    Float::MIN

    The smallest positive normalized number in a double-precision floating point.

    Defaults to 2.2250738585072014e-308.

    Float::MAX

    The largest possible number in a double-precision floating point number.

    Defaults to 1.7976931348623157e+308.

Note: Please ask other in another question.

Add a comment
Know the answer?
Add Answer to:
a) Explain the concepts of Fixnum and Bignum in Ruby b) Explain the concepts of Float::EPSILON, Float::MIN, and Float::MAX in Ruby c) Explain and exemplify the inclusive range and exclusive range in R...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT