Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help Using FPU assembly code in the double hullSpeed(double lgth) part ! -compute the hull speed for the specified boat length, - implementing the

Please help Using FPU assembly code in the "double hullSpeed(double lgth)" part !

-compute the hull speed for the specified boat length,

- implementing the numerical computation in GNU Assembly Language

- through use of FPU instructions (do NOT call sqrt() from math.h)

#include

#include

#include

// do not change anything above this comment

double hullSpeed(double lgth) // -----------assembly code ----------

{

// here you will compute the hull speed for the specified boat length,

// implementing the numerical computation in GNU Assembly Language

// through use of FPU instructions (do NOT call sqrt() from math.h)

return 0.0;

}

// do not change anything below this comment, except for printing out your name

double hullSpeedC(double lgth)

{

// this C implementation of the hull speed computation is provided

// so you can compare its correct results with the results of your code

return 1.34 * sqrt(lgth);

}

int main(int argc, char **argv)

{

double lgth;

double hullSpd, hullSpdC;

printf("CS201 - Assignment 02 - I. Forgot ");

if (argc != 2) {

printf("need 1 argument: boat length ");

return -1;

}

lgth = atof(argv[1]);

hullSpd = hullSpeed(lgth);

hullSpdC = hullSpeedC(lgth);

printf("hullSpeed(%.0f) = %.3f, %.3f ", lgth, hullSpd, hullSpdC);

return 0;

}

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

More Books

Students also viewed these Databases questions

Question

Write short notes on departmentation.

Answered: 1 week ago

Question

What are the factors affecting organisation structure?

Answered: 1 week ago

Question

What are the features of Management?

Answered: 1 week ago

Question

Briefly explain the advantages of 'Management by Objectives'

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago