The area between the vertex of the parabola and x-axis
Description:
The area between the vertex of the parabola and x-axis
1-) Warning
If you don't know about the following topics, you will have problems in this kata.
- Quadratic equations
- Parabola
- Integral
2-) Explanation
I will give you 3 values as input in the kata. These are a , b , c. The value of a will never be given as 0. These values are the coefficients of the following equation.
The graph of this equation is a parabola.
This kata asks you for the area between the vertex of the parabola and x-axis.
Don't forget area isn't negative.
3-) Details
If the equation hasn't real roots, you should return 0. Because there isn't any area.
If the equation has 2 equal real roots, you should return 0. Because 0 is the real area.
If the equation has 2 unequal real root, you should return the real area.
For example
The real area: 35.265720 ---> return 35.265720
Given values is definitely between -4000 with 4000. Because the result should be under the DOUBLE_MAX value.
I set up the tolerance to 10-6 for the decimal errors.
Letter for you
If you like this kata, don't forget to vote please. Take easy...
-founded by theprotagonist
Similar Kata:
Stats:
Created | Feb 15, 2023 |
Published | Feb 15, 2023 |
Warriors Trained | 540 |
Total Skips | 16 |
Total Code Submissions | 659 |
Total Times Completed | 276 |
C Completions | 160 |
Python Completions | 109 |
TypeScript Completions | 15 |
Java Completions | 19 |
Total Stars | 14 |
% of votes with a positive feedback rating | 96% of 85 |
Total "Very Satisfied" Votes | 80 |
Total "Somewhat Satisfied" Votes | 4 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 17 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |