Project: Extreme Float
Project Motivation
The range of floating point values that can be supported varies from one computer to another. In most C++ environments, file shows you the limits. For example double range from approximately 10-308
to 10308
with only 15 precision on many machines. How large the value and the precision is on a particular machine, some applications may have requirement that is even larger values and precisions.
This mini project allows such application to manipulate floating point numbers where the number of digits is limited only by the size of the free store.
Project Description
You are to design an application that uses doubly linked lists to implement a floating point of number of unlimited size. Each node of the list should store one digit of the integer.
Minimum Requirement
Although you have to comply with the minimum requirement of the application, you are not limited to them. You can include any routine you might find useful.
As minimum requirement the application should implement the following routines:
GetExtreme()
This function gets a number from the keyboard
Display()
This function prints number to the screen
Minimum Requirement
InsertDigit()
This function allows inserting a digit to extreme float.
removeDigit()
This function allows removing a digit from extreme float.
TrimZeros()
This function allows to remove trailer or leading zeroes.
Minimum Requirement
Add()
This function takes two extreme float numbers, add the numbers and return the result.
Subtract()
This function takes two extreme float numbers, subtract one from the other and return the result.
Multiply()
This function takes two extreme float numbers, multiply one by the other and return the result.
Minimum Requirement
Divide()
This function takes two extreme float numbers, divide one by the other and return the result.
Compare()
This function takes two extreme float numbers, compare the numbers and return 1 if the first number is greater than the second, 0 if the two numbers are equal and -1 if the first number is less than the second.
Minimum Requirement
Your applicatiokon should provide simple user interface.