Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

clarifications: math.h functions may not be used in this project math.h was included in to the source code to provide the INFINITY constant needed by

clarifications:

  • math.h functions may not be used in this project
    • math.h was included in to the source code to provide the INFINITY constant needed by your get_fp() function for returning representations of infinity.
    • You may not use any of the functions from math.h.
    • Clarifications were added to Blackboard and the Project Documentation to clarify this.
      • Part of the learning objectives for this course involve encoding/decoding multiple data types from within a single memory location, which some of the math.h functions will do for you in a non-standard way. (eg. only work for this specific problem with floats and not a general solution for other compacted data types)
  • You should never return -0 from add_vals
    • -0 + -0 = 0
    • 0 + -0 = 0
    • -0 + 0 = 0
    • -0 + x = x // where x is != 0 or -0
    • -5 + 5 = 0
  • You will return -0 from mult_vals following the rules for computing S
    • -0 * -0 = 0
    • 0 * -0 = -0
    • -0 * 0 = -0
    • -0 * x = -0 // if x is positive
    • -0 * -x = 0 // if x is positive (meaning -x is negative)
    • In each of the cases of the Math and Special Values for multiplication, s = s1 ^ s2

-----------------------------------------

fp.h

#ifndef FP_H

#define FP_H

#define EXPONENT_BITS 4

#define FRACTION_BITS 6

#define DENORMALIZED 0

#define SPECIAL 1

#define SIGNED 1

#define ROUND 1

#endif

------------------

fp_functs.c

#include #include #include #include "fp.h"

// input: float value to be represented // output: integer version in our representation // // Perform this the same way we did in class - // either dividing or multiplying the value by 2 // until it is in the correct range (between 1 and 2). // Your exponent (actually E) is the number of times this operation // was performed. // Deal with rounding by simply truncating the number. // Check for overflow and underflow - // with 4 exponent bits, we have overflow if the number to be // stored is > 14 // for overflow (E > 14), return -1 // For underflow (E

float getFP(int val) { // Using the defined representation, compute the floating point // value // For denormalized values (including 0), simply return 0. // For special values, return -1;

return 2.0; }

int multVals(int source1, int source2) { // You must implement this by using the algorithm // described in class: // Add the exponents: E = E1+E2 // multiply the fractional values: M = M1*M2 // if M too large, divide it by 2 and increment E // save the result // Be sure to check for overflow - return -1 in this case // Be sure to check for underflow - return 0 in this case

return 2; }

