[SOLVED] COP290-Assignment 3 Big Number Calculator

24.99 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (2 votes)
  • In this assignment, you have to implement Arithmetic Operations for a very large number (Even larger than long long int).
  • Basic operations which are needed to be implemented are: Addition, Subtraction, Multiplication and Division.
  • Other operations includes: square root, Absolute value and power.
  • Programming languages allowed are ANSI-C and C++.
  • You are only allowed to use stdio, string and other libraries which inherently doesn’t implement big number library.
  • Your main executable should be named as mainfile which is made by make command.
  • mainfile should take two command line arguments i.e. <Name of Input file> and <Name of

Output file>

  • Your code should run like: ./mainfile   txt   output.txt
  • txt (i.e. the input file) will contain the different queries, corresponding to each arithmetic operations.
  • Query Format: Each line of input file corresponds to a query which is in the format:
    • <Operator><SPACE> <Operand 1><SPACE> <Operand 2 if required>  Operator can be one of the strings: ADD, SUB, MUL, DIV, SQRT, ABS, POW Operand will be String representing a floating point decimal number.
  • For each query, you have to print a single lined output in Output.txt which is also a string corresponding to floating point decimal number.
  • You need to handle the cases where the operand or results are negative values.
  • Please refer to sample input files with corresponding output files for further details.
  • For floating point results the precision should be correct up to 20 digits after decimal point.
Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.