Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Scheme help. been stuck on this for about a week 6. Remember the Quadratic formula, which can be used to find the roots of a

Scheme help. been stuck on this for about a week

image text in transcribed

6. Remember the Quadratic formula, which can be used to find the roots of a quadratic eguation? For a quadratic equation ax + bx+c=0.2 #0, the formula is Fb :v -- Tc 24 Notice that this gives us two different roots (because of the +) whenever b2 - 4ac70. Write the following SCHEME functions. (a) (root1 a b c) that gives us the root corresponding to the plus in the in the quadratic formula (that is calculate - --). (b) (root2 a b c) that gives us the root corresponding to the minus in the in the quadratic for mula (that is, calculate -- - (number-of-roots a b c) which calculates the number of distinct roots to the equation ax + bx+c=0,4 +0 (which will either be 1 or 2). (d) real-roots? a b c) is a boolean function that evaluates to #t when the roots of ax'+bx+ c=0,2 0 are real numbers. Note that you do not have to calculate the roots to determine whether they are real or complex numbers. Note: there are some common calculations done in the above functions: it may make sense to write some auxiliary functions to make your code simpler. 6. Remember the Quadratic formula, which can be used to find the roots of a quadratic eguation? For a quadratic equation ax + bx+c=0.2 #0, the formula is Fb :v -- Tc 24 Notice that this gives us two different roots (because of the +) whenever b2 - 4ac70. Write the following SCHEME functions. (a) (root1 a b c) that gives us the root corresponding to the plus in the in the quadratic formula (that is calculate - --). (b) (root2 a b c) that gives us the root corresponding to the minus in the in the quadratic for mula (that is, calculate -- - (number-of-roots a b c) which calculates the number of distinct roots to the equation ax + bx+c=0,4 +0 (which will either be 1 or 2). (d) real-roots? a b c) is a boolean function that evaluates to #t when the roots of ax'+bx+ c=0,2 0 are real numbers. Note that you do not have to calculate the roots to determine whether they are real or complex numbers. Note: there are some common calculations done in the above functions: it may make sense to write some auxiliary functions to make your code simpler

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

c. What groups were least represented? Why do you think this is so?

Answered: 1 week ago

Question

7. Describe phases of multicultural identity development.

Answered: 1 week ago