int addVals(int source1, int source2) { // Do this function last - it is the most difficult! // You must implement this as described in class: // If needed, adjust one of the two number so that // they have the same exponent E // Add the two fractional parts: F1' + F2 = F // (assumes F1' is the adjusted F1) // Adjust the sum F and E so that F is in the correct range // // As described in the handout, you only need to implement this for // positive, normalized numbers // Also, return -1 if the sum overflows return 2; }

------------------------------------------

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

cannot use pow() function.

project
Project 1. Floating Point System Project 1. Floating Point System You also have the option of entering the commands directly from the command line. Project #1: Floating Point Representation Due: Thursday, February 27 11:59pm No late work allowed after 48 hours; each day late automatically uses one token. zeus-1:P1$ ./fR > a . 1.5 > b = 3.2 >print c CE 4.6875 Exiting In class, we talked about the IEEE standard for floating point representation and did examples using different sizes for exponent and fruction fields so that you could learn how to do the conversions Some of this task is already done for you. We provide a program that reads in the given MLKY scripts, saves the values (as integers that encode the corresponding hitleyel representation in our floating point format) and calls the functions (described next) that you will be implementing. You will only need to modify for functs.c. For this assignment, you are going to write several functions in C to add a custom floating-point system to a seripting language called MLKY. Your functions will allow MLKY to convert standurd front floating point values to a bit-level floating point representation for use internally in its language. You will also write code to convert this MLKY floating point representation back into standard C float values Finally, you will write code to perform addition and multiplication of these MLKY bit-level floating point representations, MLKY Floating Point Bit-Level Representation We encode the MLKY Floating Point vulues within a signed 32-bit int in this format: Unused Bits (MUST BE Os) Sexp f rac INPUT: The main input will be reading in scripts for the MLKY scripting language, which we have implemented and provided to you as the starting code, and call your functions to implement floating point support for these scripts. The MLKY language is very simple with only 4 different kinds of statements: assignment, print, add, and multiply. There is only one statement on each line. An example of a script is below: You are going to implement this 11-bit floating point representation: 1 bit for sign (s), 4 bits for exponent (exp) and 6 bits for fraction (frac) Using bit-level operators, you will write the code for the functions (shown below): Assignment statement (variable value this operation calls your function: zeus-115 cat Samplepreca.lky x = 0.26 print xy--15.25 print y a-X + y print az XY print z int sempute fp(float yal)() Sects.fr converts input from a standard C float to our custom 11-bit mini-float representation which only uses the 11 lowest of the given 32 bits in an integer). The return value of the function will be the 32-bit integer that encodes the corresponding hit representation of our MLKY floating point value. OUTPUT: The output will be the current values of the given variables at the print statements. For the above script, the output would be: zeus-1:P1$ ./p arlencoeran.elky > >X. .261718750DDDDDDDDDDDDDD >> y -15.250000000000000000000000 >>a 15.BODDODDODDODDODDODD000 For example, if a positive flouting-point number is represented by the exp" field expressed in bits as 10, and the "frac" field expressed in bits as we then the integer that must be returned is the one that corresponds to the 32-bit patiem 0000 0000 0000 000 000 0001 2000 2001 specifically ex0000101 Page 1 of 8 Page 2 of 8 Project 1 - Floating Point System Project 1 - Floating Point System Observe how the "", "exp" and "frac" bits are preceded by a sequence of leading Os to make the representation 32 bits that fit within an int. Note: the INFINITY constant will not work with your int floating-point representation. It is how Cfloats store infinity.. So, if you get co as input to get ip, you can return INFINITY; . Remember to return the right infinity! (eg, return - INFINITY;) For Underflows (eg. Denormalized or 0), return 0 Given the number of bits in frac, the rounding you will have to do for this representation may be substantial. In this assignment, we will round- tonearest-even for the fraction. For example, the closest representable value for 56.24 can be determined by looking at the all values program output (detailed later in this document). The relevant output is helow: W - 1.750692 (51.11860a), val-56.CONCORSO C ase M = 1.765625 (bi. 118881), val=56.508088088096980Beeeeeeee Add statement for this statement, you are going to take two values in our int Poating-point representation and use the same technique as described in class/comments to add these values and return the result converted back into our representation. (i.e._if El > E2:Align M2 by making E2 equal to El, then M = M/+M2, E=El, and adjust M&E as needed. If EIC E2, do the same operations with the opposite side). o For Underflows (eg, Denormalized or 0), return 0 or -0 as appropriate o Rounding will be through round-to-nearest-even (as with compute fp) For Overflows (.exp is too large for Normalized), return the int floating- point representation of the special value to or - 00 This shows that 56.0 and 56.5 are representable with our 11-bit floating-point representation, however, 56.24 is not. When rounding, you will use round- toncurest-even, which will round to the closer of these two values, or, if they are both equally close, round to the value that is even. This means that when 56.24 is converted to the binary floating point representation in our format, some precision is lost, and the resulting bit pattem corresponds to 56.0, which is the closer value. If our value had been 56.25. however, it would be exactly halfway between 56.0 and 56.5, so you would round to the even value, which would he 56.0. When implementing this statement, DO NOT convert the numbers back to C floats, add them directly as C floats, and then convert to the new representation (doing so will not bring any credit). You have to work with the S, M, and E components of the representations. Hundling cases in compute fp() o For Underflows (eg. Denormalized or 0), return the int floating point representation of the value 0 or-as appropriate. o For Overflows (eg: exp is too large for Normalized), return the int flouting-point representation of the special value o or - 00 int add vals(int sourcel, int source) {} Multiply statement for this statement, you are going to take two values in our representation and use the same technique as described in classicomments to multiply these values and return the result in our representation. (i.e. M MIM2, E-EI+E2, S-S/S2, and adjust M & E as needed) o For Underflows (er Denormalized or 0), return 0 or - as appropriate a Rounding will be through round-to-ncarest-cven (as with compute fp) a For Overflows (es, exp is too large for Normalized), return the int floating point representation of the special value o or - 00 Print statement (print variable) - uses your float set fr) function to convert from our integer floating point representation to a regular C float value and returns it as a C float. Return the converted C float. float setfr(int val) } o For /-vo, retum the pre-defined Cfloat constant INFINITY When implementing this statement, DO NOT convert the numbers back to C floats, add them directly as C floats, and then convert to the new representation (doing so will not bring any credit). You have to work with the S, M, and E components of the representations. Page 3 of 8 Page 4 of 8 Project 1 - Floating Point System Project 1 - Floating Point System int multuals(int sourcel, int source2) {} hased on the normal sign rules for multiplication) c If you add- +-0, you will return 0. If you add-0-0, you will return 0.a If you add-O + anything else, you will return the other value. If you multiply Oor- -or 0, you will retum cither or -0. Thered on the normalige rules for multiplication When you are working in your functions, you may work with M as a Cfloat You can use Cfloats in your code to do your work generally. The only restriction is that in add vals and sultyals, you can't covert the inputs to floats, then just add multiply them together and convert them back. You have to do the operations on the S, M, and components You can still use bormal flows in those functions for your work, however Getting Started First, get the starting axle (project handout.tar) from the same place you got this document. Once you un-tar the handout on cous (using tar wf project1_handout.tar), you will have the following files: telut - This is the only file you will be modifying and submitting). There are stubs in this file for the functions that will be called by the rest of the framework. Feel free to define marre functions if you like but put all of your cxle in this file! Makefile to build the assignment and clean up). Constraints Only one Special Number Type o or- These will be implemented using the proper special number pattern in your int floating point representation For your site a function only, you will be converting your int floating point representation value back into a standard Cfloat type. . If your int representation is string on or , then you will return using a pre-defined front constant, INFINITY (or -INFINITY) . return INFINITY: 1 of return INFINITY: This INFINITY only works with cleats, next with our representation, so it's only used to return from estr when the input is oo No Denormalized Numbers. This assignment is only Normalized (Signed and Special) . You may Not use any math.h functions, including powd). Negative Numbers must be handled. 0 You do not have to handle inputs to saytefrl). . Assume nobody will ever input-o in a MLKY script. . Cfloats bove a bad time working with -0, so we will only be returning 0 from get fr ), which returns a standard Cfloat. If your intemal representation has a - encoded, you can just retum 0 from stufRD. If you have a-0 to return from get fp), just retum from the function. All other values (including c) will be handled properly with negatives S u lts, and add vals, will need to support encoding . in your integer based floating point representation is the expected return value for underflows that occur with a negative value (uz if explis too small when encoding a negative number, underflow to - Math and Special Values If you multiply or by anything else, return either or -0. fhand on the normalign rules for aplication) o If you add + -9, you should return af you add anything else to return on. If you add anything else to return o If you multiply -, you should retum . hased on the normal sign rules for multiplication If you multiply anything else to on or - (except 0), retum oor - README-read it. ta. .- This is the main program for the assignment. Do not change it. It implements a recursive descent purser to read in the program files, determine what each line is supposed to do, and call your functions to couvert, add and multiply. lisa - This is a program we wrote to make debugging easier for us. It prints out all legal values in our representation. This will help you determine whal values you should be seeing For each (the is given and the exp equivalent is given in binary), it lists all possible values that can be represented (als). For each wal you get the Min decimal and in binary for convenience. For example, in the sample program we assigneas to. This number is not a valid val in the output for this program, as shown in the snippet from the all values output below. Page Sofa Page 6 of a Project 1. Floating Point System Project 1. Floating Point System Ze samples Rally E= -2 expa(be101) N - 1. 000 (1.000000), val.9.2500000000000Deere M = 1.015625 (b1.600001), l.0.2539062500000000000000000 H-1.031250 (1.000010), al-0.257812500000DDDDDDDDDDD H = 1.46875 (bi.000011). xal 0.261718750000000000000 Submitting & Grading Submit this assignment electronically on Blackboard. Note that the only file that gets submitted is fe. cungta.c. The closest values to val are .2578125 and 0.6171875. The halfway point between these is . . Since our number (0.26) is greater than the halfway mark, we round up to 2613125 You can make multiple submissions, but we will test and grade ONLY the latest version that you submit (with the corresponding late penalty, if applicable) Of course, doing this in decimal is very hard. It's a lot easier once you're working in the code to do the rounding from the hinary directly. You'll have your M and you'll have to find a way to get the first 6 bits of the fraction part of Mas an integer for encoding in frac. Once you have that, you can look at the left-over fraction portion to belp you make your decision about rounding. Important: Make sure to submit the correct version of your file on Blackboard! Submitting the correct version late will incur a late penalty, and submitting the correct version 48 hours after the due date will not bring any credit. Questions about the spocification should be directed to the CS 367 Piazza forum. Your grade will be determined as follows: Sample Test with easier test values for rounding: x = 31.2 This will round up to 31.25 y = 1. This is directly representable. z Exy The true answer is 32.25, which will round to even to 32.0 print z This will print 32.0 saplossintwalkx - The sample script used in this document, Lesce a cob, and to-You can ignore these files. They are the Lex specification which tokenizes input and sends it to the recursive descent parser in the main program, 20 points - code & comments. Be sure to document your design clearly in your code comments. This score will be based on reading your source code. 80 points correctness. We will be building your code using the fact code you submit along with our code. If you program does not compile, we cannot grade it. If your program compiles but does not run, we cannot grade it. We will give partial credit for incomplete programs that build and run You will not get credit for a particular part of the assignment multiplication for example), if you do not use the required techniques, even if your program performs correctly on the test cases for this part. Implementation Notes MLKY Script Files - The accepted syntax is very simplistic and it should be casy to write your own scripts to test your code (which we strongly encourage). MLKY only uses single-letter, lowercase variable numes. - MLKY's only commands are: print where x is a variable. . * volue for some floating point value. Performs assignment. for any legal variable names xy for any legal variable names If you run fn from the command line without inputting a script file, you can end the session by pressing enter with no input. To run fp with a script file, use the redirect operator Page 7 of 8 Pase of Page 7 of 8 + 2541 words * Focus English (United States) E- 98% Project 1. Floating Point System Project 1. Floating Point System You also have the option of entering the commands directly from the command line. Project #1: Floating Point Representation Due: Thursday, February 27 11:59pm No late work allowed after 48 hours; each day late automatically uses one token. zeus-1:P1$ ./fR > a . 1.5 > b = 3.2 >print c CE 4.6875 Exiting In class, we talked about the IEEE standard for floating point representation and did examples using different sizes for exponent and fruction fields so that you could learn how to do the conversions Some of this task is already done for you. We provide a program that reads in the given MLKY scripts, saves the values (as integers that encode the corresponding hitleyel representation in our floating point format) and calls the functions (described next) that you will be implementing. You will only need to modify for functs.c. For this assignment, you are going to write several functions in C to add a custom floating-point system to a seripting language called MLKY. Your functions will allow MLKY to convert standurd front floating point values to a bit-level floating point representation for use internally in its language. You will also write code to convert this MLKY floating point representation back into standard C float values Finally, you will write code to perform addition and multiplication of these MLKY bit-level floating point representations, MLKY Floating Point Bit-Level Representation We encode the MLKY Floating Point vulues within a signed 32-bit int in this format: Unused Bits (MUST BE Os) Sexp f rac INPUT: The main input will be reading in scripts for the MLKY scripting language, which we have implemented and provided to you as the starting code, and call your functions to implement floating point support for these scripts. The MLKY language is very simple with only 4 different kinds of statements: assignment, print, add, and multiply. There is only one statement on each line. An example of a script is below: You are going to implement this 11-bit floating point representation: 1 bit for sign (s), 4 bits for exponent (exp) and 6 bits for fraction (frac) Using bit-level operators, you will write the code for the functions (shown below): Assignment statement (variable value this operation calls your function: zeus-115 cat Samplepreca.lky x = 0.26 print xy--15.25 print y a-X + y print az XY print z int sempute fp(float yal)() Sects.fr converts input from a standard C float to our custom 11-bit mini-float representation which only uses the 11 lowest of the given 32 bits in an integer). The return value of the function will be the 32-bit integer that encodes the corresponding hit representation of our MLKY floating point value. OUTPUT: The output will be the current values of the given variables at the print statements. For the above script, the output would be: zeus-1:P1$ ./p arlencoeran.elky > >X. .261718750DDDDDDDDDDDDDD >> y -15.250000000000000000000000 >>a 15.BODDODDODDODDODDODD000 For example, if a positive flouting-point number is represented by the exp" field expressed in bits as 10, and the "frac" field expressed in bits as we then the integer that must be returned is the one that corresponds to the 32-bit patiem 0000 0000 0000 000 000 0001 2000 2001 specifically ex0000101 Page 1 of 8 Page 2 of 8 Project 1 - Floating Point System Project 1 - Floating Point System Observe how the "", "exp" and "frac" bits are preceded by a sequence of leading Os to make the representation 32 bits that fit within an int. Note: the INFINITY constant will not work with your int floating-point representation. It is how Cfloats store infinity.. So, if you get co as input to get ip, you can return INFINITY; . Remember to return the right infinity! (eg, return - INFINITY;) For Underflows (eg. Denormalized or 0), return 0 Given the number of bits in frac, the rounding you will have to do for this representation may be substantial. In this assignment, we will round- tonearest-even for the fraction. For example, the closest representable value for 56.24 can be determined by looking at the all values program output (detailed later in this document). The relevant output is helow: W - 1.750692 (51.11860a), val-56.CONCORSO C ase M = 1.765625 (bi. 118881), val=56.508088088096980Beeeeeeee Add statement for this statement, you are going to take two values in our int Poating-point representation and use the same technique as described in class/comments to add these values and return the result converted back into our representation. (i.e._if El > E2:Align M2 by making E2 equal to El, then M = M/+M2, E=El, and adjust M&E as needed. If EIC E2, do the same operations with the opposite side). o For Underflows (eg, Denormalized or 0), return 0 or -0 as appropriate o Rounding will be through round-to-nearest-even (as with compute fp) For Overflows (.exp is too large for Normalized), return the int floating- point representation of the special value to or - 00 This shows that 56.0 and 56.5 are representable with our 11-bit floating-point representation, however, 56.24 is not. When rounding, you will use round- toncurest-even, which will round to the closer of these two values, or, if they are both equally close, round to the value that is even. This means that when 56.24 is converted to the binary floating point representation in our format, some precision is lost, and the resulting bit pattem corresponds to 56.0, which is the closer value. If our value had been 56.25. however, it would be exactly halfway between 56.0 and 56.5, so you would round to the even value, which would he 56.0. When implementing this statement, DO NOT convert the numbers back to C floats, add them directly as C floats, and then convert to the new representation (doing so will not bring any credit). You have to work with the S, M, and E components of the representations. Hundling cases in compute fp() o For Underflows (eg. Denormalized or 0), return the int floating point representation of the value 0 or-as appropriate. o For Overflows (eg: exp is too large for Normalized), return the int flouting-point representation of the special value o or - 00 int add vals(int sourcel, int source) {} Multiply statement for this statement, you are going to take two values in our representation and use the same technique as described in classicomments to multiply these values and return the result in our representation. (i.e. M MIM2, E-EI+E2, S-S/S2, and adjust M & E as needed) o For Underflows (er Denormalized or 0), return 0 or - as appropriate a Rounding will be through round-to-ncarest-cven (as with compute fp) a For Overflows (es, exp is too large for Normalized), return the int floating point representation of the special value o or - 00 Print statement (print variable) - uses your float set fr) function to convert from our integer floating point representation to a regular C float value and returns it as a C float. Return the converted C float. float setfr(int val) } o For /-vo, retum the pre-defined Cfloat constant INFINITY When implementing this statement, DO NOT convert the numbers back to C floats, add them directly as C floats, and then convert to the new representation (doing so will not bring any credit). You have to work with the S, M, and E components of the representations. Page 3 of 8 Page 4 of 8 Project 1 - Floating Point System Project 1 - Floating Point System int multuals(int sourcel, int source2) {} hased on the normal sign rules for multiplication) c If you add- +-0, you will return 0. If you add-0-0, you will return 0.a If you add-O + anything else, you will return the other value. If you multiply Oor- -or 0, you will retum cither or -0. Thered on the normalige rules for multiplication When you are working in your functions, you may work with M as a Cfloat You can use Cfloats in your code to do your work generally. The only restriction is that in add vals and sultyals, you can't covert the inputs to floats, then just add multiply them together and convert them back. You have to do the operations on the S, M, and components You can still use bormal flows in those functions for your work, however Getting Started First, get the starting axle (project handout.tar) from the same place you got this document. Once you un-tar the handout on cous (using tar wf project1_handout.tar), you will have the following files: telut - This is the only file you will be modifying and submitting). There are stubs in this file for the functions that will be called by the rest of the framework. Feel free to define marre functions if you like but put all of your cxle in this file! Makefile to build the assignment and clean up). Constraints Only one Special Number Type o or- These will be implemented using the proper special number pattern in your int floating point representation For your site a function only, you will be converting your int floating point representation value back into a standard Cfloat type. . If your int representation is string on or , then you will return using a pre-defined front constant, INFINITY (or -INFINITY) . return INFINITY: 1 of return INFINITY: This INFINITY only works with cleats, next with our representation, so it's only used to return from estr when the input is oo No Denormalized Numbers. This assignment is only Normalized (Signed and Special) . You may Not use any math.h functions, including powd). Negative Numbers must be handled. 0 You do not have to handle inputs to saytefrl). . Assume nobody will ever input-o in a MLKY script. . Cfloats bove a bad time working with -0, so we will only be returning 0 from get fr ), which returns a standard Cfloat. If your intemal representation has a - encoded, you can just retum 0 from stufRD. If you have a-0 to return from get fp), just retum from the function. All other values (including c) will be handled properly with negatives S u lts, and add vals, will need to support encoding . in your integer based floating point representation is the expected return value for underflows that occur with a negative value (uz if explis too small when encoding a negative number, underflow to - Math and Special Values If you multiply or by anything else, return either or -0. fhand on the normalign rules for aplication) o If you add + -9, you should return af you add anything else to return on. If you add anything else to return o If you multiply -, you should retum . hased on the normal sign rules for multiplication If you multiply anything else to on or - (except 0), retum oor - README-read it. ta. .- This is the main program for the assignment. Do not change it. It implements a recursive descent purser to read in the program files, determine what each line is supposed to do, and call your functions to couvert, add and multiply. lisa - This is a program we wrote to make debugging easier for us. It prints out all legal values in our representation. This will help you determine whal values you should be seeing For each (the is given and the exp equivalent is given in binary), it lists all possible values that can be represented (als). For each wal you get the Min decimal and in binary for convenience. For example, in the sample program we assigneas to. This number is not a valid val in the output for this program, as shown in the snippet from the all values output below. Page Sofa Page 6 of a Project 1. Floating Point System Project 1. Floating Point System Ze samples Rally E= -2 expa(be101) N - 1. 000 (1.000000), val.9.2500000000000Deere M = 1.015625 (b1.600001), l.0.2539062500000000000000000 H-1.031250 (1.000010), al-0.257812500000DDDDDDDDDDD H = 1.46875 (bi.000011). xal 0.261718750000000000000 Submitting & Grading Submit this assignment electronically on Blackboard. Note that the only file that gets submitted is fe. cungta.c. The closest values to val are .2578125 and 0.6171875. The halfway point between these is . . Since our number (0.26) is greater than the halfway mark, we round up to 2613125 You can make multiple submissions, but we will test and grade ONLY the latest version that you submit (with the corresponding late penalty, if applicable) Of course, doing this in decimal is very hard. It's a lot easier once you're working in the code to do the rounding from the hinary directly. You'll have your M and you'll have to find a way to get the first 6 bits of the fraction part of Mas an integer for encoding in frac. Once you have that, you can look at the left-over fraction portion to belp you make your decision about rounding. Important: Make sure to submit the correct version of your file on Blackboard! Submitting the correct version late will incur a late penalty, and submitting the correct version 48 hours after the due date will not bring any credit. Questions about the spocification should be directed to the CS 367 Piazza forum. Your grade will be determined as follows: Sample Test with easier test values for rounding: x = 31.2 This will round up to 31.25 y = 1. This is directly representable. z Exy The true answer is 32.25, which will round to even to 32.0 print z This will print 32.0 saplossintwalkx - The sample script used in this document, Lesce a cob, and to-You can ignore these files. They are the Lex specification which tokenizes input and sends it to the recursive descent parser in the main program, 20 points - code & comments. Be sure to document your design clearly in your code comments. This score will be based on reading your source code. 80 points correctness. We will be building your code using the fact code you submit along with our code. If you program does not compile, we cannot grade it. If your program compiles but does not run, we cannot grade it. We will give partial credit for incomplete programs that build and run You will not get credit for a particular part of the assignment multiplication for example), if you do not use the required techniques, even if your program performs correctly on the test cases for this part. Implementation Notes MLKY Script Files - The accepted syntax is very simplistic and it should be casy to write your own scripts to test your code (which we strongly encourage). MLKY only uses single-letter, lowercase variable numes. - MLKY's only commands are: print where x is a variable. . * volue for some floating point value. Performs assignment. for any legal variable names xy for any legal variable names If you run fn from the command line without inputting a script file, you can end the session by pressing enter with no input. To run fp with a script file, use the redirect operator Page 7 of 8 Pase of Page 7 of 8 + 2541 words * Focus English (United States) E- 98%

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions