I think the input are the radii, not the diameters, but I'm too lazy to check for sure.
not really, the test sequence is simply wrong.
I spend 20mn to understand that the data are inverted, thanks :|
and also five minus it is not diameter but radii, a is outer radii and b the radii of the hole
It should be specified more clear what the input parameters mean exactly geometrically.
What a waste! Calling a radius a diameter. I got numbers that were off by a factor of 8, which turned out to be that I had used the information that a and b were diameters, whereas Bistwas used them as radii. Please correct the problem definition.
If a is the hole diameter and b is the outermost diameter, how can a>b in the test cases?
Problem is written incorrectly.
test suite'answer is wrong if a and b is diameter instead of radius.
Volume should be y = pi^2/32*(a+b)i*(b-a)^2
I wonder whether it it adequate to test correctness of double answers by equality. To do so discounts rounding errors and the fact that IEEE 754 does not guarantee the laws of arithmetic.
So, when you say "diameter" you mean "radius"? And when you say "outer" you mean "inner"?
Who Has the Most Change?
Free passes for everyone!
03 - Matrix Variables 1
05 - Vector Equations 3
Is this triangle right-angled?
Distance walked 1D
Given a square and a circle, please decide whether the square covers more area.
given 3 sides, find area of this triangle
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office