Question
I already have this in C i need to transcribe to ARMv8 my code: #include #include int main() { //Prompting users to enter x and
I already have this in C i need to transcribe to ARMv8
my code:
#include
int main() { //Prompting users to enter x and a printf("enter the value of x and a "); double x; long int a; scanf("%lf%ld",&x,&a); int n=0; //variable for denominator long long int den = 1; //Variable calcuating numerator and answers double num = 1; double ans = 0; double exp = 0; //Iterate through n from 0 to a for(n=1;n
//Calculate numberator x^i num = num*x; //Calclate denominator n! den = den*(n); //answers exp=(num/den); ans = ans + (num/den); }
printf("E^x is %lf ",exp); printf("Answer is %lf ",ans); return 0; }
Computation of exponential function is given as e. Write a ARMe assembly program to compute the exponential value. Assume the input x is in DO and the input a is in X19. Store the result in D1. The user input x is a double precision floating-point value between -5 and 5. The user input a is a 64-bit non-negative integer less than 16. Assemble, test, and simulate the assembly code using DS-5 simulator
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