Skip to main content
deleted 117 characters in body
Source Link
Okx
  • 16.4k
  • 5
  • 43
  • 113

05AB1E, 1818 16 bytes

-2 bytes thanks to Erik the Outgolfer

‚©nO;t®O;®Pt2®zOnO;t¹O;¹Pt2¹zO/O

Explanation:

‚©                    Pair the input a, b into [a, b] and store it in the registry (without popping)
  nO;t                Root mean square
  n                    Raise [a, b] to [a ** 2, b ** 2]
   O                   Sum
    ;                  Half
     t                 Square root
      ®O;¹O;             Arithmetic mean
      ®¹                Retrieve stored [a, b]
       O               Sum
        ;              Half
         ®Pt¹Pt          Geometric mean
         ®¹             Retrieve stored [a, b]
          P            Product
           t           Square root
            2®zO2¹zO/     Harmonic mean
             ®¹         Retrieved stored [a, b]
              z        Vectorised inverse to [1 / a, 1 / b]
               O       Sum
            2   /      Get 2 divided by the sum
                 O    Sum of all elements in stack

Try it online!

05AB1E, 18 bytes

‚©nO;t®O;®Pt2®zO/O

Explanation:

‚©                    Pair the input a, b into [a, b] and store it in the registry (without popping)
  nO;t                Root mean square
  n                    Raise [a, b] to [a ** 2, b ** 2]
   O                   Sum
    ;                  Half
     t                 Square root
      ®O;             Arithmetic mean
      ®                Retrieve stored [a, b]
       O               Sum
        ;              Half
         ®Pt          Geometric mean
         ®             Retrieve stored [a, b]
          P            Product
           t           Square root
            2®zO/     Harmonic mean
             ®         Retrieved stored [a, b]
              z        Vectorised inverse to [1 / a, 1 / b]
               O       Sum
            2   /      Get 2 divided by the sum
                 O    Sum of all elements in stack

Try it online!

05AB1E, 18 16 bytes

-2 bytes thanks to Erik the Outgolfer

nO;t¹O;¹Pt2¹zO/O

Explanation:

nO;t                Root mean square
n                    Raise [a, b] to [a ** 2, b ** 2]
 O                   Sum
  ;                  Half
   t                 Square root
    ¹O;             Arithmetic mean
    ¹                Retrieve stored [a, b]
     O               Sum
      ;              Half
       ¹Pt          Geometric mean
       ¹             Retrieve stored [a, b]
        P            Product
         t           Square root
          2¹zO/     Harmonic mean
           ¹         Retrieved stored [a, b]
            z        Vectorised inverse to [1 / a, 1 / b]
             O       Sum
          2   /      Get 2 divided by the sum
               O    Sum of all elements in stack

Try it online!

added 967 characters in body
Source Link
Okx
  • 16.4k
  • 5
  • 43
  • 113

05AB1E, 18 bytes

‚©nO;t®O;®Pt2®zO/O

Explanation:

‚©                    Pair the input a, b into [a, b] and store it in the registry (without popping)
  nO;t                Root mean square
  n                    Raise [a, b] to [a ** 2, b ** 2]
   O                   Sum
    ;                  Half
     t                 Square root
      ®O;             Arithmetic mean
      ®                Retrieve stored [a, b]
       O               Sum
        ;              Half
         ®Pt          Geometric mean
         ®             Retrieve stored [a, b]
          P            Product
           t           Square root
            2®zO/     Harmonic mean
             ®         Retrieved stored [a, b]
              z        Vectorised inverse to [1 / a, 1 / b]
               O       Sum
            2   /      Get 2 divided by the sum
                 O    Sum of all elements in stack

Try it online!

05AB1E, 18 bytes

‚©nO;t®O;®Pt2®zO/O

Try it online!

05AB1E, 18 bytes

‚©nO;t®O;®Pt2®zO/O

Explanation:

‚©                    Pair the input a, b into [a, b] and store it in the registry (without popping)
  nO;t                Root mean square
  n                    Raise [a, b] to [a ** 2, b ** 2]
   O                   Sum
    ;                  Half
     t                 Square root
      ®O;             Arithmetic mean
      ®                Retrieve stored [a, b]
       O               Sum
        ;              Half
         ®Pt          Geometric mean
         ®             Retrieve stored [a, b]
          P            Product
           t           Square root
            2®zO/     Harmonic mean
             ®         Retrieved stored [a, b]
              z        Vectorised inverse to [1 / a, 1 / b]
               O       Sum
            2   /      Get 2 divided by the sum
                 O    Sum of all elements in stack

Try it online!

Source Link
Okx
  • 16.4k
  • 5
  • 43
  • 113

05AB1E, 18 bytes

‚©nO;t®O;®Pt2®zO/O

Try it online!