Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f9f52d0

Browse filesBrowse files
committed
Add two arg functions to cwrapper such as polygamma
1 parent ed7479b commit f9f52d0
Copy full SHA for f9f52d0

2 files changed

+27-6Lines changed: 27 additions & 6 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎symengine/cwrapper.cpp‎

Copy file name to clipboardExpand all lines: symengine/cwrapper.cpp
+15-6Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -610,12 +610,21 @@ IMPLEMENT_ONE_ARG_FUNC(cbrt)
610610
IMPLEMENT_ONE_ARG_FUNC(exp)
611611
IMPLEMENT_ONE_ARG_FUNC(log)
612612

613-
CWRAPPER_OUTPUT_TYPE basic_atan2(basic s, const basic a, const basic b)
614-
{
615-
CWRAPPER_BEGIN
616-
s->m = SymEngine::atan2(a->m, b->m);
617-
CWRAPPER_END
618-
}
613+
#define IMPLEMENT_TWO_ARG_FUNC(func) \
614+
CWRAPPER_OUTPUT_TYPE basic_##func(basic s, const basic a, const basic b) \
615+
{ \
616+
CWRAPPER_BEGIN \
617+
s->m = SymEngine::func(a->m, b->m); \
618+
CWRAPPER_END \
619+
}
620+
621+
IMPLEMENT_TWO_ARG_FUNC(atan2)
622+
IMPLEMENT_TWO_ARG_FUNC(zeta)
623+
IMPLEMENT_TWO_ARG_FUNC(kronecker_delta)
624+
IMPLEMENT_TWO_ARG_FUNC(lowergamma)
625+
IMPLEMENT_TWO_ARG_FUNC(uppergamma)
626+
IMPLEMENT_TWO_ARG_FUNC(beta)
627+
IMPLEMENT_TWO_ARG_FUNC(polygamma)
619628

620629
#define IMPLEMENT_STR_CONVERSION(name, func) \
621630
char *basic_##name(const basic s) \
Collapse file

‎symengine/cwrapper.h‎

Copy file name to clipboardExpand all lines: symengine/cwrapper.h
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,18 @@ CWRAPPER_OUTPUT_TYPE basic_log(basic s, const basic a);
346346

347347
//! Assigns s = atan2(a, b).
348348
CWRAPPER_OUTPUT_TYPE basic_atan2(basic s, const basic a, const basic b);
349+
//! Assigns s = zeta(a, b).
350+
CWRAPPER_OUTPUT_TYPE basic_zeta(basic s, const basic a, const basic b);
351+
//! Assigns s = kronecker_delta(a, b).
352+
CWRAPPER_OUTPUT_TYPE basic_kronecker_delta(basic s, const basic a, const basic b);
353+
//! Assigns s = lowergamma(a, b).
354+
CWRAPPER_OUTPUT_TYPE basic_lowergamma(basic s, const basic a, const basic b);
355+
//! Assigns s = uppergamma(a, b).
356+
CWRAPPER_OUTPUT_TYPE basic_uppergamma(basic s, const basic a, const basic b);
357+
//! Assigns s = beta(a, b).
358+
CWRAPPER_OUTPUT_TYPE basic_beta(basic s, const basic a, const basic b);
359+
//! Assigns s = polygamma(a, b).
360+
CWRAPPER_OUTPUT_TYPE basic_polygamma(basic s, const basic a, const basic b);
349361

350362
//! Returns a new char pointer to the string representation of s.
351363
char *basic_str(const basic s);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.