{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/seasons-s-greetings-by-ad","title":"Seasons's Greetings by AD","arxiv_id":"2402.09409","date":"2023-12-13","proceeding":null,"authors":["Uwe Naumann"],"abstract":"We use Algorithmic Differentiation (AD) to implement type-generic tangent and adjoint versions of $$ y=\\sum_{i=0}^{n-1} x_{2 i} \\cdot x_{2 i+1} $$ in C++. We run an instantiation for char-arithmetic and we print the gradient at $(101~77~114~114~32~121~109~88~115~97)^T$ to std::cout, yielding the output ``Merry Xmas''. Similar instantiations of type-generic second-order tangent and second-order adjoint versions of $$ y=\\frac{1}{6} \\cdot \\sum_{i=0}^{n-1} x^3_{i} $$ yield ``Happy 2026'' at $(72~97~112~112~121~32~50~48~50~54)^T.$ Prepend a sufficiently large number of zeros to the input vector to explore the varying run times of the different derivative codes. The entire source code can be found on https://github.com/un110076/SeasonsGreetings.","url_abs":"https://arxiv.org/abs/2402.09409v1","url_pdf":"https://arxiv.org/pdf/2402.09409v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"seasons-s-greetings-by-ad","repo_url":"https://github.com/un110076/seasonsgreetings","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}