-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Conversation
@@ -0,0 +1,165 @@ | |||
{ | |||
"id": "c_math_functions_cheat_sheet", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should replace "c_math_functions_cheat_sheet" with "c_math_functions"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I referred to other cheat sheets for renaming this. I guess this is why it failed in first instance. Now, its failing due to alias and not able to find the cheat sheet page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@122131 the current ID is correct 👍
All cheat sheets should have an ID ending in _cheat_sheet
-- the IA Page ID should match that as well
@Zekeil Please check. I have no idea why Travis Build is not able to locate Cheat Sheet page. |
@manrajgrover Build result says -
Remove |
@sahildua2305 Yes, I have figured that out. I plan to commit it together with other fixes(if any left). Thank you. 😊 |
|
||
"aliases": [ | ||
"c mathematics functions", | ||
"math", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is math
too generic here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, should I remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say yes.
"math.h" | ||
], | ||
|
||
"template_type": "reference", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the type for this be code
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, but it just might look better as a code template. Give it a try and see which one you think looks better! :)
Automated screenshot from [beta.duckduckgo.com](https://beta.duckduckgo.com/?q=C Math Functions Cheat Sheet) |
"val": "Returns the value of 10 raised to the xth power." | ||
}, | ||
{ | ||
"key": "double log(double x)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing a space between 'log' and '(double x)' ?
@manrajgrover this seems ok to merge if you can fix or acknowledge that spacing issue: https://github.com/duckduckgo/zeroclickinfo-goodies/pull/3257/files#r67506047 |
@zekiel Make a quick fix. Please review. 😊 |
{ | ||
"key": "complex double catanh (complex double z)", | ||
"val": "Return the inverse complex hyperbolic tangent of z." | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets remove the periods at end of val fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jophab For every val field? It may look odd for val fields containing two sentences. Let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is what we usually follow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jophab Will make the changes along with few changes being discussed. Thank you for sharing this. 😊
One small suggestion, you can include more functions like ceil, floor, fabs and others that are commonly used. Also, I guess it should trigger on "C++ Math cheat sheet" as well, as the library is shared. |
@nalinbhardwaj Nice catch! I just noticed I missed them because they were mentioned in the next section of source page. Will add them. Also, I have noticed that complex number functions mentioned require <complex.h> to be included. Will fix that. C++ Math library has more functions (included in C++11) which are not part of math.h. I feel we should have a separate IA for it. Please share your view. 😊 |
@manrajgrover Sounds like a good idea but personally most C++ programmers I know use these functions interchangeably(in the sense, they are as frequently used in C++ development as C development). Maybe the C cheat sheet can be edited to include C++ math library, with only a small mark/note mentioning that it is C++11+ specific and not available for C.. |
cc @zekiel Should I add C++ functions in this IA? |
It's probably ok as-is. If someone wants to change it in the future, it won't be difficult. Let me know if you'd like a merge @manrajgrover |
Thanks @manrajgrover, please see my note at #3263. Would you like to update this later or merge as is? |
@zekiel Perfect. I would like to make a few changes before merging. Will push them today. 😄 |
@zekiel This looks fixed now. Please check. 😄 |
Automated screenshot from [beta.duckduckgo.com](https://beta.duckduckgo.com/?q=C Math Functions Cheat Sheet) |
What does your Pull Request do (check all that apply)?
Choose the most relevant items and use the following title template to name
your Pull Request.
New {C Math Functions} Cheat Sheet
New {IA Name} Instant Answer
{IA Name}: Fix {Issue number or one-line description}
{IA Name}: {Description of Improvements}
{GoodieRole/Templates/Tests/Docs}: {Short Description}
Description of changes
This pull request adds C Math Functions Cheatsheet to allow easy access to functions available in math.h library
Which issues (if any) does this fix?
None
People to notify (@mention interested parties)
@zekiel @moollaza
Instant Answer Page: https://duck.co/ia/view/c_math_functions_cheat_sheet
Maintainer: @manrajgrover