« first day (2079 days earlier)      last day (576 days later) » 

jwc
4:34 PM
@x
@xpqz I just realized that you are the author!
 
 
1 hour later…
5:46 PM
produced this function lcosc←{(*∘0.5)(+.×⍨⍵)-(2××/⍵)×2○d ⍺} for the law of cosines. I'm happy with it because it works. But was wondering about ways to improve it. The d converts degrees to radians.
law of cosines is c=square root(a2+b2﹣2abcosγ)
⎕←lcosc←{(*∘0.5)(+.×⍨⍵)-(2××/⍵)×2○d ⍺}
 
@Jeremygee Did you forget to add backticks around your code (`⎕←code`)? You can edit your message and I will edit my reply.
 
⎕←lcosc←{(*∘0.5)(+.×⍨⍵)-(2××/⍵)×2○d ⍺}
 
@Jeremygee (1 trailing line)
{(*∘0.5)(+.×⍨⍵)-(2××/⍵)×2○d ⍺}

␄
 
⎕←82.4 lcosc 388 212 ⋄ lcosc←{(*∘0.5)(+.×⍨⍵)-(2××/⍵)×2○d ⍺}
 
@Jeremygee
VALUE ERROR: Undefined name: lcosc
      ⎕←82.4 lcosc 388 212 ⋄ lcosc←{(*∘0.5)(+.×⍨⍵)-(2××/⍵)×2○d ⍺}
           ∧
 
5:57 PM
sorry ignore this. I'm just thinking outloud.
 
6:54 PM
@jwc I am :)
 
7:36 PM
@Jeremygee You need to define the function before (i.e. on the left of ) you use it.
@Jeremygee Looks good to me, although my personal style is to write √ as 2*∘÷⍨ or 0.5*⍨ instead of (*∘0.5)
 
8:02 PM
@Adám thanks! Challenged by making dfns. Working on it.
 
You could also "break out" the from its parenthesis, to lessen human mental stack when reading.
 
made those changes. helpful for readability.
thanks
 
 
2 hours later…
10:38 PM
the Kinetic Energy Intercept (KEI) program - funny coincidence
 

« first day (2079 days earlier)      last day (576 days later) »