Area Under Curves and Volume of Revolving a Curve Discussions | Functional Programming | HackerRank
We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Multiplying the π at the end makes perfect sense but for languages with a predefined template we can't do that here as the predefined function has to return the area of each slice (disk).
Multiplying all terms (slices) or mutlplying at the end affects the double precision so probably better not to bother with that here, i.e. just multiply all slices by π if you are solving this with a language which doesn't come with a template (Erlang for instance).
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Area Under Curves and Volume of Revolving a Curve
You are viewing a single comment's thread. Return to all comments →
Multiplying the
Ï€
at the end makes perfect sense but for languages with a predefined template we can't do that here as the predefined function has to return the area of each slice (disk).Multiplying all terms (slices) or mutlplying at the end affects the double precision so probably better not to bother with that here, i.e. just multiply all slices by
Ï€
if you are solving this with a language which doesn't come with a template (Erlang for instance).