gmt
gmt copied to clipboard
Improve description of table operators in gmt/grd math modules
As I have suggested here I want to improve the description of the math operators. I will work on this. It can wait until gmt 6.5.
I open this issue so you know I am working on it, and more important to ask some doubts. Any suggestions is welcome.
I am planning to:
- Improve the description of the
Return
column - Add a link to DLMF for complex functions.
I am thinking of adding a new column with the type of formula (like trigonometric, logic, basic math, statistical, etc). I think it would help the users.
Is there any way to add a filter in the table (so I could ask to only show the trigonometric formulas) or to sort it?
Is there any way to add a filter in the table (so I could ask to only show the trigonometric formulas) or to sort it?
Sphinx doesn't support it, but it's possible to enable filtering/sorting with this extension.
I create a table in google docs with the info of the table.
There I add a new column with the Type of Function
. For some cells (highligthed in color), I am not sure what to put (e.g. Psi (or Digamma) of A). I also add a more detailed version for the return
column to replace the orignal. There is also a column with wikepedia and https://dlmf.nist.gov/idx/ links but that is WIP.
Let me know if you prefer that I post my doubts directly here.
Nice start, @Esteban82. I have some comments:
- I would lump probability distributions, statistical, combinatorics, LMSSCL etc etc into a single category: Probability
- All the crazy math functions (Bessel, Kelvin, Dilog, Legendre etc) I would place in category: Special Functions (that is how they are often referred to in math books, for instance).
- I think some of the BIT operators should go into Logic (AND, NOT, OR, TEST, XOR) and the rest (LEFT, RIGHT) goes into Arithmetic. Computer Programming is too specific.
- What you have as conversion and stack operations,
Ax = b
solvers, etc I would lump together into Special Operators
That would give these six categories
- Arithmetic
- Calculus
- Probability
- Logic
- Special Functions
- Special Operators
This is usually when we dust off @WalterHFSmith to see if he can come up with better categories!
Ok. I will wait if Walter has something to add.
I replied August 12 that it sounded good to me. Did you not get that email?
W
On Aug 17, 2022, at 8:29 AM, Federico Esteban @.***> wrote:
Ok. I will wait if Walter has something to add.
— Reply to this email directly, view it on GitHub https://github.com/GenericMappingTools/gmt/issues/6778#issuecomment-1217945452, or unsubscribe https://github.com/notifications/unsubscribe-auth/APUT6GIKVMAJWPATFAFIZNDVZTLL5ANCNFSM5YHVPWIA. You are receiving this because you were mentioned.
Sounds good to me!
W
On Aug 12, 2022, at 4:22 AM, Paul Wessel @.***> wrote:
Nice start, @Esteban82 https://github.com/Esteban82. I have some comments:
I would lump probability distributions, statistical, combinatorics, LMSSCL etc etc into a single category: Probability All the crazy math functions (Bessel, Kelvin, Dilog, Legendre etc) I would place in category: Special Functions (that is how they are often referred to in math books, for instance). I think some of the BIT operators should go into Logic (AND, NOT, OR, TEST, XOR) and the rest (LEFT, RIGHT) goes into Arithmetic. Computer Programming is too specific. What you have as conversion and stack operations, Ax = b solvers, etc I would lump together into Special Operators That would give these six categories
Arithmetic Calculus Probability Logic Special Functions Special Operators This is usually when we dust off @WalterHFSmith https://github.com/WalterHFSmith to see if he can come up with better categories!
— Reply to this email directly, view it on GitHub https://github.com/GenericMappingTools/gmt/issues/6778#issuecomment-1212856953, or unsubscribe https://github.com/notifications/unsubscribe-auth/APUT6GP5GGGK4IV2DFQLMIDVYYCU5ANCNFSM5YHVPWIA. You are receiving this because you were mentioned.
Finally I got some time to do this.
I have a doubt:
- sinc is a special function?
Hm, good question. I think so even though it is pretty simple.
What is “special” about sinc(x) is that its value at x=0 is defined by taking a limit and using l’Hopital’s rule. So I think this will not be easy to compute accurately for very small x, unless you are careful to compute it by its power series and decide at what value of x should you switch from computing sin(pi x)/(pi x) to the power series.
Just my guess.
W
On Nov 21, 2022, at 8:50 AM, Paul Wessel @.***> wrote:
Hm, good question. I think so even though it is pretty simple.
— Reply to this email directly, view it on GitHub https://github.com/GenericMappingTools/gmt/issues/6778#issuecomment-1322096134, or unsubscribe https://github.com/notifications/unsubscribe-auth/APUT6GOM3WAQOG5F32SVEVLWJN44FANCNFSM5YHVPWIA. You are receiving this because you were mentioned.
Thanks Walter.
Fortunately the series is an alternating one, so you know the error is smaller than the first term you skip.
On Nov 21, 2022, at 10:35 AM, Federico Esteban @.***> wrote:
Thanks Walter.
— Reply to this email directly, view it on GitHub https://github.com/GenericMappingTools/gmt/issues/6778#issuecomment-1322246825, or unsubscribe https://github.com/notifications/unsubscribe-auth/APUT6GJKCODOTFIZQCRG3E3WJOJF7ANCNFSM5YHVPWIA. You are receiving this because you were mentioned.