mathnet / mathnet-symbolics

Math.NET Symbolics
http://symbolics.mathdotnet.com
MIT License
341 stars 66 forks source link

Support for function Ctg is missing #24

Closed FoggyFinder closed 6 years ago

FoggyFinder commented 7 years ago

It seems that support for function Ctg is missing. I think it makes sense to add it. I can do it, but I would like to know which option is better:

  1. Replacing the function by tg when parsing (so, add ctg to the class Pseudo)
  2. Implement full support
cdrnet commented 7 years ago

I don't think I've heard about ctg and tg functions. What are these about?

FoggyFinder commented 7 years ago

@cdrnet sorry, I meant ctg - cotangents tg - tangents

cdrnet commented 7 years ago

Ah, right. In Numerics we refer to them as tan and cot. Maybe there are different naming schemes?

Of course, I'm fine with adding them. If we add cot (or ctg), we may want to add sec and csc as well to get the full set (cot=1/tan, sec=1/cos, csc=1/sin).

cdrnet commented 7 years ago

So the remaining question is whether they shall be full expressions or just infix parsing magic. I'd vote to implement them fully and then maybe provide a routine later that simplifies all of them to sin and cos (on demand).

FoggyFinder commented 7 years ago

Next week, I'll think how can expand the module Trigonometric, so I will leave the issue open

FoggyFinder commented 6 years ago

https://github.com/mathnet/mathnet-symbolics/pull/46