Jump to content

Numeric error propagation: Difference between revisions

m
added whitespace and highlighting to the task's preamble.
m (used a CSS overline to better show the antecedent of the square root (radical symbol) in the definition for D in the Pythagorean formula, used a larger font to make it easier to read the formula.)
m (added whitespace and highlighting to the task's preamble.)
Line 24:
# Add an uncertain number type to your language that can support addition, subtraction, multiplication, division, and exponentiation between numbers with an associated error term together with 'normal' floating point numbers without an associated error term. <br>Implement enough functionality to perform the following calculations.
# Given coordinates and their errors:<br>x1 = 100 &plusmn; 1.1<br>y1 = 50 &plusmn; 1.2<br>x2 = 200 &plusmn; 2.2<br>y2 = 100 &plusmn; 2.3<br> if point p1 is located at (x1, y1) and p2 is at (x2, y2); calculate the distance between the two points using the classic Pythagorean formula: <br> <big><big> d = &radic;<span style="text-decoration:overline"> &nbsp; (x1 - x2)² + (y1 - y2)² &nbsp; </span> </big></big>
# Print and display both &nbsp; <big> '''d''' </big> &nbsp; and its error.
 
 
Cookies help us deliver our services. By using our services, you agree to our use of cookies.