sec & csc support
I would love this for my math classes!
Sounds good. Unfortunately, sec is a reserved keyword (for second). Apart from this, we could easily add this to purescript-units and (subsequently) to Insect.
awesome!
Note that you also use insect to define the functions yourself:
secant(x)=1/cos(x)
cosecant(x)=1/sin(x)
Should I add csc and sec to Quantities before adding them to Insect, seeing as that's where the whole bunch of trigonometric functions are?
Should I add
cscandsectoQuantitiesbefore adding them to Insect, seeing as that's where the whole bunch of trigonometric functions are?
yes, that would be great. Maybe let's directly name them secant/cosecant to avoid the clash with sec?
While I can understand the rationale for doing that in Insect, I don't see a reason to not use the abbreviated names in purescript-quantities, because all the unit names there are spelled out fully, and it would be inconsistent with all the other abbreviated trigonometric function names in purescript-quantities.
Another thing, do we want to add csc to Insect? The clash applies only to secant and second, not cosecant.
While I can understand the rationale for doing that in Insect, I don't see a reason to not use the abbreviated names in
purescript-quantities, because all the unit names there are spelled out fully, and it would be inconsistent with all the other abbreviated trigonometric function names inpurescript-quantities.
Ok, agreed!
Another thing, do we want to add
cscto Insect? The clash applies only tosecantandsecond, notcosecant.
Hmm. I don't like that it's inconsistent. But I'm fine with adding csc. Maybe we could simply add cosecant as well. And for secant, we simply omit the short version.
Another option popped into my mind, which is to add the full names for all trigonometric functions besides the abbreviated ones (e.g. sine and cosine), sans sec of course. So basically, our options now are:
- Add
cscandsecantonly - Add
csc,cosecant, andsecant - Add full names for all trigonmetric functions (including
cosecantandsecant), but don't addsec
Naturally, no option is completely consistent, so which one to choose is subjective. What do you think?
Thanks for writing this up. I think I would vote for option two:
Add
csc,cosecant, andsecant
Adding full names for all trig. functions is an interesting idea, but I have never seen someone use cosine(…). On the other hand, for those more exotic variants, it might be nice to write them out completely to make sure that Insects csc is really the function that I'm looking for (cosecant).
I also think option two is the best, so I guess I'll go ahead with that unless somebody brings up a case for another option.