(41C) Area of Triangle (SSS)

11122018, 10:33 PM
(This post was last modified: 11122018 11:31 PM by Albert Chan.)
Post: #11




RE: (41C) Area of Triangle (SSS)
(11122018 08:28 PM)Dieter Wrote: Both the formula and the program look good. I had picked the more accurate version of Law of Cosine for a reason: c² = (ab)² + 4ab*sin(C/2)² If c is the shortest side, b/a > 50%. Thus, ab is exact. (even if exponents don't match, say a 2 decimals setup: 1.2  0.72 = 0.48) c²  (ab)² may suffered from subtraction cancellation. Thus, y = (c  (ab))*(c + (ab)) / 4 Bad errors occurred when triangle is needlelike, possibly even flattened. Since c and ab about the same size, for needlelike triangle, y is still relatively accurate. Area Δ = √((aby)*y), with two terms growing opposite way. So, slight errors in y tended to cancel each other somewhat (if y is big) ... Examples can't validate formula, but if carried out calculations by hand, precision is preserved. Example: (a,b,c) = (100000, 99999.99979, 0.00029) ab = 0.00021 (exact) y = 0.00008 * 0.00050 / 4 = 1e8 (exact) Area Δ = √((aby)*y) = √((99999 99979  1e8) * 1e8) ~ √(99.999 99979) = 9.9999 99989 

« Next Oldest  Next Newest »

Messages In This Thread 
(41C) Area of Triangle (SSS)  Gamo  11102018, 12:20 PM
RE: (41C) Area of Triangle (SSS)  Albert Chan  11102018, 03:22 PM
RE: (41C) Area of Triangle (SSS)  Dieter  11102018, 08:53 PM
RE: (41C) Area of Triangle (SSS)  Albert Chan  11122018, 02:55 PM
RE: (41C) Area of Triangle (SSS)  Dieter  11122018, 08:28 PM
RE: (41C) Area of Triangle (SSS)  Albert Chan  11122018 10:33 PM
RE: (41C) Area of Triangle (SSS)  Gamo  11112018, 05:04 AM
RE: (41C) Area of Triangle (SSS)  Dieter  11112018, 07:53 AM
RE: (41C) Area of Triangle (SSS)  Gamo  11112018, 12:23 PM
RE: (41C) Area of Triangle (SSS)  Dieter  11112018, 04:25 PM
RE: (41C) Area of Triangle (SSS)  Albert Chan  11122018, 01:32 AM
RE: (41C) Area of Triangle (SSS)  Albert Chan  11162018, 03:33 AM
RE: (41C) Area of Triangle (SSS)  Albert Chan  12042019, 03:03 PM

User(s) browsing this thread: 1 Guest(s)