[Question]
  [
Output the area \$A\$ of a triangle given its side lengths \$a, b, c\$ as inputs. This can be computed using [Heron's formula](https://en.wikipedia.org/wiki/Heron%27s_formula):
$$ A=\sqrt{s(s-a)(s-b)(s-c)}\textrm{, where } s=\frac{a+b+c}{2}.$$
This can be written in various ways, such as
$$ A= \frac{1}{4}\sqrt{(a+b+c)(-a+b+c)(a-b+c)(a+b-c)}$$
$$ A= \frac{1}{4}\sqrt{(a^2+b^2+c^2)^2-2(a^4+b^4+c^4)}$$
See [Wikipedia](https://en.wikipedia.org/wiki/Heron%27s_formula#Formulation) for more. Related: [What are my dimensions?](https://codegolf.stackexchange.com/q/121811/20260)
The inputs will be three positive integers that [satisfy the triangle inequality](https://codegolf.stackexchange.com/q/199353/20260) and so are sides of a non-degenerate triangle. While the order of the three sides doesn't affect the output, you may not assume they're given in a particular order like sorted. You may take inputs in a list or tuple or the like. Any reasonable float output is fine.
**Test cases**
```
1 1 1 -> 0.4330
3 4 5 -> 6.0000
9 3 7 -> 8.7856
```
  
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 20 bytes
```
N@*Area@*SSSTriangle
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n6Zg@9/PQcuxKDXRQSs4ODikKDMxLz0n9X9AUWZeSbSygq6dQpqCg4OCcqyCmoK@g0J1taGOAgjV6ihUG@somOgomIKYljoKQJ55be1/AA "Wolfram Language (Mathematica) – Try It Online")
Built-in.
---
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 22 bytes
```
((#.#)^2-2#.#^3)^.5/4&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n6Zg@19DQ1lPWTPOSNcISMcZa8bpmeqbqP0PKMrMK4lWVtC1U0hzUI5VUFPQd1CorjbUUQChWh2FamMdBRMdBVMQ01JHAcgzr639DwA "Wolfram Language (Mathematica) – Try It Online")
-2 bytes by porting [loopy walt's Python answer](https://codegolf.stackexchange.com/a/250455/9288).
Takes input as a list. Using the formula \$A= \frac{1}{4}\sqrt{(a^2+b^2+c^2)^2-2(a^4+b^4+c^4)}\$.
---
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 24 bytes
```
1##&@@(+##/2-{0,##})^.5&
```
[Try it online!](https://tio.run/##Fcc7CoAwEEXRrTwYCIrjXxELZZZgLwpBFC1iIelC1h4VbnGu0fbcjbbXpsOBIZRESiRKiPIqdQUT@XjNWhWm57rtTEhHHBABLVDIBc6VjD/PcDWjYbQ/e8Z3nffhBQ "Wolfram Language (Mathematica) – Try It Online")
Based on [chyanog's answer to another challenge](https://codegolf.stackexchange.com/a/11032/9288).
Using the formlula \$A=\sqrt{s(s-a)(s-b)(s-c)}\textrm{, where } s=\frac{a+b+c}{2}\$.
[Answer]
# [Dyalog APL](https://www.dyalog.com/products.htm), ~~16~~ 15 bytes
-1 thanks to @Bubbler.
```
.5*⍨0∘,×.-2÷⍨+/
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70qpTIxJz89PrEgZ8GCpaUlaboWN80e9U191DZBQ89U61HvCoNHHTN0Dk_X0zU6vB3I1dbXPLRCw1ABCDU1jBVMFEw1NSwVjBXMNSG6oYbADAMA)
```
┌──┼───────┐
.5 *⍨  ┌───┼────┐
      0∘, ×.- ┌─┼──┐
              2 ÷⍨ +/
    0∘,          left  argument: input with 0 prepended     0 a b c
          2÷⍨+/  right argument: sum of input divided by 2  (a+b+c)/2 = s
       ×.-       left minus right, then take the product    (0-s)(a-s)(b-s)(c-s)
.5*⍨             square root
```
`(0-s)(a-s)(b-s)(c-s)` is equivalent to `(s-0)(s-a)(s-b)(s-c)` as there is an even number of items being multiplied.
[Answer]
# [K (ngn/k)](https://codeberg.org/ngn/k), 13 bytes
```
{%*/x-/x%2}0,
```
[Try it online!](https://ngn.codeberg.page/k#eJxLs6pW1dKv0NWvUDWqNdDh4kpTMARBIG2sYKJgCqQtgSxzAL4FCGI=)
There is! -2 bytes thanks to @ovs.
```
{%*/x-/x%2}0,  x: a length-3 array containing the three sides
           0,  prepend a 0
       x%2     (0; a/2; b/2; c/2)
    x-/        (0 a b c) - a/2 - b/2 - c/2
 %*/           sqrt(product of the above)
```
---
# [K (ngn/k)](https://codeberg.org/ngn/k), 16 bytes
```
{%-s*/x-s:+/x%2}
```
[Try it online!](https://ngn.codeberg.page/k#eJxLs6pW1S3W0q/QLbbS1q9QNarl4kpTMARBIG2sYKJgCqQtgSxzAOl9CX4=)
~~There must be a shorter way..?~~
```
{%-s*/x-s:+/x%2}  x: a length-3 array containing the three sides
        s:+/x%2   s: half sum of x
      x-          (a-s; b-s; c-s)
  -s*/            -s * (a-s) * (b-s) * (c-s)
 %                sqrt
```
[Answer]
# [J](http://jsoftware.com/), 17 16 bytes
```
2%:[:*/0&,-+/%2:
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/jVStoq209A3UdHS19VWNrP5rcqUmZ@QrpCkYgiCMY6xgomCqAONZAvnmXKkVmSXq6lxgdQq6dgoGeibGxgZcEKVAvpmeARBwgRWD@BZ65hamZv8B "J – Try It Online")
*-1 thanks to [Bubbler's K approach](https://codegolf.stackexchange.com/a/250450/15469)*
The interesting insight (obvious when spelled out but not always when searching for a golf) is: When taking the product of an even number of elements, it is equivalent to taking the product of their negatives.
## original, 17 bytes
```
2%:[:*/+/-:@-0,+:
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/jVStoq209LX1da0cdA10tK3@a3KlJmfkK6QpGIIgjGOsYKJgqgDjWQL55lypFZkl6upcYHUKunYKBnomxsYGXBClQL6ZngEQcIEVg/gWeuYWpmb/AQ "J – Try It Online")
* `0,+:` Double each input and prepend 0
* `+/...-` Subtract each of those from sum of input
* `-:@` And halve each result
* `[:*/` Product
* `2%:` Root
[Answer]
# [Python](https://www.python.org), 47 bytes
```
lambda a,b,c:(4*a*a*b*b-(a*a+b*b-c*c)**2)**.5/4
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vweI025ilpSVpuhY39XMSc5NSEhUSdZJ0kq00TLQSgTBJK0lXA8jQBjGStZI1tbSMgFjPVN8Eom19QVFmXolGmoaljrGOuaYmRHTBAggNAA)
Classic boring solution. There might be a shorter way to express this formula, but I can't find it.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 6 bytes
```
HSạŻP½
```
[Try it online!](https://tio.run/##y0rNyan8/98j@OGuhUd3Bxza@z/aWMdExzT2cPt/AA "Jelly – Try It Online")
Don't ask me why the chaining works...
```
H      # Half of
 S     # The sum of the input
  ạ    # Absolute difference with
   Ż   # The input, with a 0 prepended
    P½ # Take the square root of the product
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 8 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
0šDO;αPt
```
[Try it online](https://tio.run/##yy9OTMpM/f/f4OhCF3/rcxsDSv7/jzbWMdExjQUA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfeV/g6MLXfytz20MKPmv8z862lAHCGN1oo11THRMgbSljrGOeWwsAA).
**Explanation:**
Uses the default formula:
$$s=\frac{0+a+b+c}{2}$$
$$ A=\sqrt{abs(0-s)\times abs(a-s)\times abs(b-s)\times abs(c-s)}$$
```
0š        # Prepend a 0 in front of the (implicit) input-triplet
  D       # Duplicate the list
   O      # Sum the copy
    ;     # Halve the sum
     α    # Get the absolute difference between this sum and the values in the list
      P   # Take the product
       t  # Square root
          # (which is output implicitly as result)
```
[Answer]
# [Python](https://www.python.org) NumPy, 32 bytes
```
lambda v:((v@v-2*v*v)*v@v)**.5/4
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vweI025ilpSVpuhY3FXISc5NSEhXKrDQ0yhzKdI20yrTKNLWATE0tLT1TfROouqS0ovxchbzS3IJKhczcgvyiEoXEoqLESq6Cosy8Eo00DTBPI9pQBwhjNTU10SWMdUx0TLFJWOoY65iDJCA2LVgAoQE)
### Previous [Python](https://www.python.org) NumPy, 33 bytes
```
lambda v:(v@v*v@v-2*v**3@v)**.5/4
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vweI025ilpSVpuhY3FXMSc5NSEhXKrDTKHMq0gFjXSKtMS8vYoUxTS0vPVN8EqjAprSg_VyGvNLegUiEztyC_qEQhsagosZKroCgzr0QjTQPM04g21AHCWE1NTXQJYx0THVNsEpY6xjrmIAmITQsWQGgA)
### Previous [Python](https://www.python.org) NumPy, 36 bytes (@alephalpha)
```
lambda v:(v@v*v@v-2*v**2@v**2)**.5/4
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vweI025ilpSVpuhY3VXISc5NSEhXKrDTKHMq0gFjXSKtMS8vIAURoamnpmeqbQNUmpRXl5yrkleYWVCpk5hbkF5UoJBYVJVZyFRRl5pVopGmAeRrRhjpAGKupqYkuYaxjomOKTcJSx1jHHCQBsWnBAggNAA)
### Previous [Python](https://www.python.org) NumPy, 37 bytes
```
lambda v:((v@v)**2-2*v**2@v**2)**.5/4
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vweI025ilpSVpuhY3VXMSc5NSEhXKrDQ0yhzKNLW0jHSNtMqAlAOIAPL1TPVNoIqT0orycxXySnMLKhUycwvyi0oUEouKEiu5Cooy80o00jTAPI1oQx0gjNXU1ESXMNYx0THFJmGpY6xjDpKA2LRgAYQGAA)
Expects a numpy vector containing the three side lenghts.
[Answer]
# [R](https://www.r-project.org), ~~30~~ 28 bytes
```
\(x)prod(sum(x)/2-c(0,x))^.5
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72waMGiNNulpSVpuhZ7YjQqNAuK8lM0iktzgUx9I91kDQOdCk3NOD1TiJKbXmkayRqGOgogpKmprKBrp2CgZ2JsbMAFkjDWUTDRUTCFSpjpGQABWMJSRwEoZw6VsNAztzA1g5i4YAGEBgA)
Inspired by [@Kevin Cruijssen's 05AB1E answer](https://codegolf.stackexchange.com/a/250460/55372).
---
### [R](https://www.r-project.org), ~~32~~ 30 bytes
*Edit: -2 bytes by looking at [@loopywalt's answer](https://codegolf.stackexchange.com/a/250455/55372).*
```
\(x)((x%*%x)^2-2*x^3%*%x)^.5/4
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72waMGiNNulpSVpuhb7YjQqNDU0KlS1VCs044x0jbQq4owhHD1TfROIopteaRrJGoY6CiCkqamsoGunYKBnYmxswAWSMNZRMNFRMIVKmOkZAAFYwlJHAShnDpWw0DO3MDWDmLhgAYQGAA)
Takes input as a vector of sides.
Uses the formula
$$ A= \frac{1}{4}\sqrt{(a^2+b^2+c^2)^2-2(a^4+b^4+c^4)}$$
with observation that sum of squares of elements from `x` is a dot product of `x` with itself. So with \$x=[a,b,c]\$ and \$y=[a^3,b^3,c^3]\$:
$$ A= \frac{1}{4}\sqrt{(x \cdot x)^2-2(y\cdot x)}$$
[Answer]
# [C (clang)](http://clang.llvm.org/), ~~59~~ 51 bytes
```
#define f(a,b,c)sqrt(4*a*a*b*b-(c=a*a+b*b-c*c)*c)/4
```
[Try it online!](https://tio.run/##bZFtT4MwEMff71NcMEsKKxsT9hScb4yfwi2mLWUSWUFKInHZVxePUVDmCiXH/f53vbsKV6RMHer6LpJxoiTEhFFOha0/ipIEDsOHO9wlYovmpDGFI2x8Z0GdqBKOLFHEhtMIcDWOUurylb3sYQunOQWfwuYcDinvaYCCayp6uqCwMjROM1aCrHIpShm1Cm8a@L5HYTn1cFFYT1frxdIEiEzpEsQbKxz8SvEuizbK2lXP97tq84R7YVH4@@9bw@NynaSZwqi5dANDsgJIU2uiIlkh8kJjPoBOvmQWk65Ke2YcTu8JYTK5qO1LsnZqXfcMs5npXTT7cIB5h/lNLDos/uG2G42C5naBUxD2NZVI@/Heyp8zfcnAuCYSXNA2dmwm9KvMC9TGxBpHFNoN7iOMYxjrncJpD/qjw37osH4KmvZX15y@N0WfR@f6W8QpO@ja/azd9PgD "C (clang) – Try It Online")
*Saved 8 bytes thanks to [jdt](https://codegolf.stackexchange.com/users/41374/jdt)!!!*
[Answer]
# [Fig](https://github.com/Seggan/Fig), \$9\log\_{256}(96)\approx\$ 7.408 bytes
```
mqr-J0xHS
```
[Try it online!](https://fig.fly.dev/#WyJtcXItSjB4SFMiLCJbMyw0LDVdIl0=)
Jelly beats me... again. Takes input as a list of the side lengths.
```
mqr-J0xHS
        S # Sum the lengths
       H  # Halve it
   -      # That ^ minus...
      x   # The input
    J0    # With a 0 prepended
  r       # Product
mq        # Square root
```
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), ~~9~~ 8 bytes
```
∑½₌N-Π*√
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCIiLCLiiJHCveKCjE4tzqAq4oiaIiwiIiwiOSwzLDciXQ==)
*[A 7 byter with `-r`](https://vyxal.pythonanywhere.com/#WyLhuItyIiwiIiwi4oiRwr1+Lc6gKuKImiIsIiIsIjksMyw3Il0=)*
Outputs as a fraction representation. [Try it Online!](https://vyxal.pythonanywhere.com/#WyLhuIsiLCIiLCLiiJHCvSR+Lc6g4oCeKuKImiIsIiIsIjksMyw3Il0=) if you want decimals as output.
Takes the 3 side lengths as a list of numbers.
Quite literal implementation of Heron's formula, with some extra insight from Bubbler's answer.
## Explained
```
∑½₌N-Π*√
∑½       # Half sum of the side lengths
  ₌N-    # Push the half sum negated, as well as each side length minus the half sum
     Π*  # Take the product of the subtracted side lengths and multiply it by the negated half sum
       √ # Take the square root of that
```
[Answer]
# [Haskell](https://www.haskell.org), 38 bytes
```
sqrt.product.(map=<<(-).(/2).sum).(0:)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m708I7E4OzUnZ2W0km6Ec0CAUuzSNAVbhZilpSVpuhY31YoLi0r0CoryU0qTS_Q0chMLbG1sNHQ19TT0jTT1iktzgSwDK02oaqvcxMw8oG6gMt94BY2Cosy8EgU9hTRNhehoQx0FEIrVUYg21lEw0VEwBTEtdRSAPPPYWIgJCxZAaAA)
---
# [Haskell](https://www.haskell.org), 38 bytes
```
sqrt.product.(map.(-).(/2).sum<*>(0:))
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m708I7E4OzUnZ2W0km6Ec0CAUuzSNAVbhZilpSVpuhY31YoLi0r0CoryU0qTS_Q0chML9DR0NfU09I009YpLc2207DQMrDQ1oaqtchMz84C6gcp84xU0Cooy80oU9BTSNBWiow11FEAoVkch2lhHwURHwRTEtNRRAPLMY2MhJixYAKEB)
With the help of [pointfree.io](http://pointfree.io/).
[Answer]
# [MathGolf](https://github.com/maxbergmark/mathgolf/blob/master/math_golf.txt), 9 [bytes](https://github.com/maxbergmark/mathgolf/blob/master/code_page.py)
```
0Γ_Σ½-ε*√
```
I/O as decimals.
[Try it online.](https://tio.run/##y00syUjPz0n7/9/g3OT4c4sP7dU9t1XrUces//8N9QwUoJjLGEibALEpkG0JpEF8cz0DAA)
**Explanation:**
Similar approach as [my 05AB1E answer](https://codegolf.stackexchange.com/a/250460/52210), except with subtract instead of absolute difference, since with four values the negatives balance themselves out anyway.
```
0          # Push a 0
 Γ         # Wrap the top four items into a list (using the three implicit inputs)
  _        # Duplicate this list
   Σ       # Sum
    ½      # Halve
     -     # Subtract it from each value in the list
      ε*   # Product: reduce by multiplication
        √  # Square root
           # (after which the entire stack is output implicitly as result)
```
[Answer]
# [Factor](https://factorcode.org/) + `math.unicode`, ~~36~~ 35 bytes
```
[ dup Σ 2 / dup rot n-v Π * √ ]
```
[Try it online!](https://tio.run/##S0tMLskv@h8a7OnnbqWQnVqUl5qjkJtYkqFXmpeZnJ@SCuZARMpSQWqLIZy00rzkksz8vGKFgqLUkpLKgqLMvBIFay6uagVDMKwFsowVTBRMwSxLINscyPofrZBSWqBwbrGCkYI@mFmUX6KQp1umcG6BgpbCo45ZCrH/S4oyHRT0ihWSc1ITi/4DAA "Factor – Try It Online")
-1 byte because I remembered `√` is 1 byte shorter than `sqrt`.
```
        ! { 3 4 5 }
dup     ! { 3 4 5 } { 3 4 5 }
Σ       ! { 3 4 5 } 12
2       ! { 3 4 5 } 12 2
/       ! { 3 4 5 } 6
dup     ! { 3 4 5 } 6 6
rot     ! 6 6 { 3 4 5 }
n-v     ! 6 { 3 2 1 }
Π       ! 6 6
*       ! 36
√       ! 6.0
```
[Answer]
# [Burlesque](https://github.com/FMNSSun/Burlesque), 15 bytes
```
0+]J++2./?-pdr@
```
[Try it online!](https://tio.run/##SyotykktLixN/V9dUPzfQDvWS1vbSE/fXrcgpcjhf214zn9DPQMFKOYyBtImQGwKZFsCaRDfXM8AAA "Burlesque – Try It Online")
A port of [Kevin Cruijssen's 05AB1E answer](https://codegolf.stackexchange.com/a/250460/91386)
```
0+] # Prepend 0
J   # Duplicate
++  # Sum
2./ # Halve
?-  # Difference with original
pd  # Product
r@  # Square root
```
[Answer]
# [Desmos](https://desmos.com/calculator), 36 bytes
```
f(l)=(total(ll)^2-2l^4.total)^{.5}/4
```
Input is a list of the three side lengths.
[Try It On Desmos!](https://www.desmos.com/calculator/ttfj5rs9mm)
Port of [Steffan's Python answer](https://codegolf.stackexchange.com/a/250449/96039) also gives 36 bytes:
```
f(a,b,c)=(4aabb-(aa+bb-cc)^2)^{.5}/4
```
[Answer]
# [BQN](https://mlochbaum.github.io/BQN/), 14 bytes
```
√·×´+´∘÷⟜2-0⊸∾
```
[Try it at BQN REPL](https://mlochbaum.github.io/BQN/try.html#code=QXJlYSDihpAg4oiawrfDl8K0K8K04oiYw7fin5wyLTDiirjiiL4KQXJlYcKoIOKfqDHigL8x4oC/MSwz4oC/NOKAvzUsOeKAvzPigL834p+p)
```
            0⊸∾     # each element of the argument, prepended by a zero
           -        # subtracted from
    +´∘             # the sum of
       ÷⟜2          # each element of the argument divided by 2
  ×´                # get the product (fold-multiply),
√·                  # and take the square root
```
[Answer]
## JavaScript, 43 bytes (@Steffan)
Ported from [Steffan's Python answer](https://codegolf.stackexchange.com/a/250449) by him:
```
f=
(a,b,c)=>(4*a*a*b*b-(a*a+b*b-c*c)**2)**.5/4
console.log(f(1, 1, 1), 0.4330)
console.log(f(3, 4, 5), 6.0000)
console.log(f(9, 3, 7), 8.7856)
```
## JavaScript, 46 bytes (me)
Boring answer :/ but couldn't think of anything better.
\$A=\sqrt{s(s-a)(s-b)(s-c)}\textrm{, where } s=\frac{a+b+c}{2}\$.
```
f=
(a,b,c,s=(a+b+c)/2)=>(s*(s-a)*(s-b)*(s-c))**.5
console.log(f(1, 1, 1), 0.4330)
console.log(f(3, 4, 5), 6.0000)
console.log(f(9, 3, 7), 8.7856)
```
[Answer]
# x86 32-bit machine code, 33 bytes
```
6A 03 59 D9 E8 D9 EE DC E1 DA 04 8C E2 FB D9 FD 6A 03 59 D9 C0 DA 2C 8C DE CA E2 F7 DE C9 D9 FA C3
```
[Try it online!](https://tio.run/##dVJNj9MwED1nfsVQVMluXUjaRYiGctorAlVIIHV7SB27jeQ6wXaWsFX/OmWcbQvLClmayXy992YUOdlKeTq9rKw0banwvQ9lVb/afYCnKRtiDrSpi4CaUYyFwOg2j07yHO/rqkRlS8ZzKPwe2XLAQM@TpvU7nOXY1A0q2UGiTZn19oGsbzcOfWAZF9GlHEw6T3RVlCXefv20vMXPX5a4Ur4Z34xofA2JqQnJpHFYFkbBMwaTzSP8GY/AepL/oOl9a5rYOr0qODNkfxX/yCPW7y5A4lQA2nYOfEALy9r60J8iyNUaF3iATMQHM3Ej3gh4J2birYBUTOnBMQeIzfuiso/ndFspUO4Kh6MRBfccDpDESpdja321tao8111OImqHrCOeNMcOXyzQVw@q1ixIjq8vAY3zWB4vcEbCk8ZRRrPBUN/ZgcDYverWIkruxtnlY7rmtFAC1/Y7@7GQu8oqlHWp5nHdxBE1e6JrxDXlyxoPlzkcptNvxDNy4zHPj/hjVxmFzEW57J@dOJ0y4l5n2bDCzc@gPO@1Opw8n9G9EhVaZ@kOcITT6ZfUptj602Q/m5Kh/3BBgMr8Bg "C (gcc) – Try It Online")
Uses the `cdecl` calling convention, taking three 32-bit integers on the stack and returning a value on the FPU register stack.
In assembly:
```
f:  push 3; pop ecx     # Set ECX to 3.
    fld1                # Push 1 onto the FPU register stack.
    fldz                # Push 0 onto the FPU register stack.
    fsubr st(1), st(0)  # Change the 1 to 0-1=-1.
l0: fiadd DWORD PTR [esp+4*ecx] # Add an argument to the top value.
    loop l0                     # Loop 3 times, making the top value a+b+c.
    fscale              # Multiply the top value by 2^(value below)=2^-1=1/2.
    push 3; pop ecx     # Set ECX to 3 again.
l1: fld st(0)                   # Duplicate the top value, which is s.
    fisubr DWORD PTR [esp+4*ecx]# Change the top value to a-s or b-s or c-s.
    fmulp st(2), st(0)          # Multiply the third-from-top value
                                # (which was -1) by that and pop it.
    loop l1                     # Loop 3 times.
                        # The FPU register stack is now -(a-s)(b-s)(c-s), s.
    fmulp st(1), st(0)  # Multiply those values and pop, leaving the product.
    fsqrt               # Take the square root.
    ret                 # Return.
```
---
I had another version using SIMD instructions to do multiple calculations at once, but it was longer, at 48 bytes:
```
5A 6A 00 89 E1 F8 C5 F8 5B 01 0F 59 C0 C5 FB 7C C8 C5 F3 7C C9 F3 0F 11 09 D9 01 F5 72 EC D8 C0 D9 C1 DE CA DE E9 D9 FA 58 6A 04 DA 31 58 FF E2
```
```
f:  pop edx
    push 0
    mov ecx, esp
    clc
    vcvtdq2ps xmm0, [ecx]
r:  mulps xmm0, xmm0
    vhaddps xmm1, xmm0, xmm0
    vhaddps xmm1, xmm1, xmm1
    movss [ecx], xmm1
    fld DWORD PTR [ecx]
    cmc
    jc r
    fadd st(0), st(0)
    fld st(1)
    fmulp st(2), st(0)
    fsubp
    fsqrt
    pop eax
    push 4
    fidiv DWORD PTR [ecx]
    pop eax
    jmp edx
```
[Answer]
# Knight, 50 bytes
```
;=x=s-**4=a^P2=b^P2^+a-b^P2 2;W>x=x/+x/s x 2xO/x 4
```
[Try it online!](https://tio.run/##rVlbU9tKEn62f8XgFLZGloMsnK1TNjJFciBFLYEcSDYP4AQhy1i1suyVZC5L2L@e7e65aGSb7Gb38CBpZvr6TU93jwk7t2H441WchslyHO3lxTiev54O6@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YLRIvK6d/5KTA7m4HZ/inT9mamr4RmxSFxdaA5z/RyIGEXqPus09UoEy1A34Vz1unCGeuaxN4vUu9BeqzQ@j6Skt6@mnEV5AS0N3Ql1h6ndsX2Cf/66oGgRXIF7giUYLHEwDdeGaZRFrVyls6hh46TIk7ZffAIuLHxHO6kRXQbZcCzmKdRWsQB3iLgJM/ZfcSmwV0EhFIQkhdsFqRLCJ/H1ziL3t0g4gAFIZEvkwJ/NCDlOuEpko5Jo1SuQGbyaZIV8SjvZUr3ZUM02V6FyqX7eZBgbXwEr9NxEo3ZdWn2tZbyhF@iMTOUlM4MUVino8acyGuS1DZMf9Z5cI@CdaXwYdKr5EW/mhX3mXn498xjgKx9@ZtckwmCfVZpFGnSYUY2RBmu4FQl1xN1AGm3fKg2Rhc0hEOJoTUfz/tsFs3CBYZZyobX@/@vK8M/wZWhcmVrgy@@9EW6sv8y@kLrBpNxeZ9VCDxN4akCurXJznKg3VOZxxSgzWuW6Q992VQb9k1OmUo0//f/hl/mIEOM5h@0@iZ1pc1dpfXLrFtd/uWLjOpty5sM0tUqtxmdCokGJY78CreRJpEDKdptzSZM/gLuiV@9zEaz4h0zexfJdlzt2pHU4N/3@rsGLO/FlcE3Oqy2WYDW70ipvHg4@izsVhraCwH0itDBasnzNpW8Xa77AE9z92jyPzREaBi@cStC3fzrdsjsjTzwELW2u9gkUYMg4l8s0oso2vIkgPZxNAkgSYJnqsOMU1iMx/QjUhAWUKZa22ELe06c4eyFWywK0zUQukH5Q8IsiFNsVlmQ3YYOCbVt@L7j@HMV3S/xXzyWS9ZUr3HPP97U39T/8m8)
This is the elusive "triple Heron" answer:
* Because of the limitations of Knight, this only works for Heronian triangles (triangles with integer sides and area)
* It uses Heron's formula for the area of the triangle
* Because Knight doesn't have square root, I implemented it using Heron's method.
~~(It doesn't work in the TIO because it hasn't implemented the no-op.)~~ It turns out I just misread the spec.
Here's the expanded code:
```
;=a^P2
;=b^P2
;=c^P2
;=s (-(*(*4a) b)(^(+a(-b c)) 2))
;=x s
;WHILE >x (=x(/+x(/s x) 2)) 
  x
OUTPUT /x 4
```
[Answer]
# [Raku](https://raku.org/), 27 bytes
```
{sqrt [*] @_.sum/2 X-0,|@_}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/uriwqEQhWitWwSFer7g0V99IIULXQKfGIb72f3FipYKSSryCrZ1CdZqCSnytkkJafpGCjaECENrpKNgYK5gomIIYlgrGCuZ2/wE "Perl 6 – Try It Online")
`@_` is the array of arguments to the function: *a*, *b*, and *c*. `@_.sum / 2` is half the sum of the arguments, what the problem statement calls *s*. `X-` subtracts the numbers `0` and `|@_`, the flattened arguments, from that number, producing the numbers *s*, *s - a*, *s - b*, and *s - c*. Then `[*]` multiplies them together and `sqrt` takes the square root.
[Answer]
# TI-Basic, 14 bytes
```
√(sum(Ans)/2prod(sum(Ans)/2-Ans
```
or
```
.25√(sum(Ans)prod(sum(Ans)-2Ans
```
Takes input in `Ans` as a list.
[Answer]
# JavaScript, 43 bytes
Tried to beat `43` bytes but got a different form :)
$$
\sqrt{s(s-a)(s-b)(s-c)}
$$
where \$s=\frac{a + b + c}{2}\$ is equal to:
$$
\frac{1}{4}\sqrt{4abd - d^2}
$$
where \$d=(a + b)^2 - c^2\$
```
(a,b,c)=>(4*a*b*(d=(a+b)**2-c*c)-d*d)**.5/4
```
Try it:
```
f=(a,b,c)=>(4*a*b*(d=(a+b)**2-c*c)-d*d)**.5/4
;[
  [1, 1, 1], // 0.4330
  [3, 4, 5], // 6.0000
  [9, 3, 7], // 8.7856
].forEach(([a,b,c])=>console.log(f(a,b,c)))
```
[Answer]
# [lin](https://github.com/molarmanful/lin), 25 bytes
```
.+ \+ `/2/.~0' - \* `/.5^
```
[Try it here!](https://replit.com/@molarmanful/try-lin)
For testing purposes (use `-i` flag if running locally):
```
[1 1 1] ;
.+ \+ `/2/.~0' - \* `/.5^
```
## Explanation
Prettified code:
```
.+ \+ `/ 2/.~ 0' - \* `/ .5^
```
* `.+ \+ `/ 2/` duplicate, half-sum of input
* `.~ 0'` swap, append 0
* `- \* `/ .5^` vector subtract, product, square root
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 11 bytes
```
Ｉ₂Π⁻⊘Σθ⊞Ｏθ⁰
```
[Try it online!](https://tio.run/##HcHBCsIwDADQX@kxhQqCBxGPXrwMy3ocO4SusEG32DTZ70fwvbwiZ8JqFnk7BF7YBVJT5DISCUSmRbPAsB3a4Y31LAsk3aF5H1zUvn6@hVGIoQV39X9Ps2l6BHcL7j7PdjnrDw "Charcoal – Try It Online") Link is to verbose version of code. Takes input as an array. Explanation:
```
      θ     Input array
     Σ      Summed
    ⊘       Halved
   ⁻        Vectorised subtract
          ⁰ Literal integer `0`
       ⊞Ｏ   Appended to
         θ  Input array
  Π         Take the product
 ₂          Take the square root
Ｉ           Cast to string
            Implicitly print
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 44 bytes
```
->a,b,c{(4*a*a*b*b-(a*a+b*b-c*c)**2)**0.5/4}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf1y5RJ0knuVrDRCsRCJO0knQ1gAxtECNZK1lTS8sIiA30TPVNav8XKKRFG@oAYSwXiGmsY6JjCmFa6hjrmMf@BwA "Ruby – Try It Online")
# [Ruby](https://www.ruby-lang.org/), 45 bytes
```
->a{a.inject(s=a.sum/2.0){|p,i|p*(s-i)}**0.5}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf1y6xOlEvMy8rNblEo9g2Ua@4NFffSM9As7qmQCezpkBLo1g3U7NWS8tAz7T2f4FCWnS0oQ4QxsZygTnGOiY6pjCOpY6xjnls7H8A "Ruby – Try It Online")
[Answer]
# [Perl 5](https://www.perl.org/) `-MList::Util=product,sum -pal`, 37 bytes
```
$_=sqrt product map{sum(@F)/2-$_}0,@F
```
[Try it online!](https://tio.run/##K0gtyjH9/18l3ra4sKhEoaAoP6U0uUQhN7Ggurg0V8PBTVPfSFclvtZAx8Ht/39DBSDkMlYwUTDlslQwVjD/l19QkpmfV/xf19dUz8DQAEj7ZBaXWFmFlmTm2EJN0wGa9F@3IDEHAA "Perl 5 – Try It Online")
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), ~~14~~ 13 bytes
```
@*F-LcsQ2+QZ2
```
[Try it online!](https://tio.run/##K6gsyfj/30HLTdcnuTjQSDswyuj//2hDHQUQigUA "Pyth – Try It Online")
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), 52 bytes
```
(a,b,c)=>Math.Sqrt((a-(a=(a+b+c)/2))*(b-a)*(c-a)*-a)
```
[Try it online!](https://tio.run/##bYyxCsJAEERr8xVb7pqNolFEYlLaCYKlWOytCQnIBS8XLcRvPxNIKcO8mWZGu0S7Jhx7q4d725tHyfA/C6ggDyhsWCkvTuLrxeXpPKIkKDlKbGKl5ZpojiaRgTpycMiiqnWlaI0vcTBdQGPBlu/r7YMrHkQMmPKGt2PZc8o7@lI0O7vGeqymEWXhBw "C# (Visual C# Interactive Compiler) – Try It Online")
]