Jump to content

Real polynomial/Degree 3/Positive coefficients/Zero/Pseudocode/Program/Exercise

From Wikiversity

Write a computer-program (in pseudocode) which for a polynomial of degree computes a zero within an accuracy of a given number berechnet.

    • The computer has as many memory units as needed, which can contain nonnegative real numbers.
    • It can write the content of a memory unit into another memory unit.
    • It can halve the content of a memory unit and write the result into another memory unit.
    • It can add the content of two memory units and write the result into another memory unit.
    • It can multiply the content of two memory units and write the result into another memory unit.
    • It can compare the content of memory units and can, depending on the outcome, switch to a certain program line.
    • It can print contents of memory units and it can print given texts.
    • There is a stop command.

The initial configuration is

with and (hence, the coefficients of the polynomial, the accuracy and are in the first memory units). The program shall print a sentence telling the bounds of an interval for a zero with the wished-for accuracy and stop.