(41C) Area of Triangle (SSS)
11-12-2018, 02:55 PM (This post was last modified: 11-13-2018 03:49 AM by Albert Chan.)
Post: #9
 Albert Chan Senior Member Posts: 2,680 Joined: Jul 2018
RE: (41C) Area of Triangle (SSS)
(11-10-2018 03:22 PM)Albert Chan Wrote:  If the sides are sorted, a >= b >= c, Kahan's formula is more accurate.
(11-12-2018 01:32 AM)Albert Chan Wrote:  Let y = (c - (a-b))*(c + (a-b)) / 4, then Area Δ = √((ab-y)*y)

Tried all Kahan's example (Table 1) with above Y formula (SSS => area):

(10, 10, 10) => 43.30127019
(100000, 99999.99979. 0.00029) => 9.9999 99989
(100000, 100000, 1.00005) => 52002.50002
(15000, 10000, 5000.000001) => 612.37 24357

(99999.99996, 99999.99994, 0.00003) => 1.1180 33988
(200000, 99999.99999, 99999.99999) => Error
(99999.99996, 94721.35941, 5278.64055) => 0
(200004, 100002, 100002) => 0
(31622.77662, 31622.77661, 0.000023) => 0.3274 90458
(31622.77662, 31622.77661, 0.0155555) => 245.95 40000

Edit: this is the HP-12C code for above tests (order does not matter):
Example: 2 Enter 3 Enter 4 R/S => 2.904737510

Code:
X≤Y X<>Y STO 0 R↓ X≤Y X<>Y STO* 0 R↓ R↓ CLX + - - X<>Y Lst-X + * 4 / RCL 0 X<>Y - Lst-X * √X GTO 00
 « Next Oldest | Next Newest »

 Messages In This Thread (41C) Area of Triangle (SSS) - Gamo - 11-10-2018, 12:20 PM RE: (41C) Area of Triangle (SSS) - Albert Chan - 11-10-2018, 03:22 PM RE: (41C) Area of Triangle (SSS) - Dieter - 11-10-2018, 08:53 PM RE: (41C) Area of Triangle (SSS) - Albert Chan - 11-12-2018 02:55 PM RE: (41C) Area of Triangle (SSS) - Dieter - 11-12-2018, 08:28 PM RE: (41C) Area of Triangle (SSS) - Albert Chan - 11-12-2018, 10:33 PM RE: (41C) Area of Triangle (SSS) - Gamo - 11-11-2018, 05:04 AM RE: (41C) Area of Triangle (SSS) - Dieter - 11-11-2018, 07:53 AM RE: (41C) Area of Triangle (SSS) - Gamo - 11-11-2018, 12:23 PM RE: (41C) Area of Triangle (SSS) - Dieter - 11-11-2018, 04:25 PM RE: (41C) Area of Triangle (SSS) - Albert Chan - 11-12-2018, 01:32 AM RE: (41C) Area of Triangle (SSS) - Albert Chan - 11-16-2018, 03:33 AM RE: (41C) Area of Triangle (SSS) - Albert Chan - 12-04-2019, 03:03 PM

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