{"id":164909,"date":"2023-03-17T08:58:55","date_gmt":"2023-03-17T08:58:55","guid":{"rendered":"\/knowledge\/forums\/topic\/how-do-i-include-non-ansi-functions-from-in-compiled-udfs\/"},"modified":"2023-07-31T12:26:31","modified_gmt":"2023-07-31T12:26:31","slug":"how-do-i-include-non-ansi-functions-from-in-compiled-udfs","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-do-i-include-non-ansi-functions-from-in-compiled-udfs\/","title":{"rendered":"How do I include non-ansi functions from <math.h> in compiled UDFs?"},"content":{"rendered":"<p>The Fluent makefile uses the &#8216;ansi&#8217; flag which excludes certain library functions, e.g. the error function in <math.h>. You will get a compiler warning \u00e2\u20ac\u0153implicit declaration\u00e2\u20ac\u009d if you try to use such a function. You will end up with a function returning int, regardless of the definition (in most cases total nonsense). You can use these functions by declaring them explicitly in your source file: double erf(double). This will lead to a useable error function (of course, it has to be defined in your library, which is platform dependent).<\/p>\n","protected":false},"template":"","class_list":["post-164909","topic","type-topic","status-publish","hentry","topic-tag-4424","topic-tag-fluent","topic-tag-fluid-dynamics","topic-tag-general","topic-tag-general-fluent"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_wp_page_template":["default"],"_bbp_last_active_time":["3-15-2023  20:20:50"],"_bbp_forum_id":["27796"],"_bbp_author_ip":["23.56.168.180"],"_btv_view_count":["228"],"siebel_km_number":["873"],"product_version":["16"],"km_published_date":["2003-10-06T00:00:00.000Z"],"family":["Fluid Dynamics"],"application_name":["FLUENT"]},"test":"articlesansys-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/164909","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/164909\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=164909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}