{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,2,24]],"date-time":"2026-02-24T18:44:56Z","timestamp":1771958696385,"version":"3.50.1"},"reference-count":67,"publisher":"Association for Computing Machinery (ACM)","issue":"POPL","license":[{"start":{"date-parts":[[2024,1,2]],"date-time":"2024-01-02T00:00:00Z","timestamp":1704153600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"NSF","award":["2119939"],"award-info":[{"award-number":["2119939"]}]},{"DOI":"10.13039\/100000005","name":"DOD U.S. Department of Defense","doi-asserted-by":"publisher","award":["10061193"],"award-info":[{"award-number":["10061193"]}],"id":[{"id":"10.13039\/100000005","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2024,1,2]]},"abstract":"<jats:p>\n            Achieving speed and accuracy for math library functions like\n            <jats:monospace>exp<\/jats:monospace>\n            ,\n            <jats:monospace>sin<\/jats:monospace>\n            , and\n            <jats:monospace>log<\/jats:monospace>\n            is difficult. This is because low-level implementation languages like C do not help math library developers catch mathematical errors, build implementations incrementally, or separate high-level and low-level decision making. This ultimately puts development of such functions out of reach for all but the most experienced experts. To address this, we introduce MegaLibm, a domain-specific language for implementing, testing, and tuning math library implementations. MegaLibm is safe, modular, and tunable. Implementations in MegaLibm can automatically detect mathematical mistakes like sign flips via semantic wellformedness checks, and components like range reductions can be implemented in a modular, composable way, simplifying implementations. Once the high-level algorithm is done, tuning parameters like working precisions and evaluation schemes can be adjusted through orthogonal tuning parameters to achieve the desired speed and accuracy. MegaLibm also enables math library developers to work interactively, compiling, testing, and tuning their implementations and invoking tools like Sollya and type-directed synthesis to complete components and synthesize entire implementations. MegaLibm can express 8 state-of-the-art math library implementations with comparable speed and accuracy to the original C code, and can synthesize 5 variations and 3 from-scratch implementations with minimal guidance.\n          <\/jats:p>","DOI":"10.1145\/3632874","type":"journal-article","created":{"date-parts":[[2024,1,5]],"date-time":"2024-01-05T20:48:51Z","timestamp":1704487731000},"page":"942-969","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":6,"title":["Implementation and Synthesis of Math Library Functions"],"prefix":"10.1145","volume":"8","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-2454-2317","authenticated-orcid":false,"given":"Ian","family":"Briggs","sequence":"first","affiliation":[{"name":"University of Utah, Salt Lake City, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0009-0002-1266-312X","authenticated-orcid":false,"given":"Yash","family":"Lad","sequence":"additional","affiliation":[{"name":"University of Utah, Salt Lake City, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-2621-3592","authenticated-orcid":false,"given":"Pavel","family":"Panchekha","sequence":"additional","affiliation":[{"name":"University of Utah, Salt Lake City, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2024,1,5]]},"reference":[{"key":"e_1_3_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/3519939.3523447"},{"key":"e_1_3_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/3579990.3580022"},{"key":"e_1_3_1_4_1","unstructured":"AMD . 2021. AMD Math Library (LibM). https:\/\/developer.amd.com\/amd-aocl\/amd-math-library-libm\/"},{"key":"e_1_3_1_5_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-30942-8_4"},{"key":"e_1_3_1_6_1","article-title":"The Mathematical-Function Computation Handbook","author":"Beebe Nelson H. F.","year":"2017","unstructured":"Nelson H. F. Beebe . 2017. The Mathematical-Function Computation Handbook. In Cambridge International Law Journal.","journal-title":"Cambridge International Law Journal"},{"key":"e_1_3_1_7_1","unstructured":"Payman Behnam and Mahdi Bojnordi . 2020. Posit: A Potential Replacement for IEEE 754. https:\/\/www.sigarch.org\/posit-a-potential-replacement-for-ieee-754\/"},{"key":"e_1_3_1_8_1","doi-asserted-by":"publisher","DOI":"10.1109\/CoDIT55151.2022.9804011"},{"key":"e_1_3_1_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/2345156.2254118"},{"key":"e_1_3_1_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/3385412.3386037"},{"key":"e_1_3_1_11_1","doi-asserted-by":"publisher","DOI":"10.1006\/jsco.1996.0125"},{"key":"e_1_3_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/3519939.3523452"},{"key":"e_1_3_1_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009846"},{"key":"e_1_3_1_14_1","doi-asserted-by":"crossref","unstructured":"Wei-Fan Chiang Ganesh Gopalakrishnan Zvonimir Rakamaric and Alexey Solovyev . 2014. Efficient search for inputs causing high floating-point errors. In Proceedings of the 19th ACM SIGPLAN symposium on Principles and practice of parallel programming. 43\u201352.","DOI":"10.1145\/2555243.2555265"},{"key":"e_1_3_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/3385412.3386004"},{"key":"e_1_3_1_16_1","doi-asserted-by":"publisher","DOI":"10.5555\/1096483"},{"key":"e_1_3_1_17_1","doi-asserted-by":"publisher","DOI":"10.29007\/j2fd"},{"key":"e_1_3_1_18_1","doi-asserted-by":"publisher","unstructured":"Catherine Daramy David Defour Florent Dinechin and Jean-Michel Muller . 2003. CR-LIBM: A correctly rounded elementary function library. Proceedings of SPIE - The International Society for Optical Engineering 5205 (Dec. 2003). https:\/\/doi.org\/10.1117\/12.505591 10.1117\/12.505591","DOI":"10.1117\/12.505591"},{"key":"e_1_3_1_19_1","doi-asserted-by":"publisher","unstructured":"Eva Darulova Anastasiia Izycheva Fariha Nasir Fabian Ritter Heiko Becker and Robert Bastian . 2018. Daisy - Framework for Analysis and Optimization of Numerical Programs (Tool Paper). 270\u2013287. https:\/\/doi.org\/10.1007\/978-3-319-89960-2_15 10.1007\/978-3-319-89960-2_15","DOI":"10.1007\/978-3-319-89960-2_15"},{"key":"e_1_3_1_20_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-25543-5_11"},{"key":"e_1_3_1_21_1","doi-asserted-by":"publisher","DOI":"10.1109\/SC41405.2020.00055"},{"key":"e_1_3_1_22_1","doi-asserted-by":"crossref","unstructured":"Florent de Dinechin . 2019. Reflections on 10 years of FloPoCo. In 26th IEEE Symposium of Computer Arithmetic (ARITH-26).","DOI":"10.1109\/ARITH.2019.00042"},{"key":"e_1_3_1_23_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF01397083"},{"key":"e_1_3_1_24_1","volume-title":"Chebfun Guide","author":"Driscoll T. A","year":"2014","unstructured":"T. A Driscoll , N. Hale , and L. N. Trefethen . 2014. Chebfun Guide. Pafnuty Publications. http:\/\/www.chebfun.org\/docs\/guide\/"},{"key":"e_1_3_1_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/1236463.1236468"},{"key":"e_1_3_1_26_1","unstructured":"Free Software Foundation . 2020. Errors in Math Functions (The GNU C Library). https:\/\/www.gnu.org\/software\/libc\/manual\/html_node\/Errors-in-Math-Functions.html"},{"key":"e_1_3_1_27_1","unstructured":"FSF . 2020. The GNU C Library. https:\/\/www.gnu.org\/software\/libc\/manual\/"},{"key":"e_1_3_1_28_1","unstructured":"LLVM Developer Group . 2023. Math Functions. https:\/\/libc.llvm.org\/math\/index.html"},{"key":"e_1_3_1_29_1","first-page":"311","volume-title":"FSTTCS 2004: Foundations of Software Technology and Theoretical Computer Science","author":"Gulwani Sumit","year":"2005","unstructured":"Sumit Gulwani , Ashish Tiwari , and George C. Necula . 2005. Join Algorithms for the Theory of Uninterpreted Functions. In FSTTCS 2004: Foundations of Software Technology and Theoretical Computer Science, Kamal Lodaya and Meena Mahajan (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 311\u2013323."},{"key":"e_1_3_1_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/3377811.3380359"},{"key":"e_1_3_1_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/3213846.3213862"},{"key":"e_1_3_1_32_1","doi-asserted-by":"publisher","DOI":"10.14529\/jsfi170206"},{"key":"e_1_3_1_33_1","doi-asserted-by":"publisher","DOI":"10.1126\/science.122.3170.602.a"},{"key":"e_1_3_1_34_1","unstructured":"Yozo Hida Sherry Li and David Bailey . 2008. Library for Double-Double and Quad-Double Arithmetic. (01 2008)."},{"key":"e_1_3_1_35_1","doi-asserted-by":"publisher","DOI":"10.1137\/1.9780898718027"},{"key":"e_1_3_1_36_1","volume-title":"MATLAB version: 9.13.0 (R2022b)","author":"MathWorks Inc","year":"2022","unstructured":"MathWorks Inc . 2022. MATLAB version: 9.13.0 (R2022b). Natick, Massachusetts, United States. https:\/\/www.mathworks.com"},{"key":"e_1_3_1_37_1","unstructured":"Intel . 2020. Intel-Optimized Math Library for Numerical Computing. http:\/\/software.intel.com\/en-us\/intel-mkl"},{"key":"e_1_3_1_38_1","doi-asserted-by":"publisher","DOI":"10.1109\/TC.2017.2690633"},{"key":"e_1_3_1_39_1","unstructured":"Julia Math Project . 2021. JuliaMath\/OpenLibm. https:\/\/github.com\/JuliaMath\/openlibm"},{"key":"e_1_3_1_40_1","first-page":"175","volume-title":"Proceedings","author":"Kahan William","year":"1967","unstructured":"William Kahan . 1967. 7094-11 System support for numerical analysis. In Proceedings. US Army Research Office., 175."},{"key":"e_1_3_1_41_1","unstructured":"William Kahan . 2004. A Logarithm Too Clever by Half. http:\/\/people.eecs.berkeley.edu\/~wkahan\/LOG10HAF.TXT"},{"key":"e_1_3_1_42_1","doi-asserted-by":"publisher","DOI":"10.1145\/800105.803406"},{"key":"e_1_3_1_43_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-44199-2_106"},{"key":"e_1_3_1_44_1","doi-asserted-by":"publisher","DOI":"10.1145\/3158135"},{"key":"e_1_3_1_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/3434310"},{"key":"e_1_3_1_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/3498664"},{"key":"e_1_3_1_47_1","volume-title":"Maple","author":"Maplesoft, a division of Waterloo Maple Inc.","year":"2019","unstructured":"Maplesoft, a division of Waterloo Maple Inc. . 2019. Maple. Waterloo, Ontario. https:\/\/www.maplesoft.com"},{"key":"e_1_3_1_48_1","unstructured":"Paulius Micikevicius Dusan Stosic Neil Burgess Marius Cornea Pradeep Dubey Richard Grisenthwaite Sangwon Ha Alexander Heinecke Patrick Judd John Kamalu Naveen Mellempudi Stuart Oberman Mohammad Shoeybi Michael Siu and Hao Wu . 2022. FP8 Formats for Deep Learning. arXiv:2209.05433 [cs.LG]"},{"key":"e_1_3_1_49_1","unstructured":"Sun Microsystems . 1993. A Freely Distributable Libm. (1993). https:\/\/www.netlib.org\/fdlibm\/"},{"key":"e_1_3_1_50_1","unstructured":"Stephen L Moshier . 1992. Cephes mathematical library. http:\/\/www.netlib.org\/cephes\/"},{"key":"e_1_3_1_51_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-4899-7983-4"},{"key":"e_1_3_1_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/2737924.2737959"},{"key":"e_1_3_1_53_1","doi-asserted-by":"publisher","DOI":"10.1088\/1742-6596\/513\/5\/052027"},{"key":"e_1_3_1_54_1","first-page":"750","volume-title":"Doklady Akademii Nauk","author":"Remez Evgenii Yakovlevich","year":"1968","unstructured":"Evgenii Yakovlevich Remez and Vera Timofeevna Gavrilyuk . 1968. A theorem on interpolation functions which provides a fundamental approach to the treatment of general analogs of the method of successive Chebyshev interpolations. In Doklady Akademii Nauk, Vol. 183. Russian Academy of Sciences, 750\u2013753."},{"key":"e_1_3_1_55_1","unstructured":"Wolfram Research Inc . 2023. Mathematica Version 13.3. https:\/\/www.wolfram.com\/mathematica Champaign IL."},{"key":"e_1_3_1_56_1","doi-asserted-by":"publisher","unstructured":"C. Rubio-Gonz\u00e1lez Cuong Nguyen Hong Diep Nguyen J. Demmel W. Kahan K. Sen D. H. Bailey C. Iancu and D. Hough . 2013. Precimonious: Tuning assistant for floating-point precision. In SC \u201913: Proceedings of the International Conference on High Performance Computing Networking Storage and Analysis. 1\u201312. https:\/\/doi.org\/10.1145\/2503210.2503296 10.1145\/2503210.2503296 ISSN: 2167-4337.","DOI":"10.1145\/2503210.2503296"},{"key":"e_1_3_1_57_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-15582-6_5"},{"key":"e_1_3_1_58_1","doi-asserted-by":"crossref","unstructured":"Brett Saiki Oliver Flatt Chandrakana Nandi Pavel Panchekha and Zachary Tatlock . 2021. Combining Precision Tuning and Rewriting. In 2021 IEEE 28th Symposium on Computer Arithmetic (ARITH).","DOI":"10.1109\/ARITH51176.2021.00013"},{"key":"e_1_3_1_59_1","doi-asserted-by":"publisher","DOI":"10.1145\/3296979.3192411"},{"key":"e_1_3_1_60_1","doi-asserted-by":"publisher","unstructured":"Alexei Sibidanov Paul Zimmermann and St\u00e9phane Glondu . 2022. The CORE-MATH Project. In 2022 IEEE 29th Symposium on Computer Arithmetic (ARITH). 26\u201334. https:\/\/doi.org\/10.1109\/ARITH54963.2022.00014 10.1109\/ARITH54963.2022.00014","DOI":"10.1109\/ARITH54963.2022.00014"},{"key":"e_1_3_1_61_1","doi-asserted-by":"publisher","DOI":"10.1145\/3230733"},{"key":"e_1_3_1_62_1","volume-title":"Floating-point computation","author":"Sterbenz Pat H","year":"1974","unstructured":"Pat H Sterbenz . 1974. Floating-point computation. Prentice-Hall, Englewood Cliffs, NJ. https:\/\/cds.cern.ch\/record\/268412"},{"key":"e_1_3_1_63_1","volume-title":"Methodus incrementorum directa & inversa","author":"Taylor Brook","year":"1717","unstructured":"Brook Taylor . 1717. Methodus incrementorum directa & inversa. Inny."},{"key":"e_1_3_1_64_1","volume-title":"Sur les questions de minima qui se rattechent a la rapr\u00e9sentation aproximative des fonctions","author":"Tch\u00e9bychev P","year":"1858","unstructured":"P Tch\u00e9bychev . 1858. Sur les questions de minima qui se rattechent a la rapr\u00e9sentation aproximative des fonctions. Imprimerie de l\u2019Academie Imp\u00e9riale des Sciences."},{"key":"e_1_3_1_65_1","unstructured":"The Sage Developers . 2023. SageMath the Sage Mathematics Software System (Version x.y.z). https:\/\/www.sagemath.org."},{"key":"e_1_3_1_66_1","unstructured":"Shibo Wang and Pankaj Kanwar . 2019. BFloat16: The secret to high performance on Cloud TPUs. https:\/\/cloud.google.com\/blog\/products\/ai-machine-learning\/bfloat16-the-secret-to-high-performance-on-cloud-tpus\/"},{"key":"e_1_3_1_67_1","doi-asserted-by":"publisher","DOI":"10.1145\/3434304"},{"key":"e_1_3_1_68_1","unstructured":"Paul Zimmermann . 2021. Accuracy of Mathematical Functions in Single Double Extended Double and Quadruple Precision. (Feb. 2021). https:\/\/hal.inria.fr\/hal-03141101 working paper or preprint."}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3632874","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3632874","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3632874","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,7,4]],"date-time":"2025-07-04T20:07:31Z","timestamp":1751659651000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3632874"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,1,2]]},"references-count":67,"journal-issue":{"issue":"POPL","published-print":{"date-parts":[[2024,1,2]]}},"alternative-id":["10.1145\/3632874"],"URL":"https:\/\/doi.org\/10.1145\/3632874","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,1,2]]},"assertion":[{"value":"2024-01-05","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}