Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Usability

Authors: Jakob Nielsen, Raluca Budiu

1st Edition

0133122131, 9780133122138

More Books

Students also viewed these Programming questions

Question

If X is b(n, p), show that E (A) = P and E[(4->)]; P p(1-P) n

Answered: 1 week ago

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago