Skip to main content
added 26 characters in body
Source Link
Etheryte
  • 3.9k
  • 2
  • 22
  • 26

All we have to do to overcome this minor nuisance is approximate arccosineapproximate arccosine and we're good to go!

All we have to do to overcome this minor nuisance is approximate arccosine and we're good to go!

All we have to do to overcome this minor nuisance is approximate arccosine and we're good to go!

added 96 characters in body
Source Link
Etheryte
  • 3.9k
  • 2
  • 22
  • 26

Japt, 5555 50 bytes

MsU *MsW +McU *McW *Mc(X*McX-V
ToMP,1ToMP1/7l¹ñ@McX aUÃv *#ۉ*#­7
MsU *MsW +McU *McW *Mc(X*McX-V
MsU                        // Take the sine of the first input and
    *MsW...                // multiply by the cos of the second one etc.
ToMP,1ToMP1/7l¹ñ@McX aUÃv *#ۉ*#­7
T                        // Take 0
 o                       // and create a range from it
  MP                     // to π
    ,1/7l¹               // with resolution 1/7!.
          ñ@             // Sort this range so that
            McX          // the cosine of a given value
                aU       // is closest to U, e.g. the whole trig lot
                         // we want to take arccosine of.
                  Ã      // When that's done,
                   v     // get the first element
                     *#ۉ*#­7 // and multiply it by 1737, returning implicitly.

Try it online! Shaved off five bytes thanks to Oliver.

Try it online!

Japt, 55 bytes

MsU *MsW +McU *McW *Mc(X-V
ToMP,1/7l¹ñ@McX aUÃv *#ۉ
MsU *MsW +McU *McW *Mc(X-V
MsU                        // Take the sine of the first input and
    *MsW...                // multiply by the cos of the second one etc.
ToMP,1/7l¹ñ@McX aUÃv *#ۉ
T                        // Take 0
 o                       // and create a range from it
  MP                     // to π
    ,1/7l¹               // with resolution 1/7!.
          ñ@             // Sort this range so that
            McX          // the cosine of a given value
                aU       // is closest to U, e.g. the whole trig lot
                         // we want to take arccosine of.
                  Ã      // When that's done,
                   v     // get the first element
                     *#ۉ // and multiply it by 1737, returning implicitly.

Try it online!

Japt, 55 50 bytes

MsU *MsW +McU *McW *McX-V
ToMP1/7l¹ñ@McX aUÃv *#­7
MsU *MsW +McU *McW *McX-V
MsU                        // Take the sine of the first input and
    *MsW...                // multiply by the cos of the second one etc.
ToMP1/7l¹ñ@McX aUÃv *#­7
T                       // Take 0
 o                      // and create a range from it
  MP                    // to π
    1/7l¹               // with resolution 1/7!.
         ñ@             // Sort this range so that
           McX          // the cosine of a given value
               aU       // is closest to U, e.g. the whole trig lot
                        // we want to take arccosine of.
                 Ã      // When that's done,
                  v     // get the first element
                    *#­7 // and multiply it by 1737, returning implicitly.

Shaved off five bytes thanks to Oliver.

Try it online!

added 6 characters in body
Source Link
Etheryte
  • 3.9k
  • 2
  • 22
  • 26
ToMP,1/7l¹ñ@McX aUÃv *#ۉ
T                        // Take 0
 o                       // and create a range from it, to
  MP                     // to π
    ,1/7l¹               // with resolution 1/7!.
          ñ@             // Sort this range so that
            McX          // the cosine of a given value
                aU       // is closest to U, e.g. the whole trig lot
                         // we want to take arccosine of.
                  Ã      // When that's done,
                   v     // get the first element
                     *#ۉ // and multiply it by 1737, returning implicitly.

We could've used any large number for the generator resolution, manual testing showed 7! is sufficiently large while being reasonably fast.

ToMP,1/7l¹ñ@McX aUÃv *#ۉ
T                        // Take 0
 o                       // and create a range from it, to
  MP                     // π
    ,1/7l¹               // with resolution 1/7!.
          ñ@             // Sort this range so that
            McX          // the cosine of a given value
                aU       // is closest to U, e.g. the whole trig lot
                         // we want to take arccosine of.
                  Ã      // When that's done,
                   v     // get the first element
                     *#ۉ // and multiply it by 1737, returning implicitly.

We could've used any large number for the generator resolution, manual testing showed 7! is sufficiently large while reasonably fast.

ToMP,1/7l¹ñ@McX aUÃv *#ۉ
T                        // Take 0
 o                       // and create a range from it
  MP                     // to π
    ,1/7l¹               // with resolution 1/7!.
          ñ@             // Sort this range so that
            McX          // the cosine of a given value
                aU       // is closest to U, e.g. the whole trig lot
                         // we want to take arccosine of.
                  Ã      // When that's done,
                   v     // get the first element
                     *#ۉ // and multiply it by 1737, returning implicitly.

We could've used any large number for the generator resolution, manual testing showed 7! is sufficiently large while being reasonably fast.

deleted 22 characters in body
Source Link
Etheryte
  • 3.9k
  • 2
  • 22
  • 26
Loading
deleted 13 characters in body
Source Link
Etheryte
  • 3.9k
  • 2
  • 22
  • 26
Loading
deleted 261 characters in body
Source Link
Etheryte
  • 3.9k
  • 2
  • 22
  • 26
Loading
deleted 371 characters in body
Source Link
Etheryte
  • 3.9k
  • 2
  • 22
  • 26
Loading
added 1 character in body
Source Link
Etheryte
  • 3.9k
  • 2
  • 22
  • 26
Loading
Source Link
Etheryte
  • 3.9k
  • 2
  • 22
  • 26
Loading