Question
This assignment involves completing the exp10ToExp2 function in C code, you can use https://onlinegdb.come to write and test your C program as a single source
This assignment involves completing the exp10ToExp2 function in C code, you can use https://onlinegdb.come to write and test your C program as a single source file. Your code should take the struct Number pointed by parameter \"pn\" and preserve the value v=cofficient : 22 . 10e10. The restrictions are as follows: coefficient should end up as a value that has bit 63 set. mantissa is a 64-bit unsigned integer. e10 should be O when your algorithm is done. e2 can be any integer (signed) the represented value v should be preserved as much as possible your entire program should not use anything that relies on float, double or functions from math.h comment your code In the gdb console of onlinegdb, do the following: put a break point at the end of exp10ToExp2, you can click slightly to the right of the line number to toggle breakpoint on a line. You can toggle a break point by clicking to the left of a line number After compiing, use this command to run the program with a test case: \"r -n 1.23e-10\" (obviously change the floating point number to the one that you should use), click OK when the program stops at the break point, you can examine the expressing *pn using the gdb command \"print *pn\" To submit, turn in the entire source file (not just the function that you are completing). So that you can check your code, the following command (run it in gdb): r-n 1.23e-45 Should update the mantissa, exp10 and exp2 as in this log file. .
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started