{"id":4741,"date":"2026-08-06T10:30:31","date_gmt":"2026-08-06T08:30:31","guid":{"rendered":"https:\/\/www.tutego.de\/blog\/javainsel\/?p=4741"},"modified":"2026-08-06T20:56:21","modified_gmt":"2026-08-06T18:56:21","slug":"what-actually-runs-when-you-call-math-sin-java-source-fdlibm-and-what-hotspot-does-instead","status":"publish","type":"post","link":"https:\/\/www.tutego.de\/blog\/javainsel\/2026\/08\/what-actually-runs-when-you-call-math-sin-java-source-fdlibm-and-what-hotspot-does-instead\/","title":{"rendered":"What Actually Runs When You Call Math.sin(). Java source, fdlibm, and what HotSpot does instead"},"content":{"rendered":"<article>\n<div class=\"paragraph data-line-2694 data-h-oxwthb\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; color: #000000; font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', HelveticaNeue-Light, Ubuntu, 'Droid Sans', sans-serif, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Not every operation in a Java program has a corresponding machine instruction. Some operations can be lowered directly to hardware, while others require a software algorithm. For library methods, the API contract determines which results are acceptable, and that contract in turn determines which implementation substitutions the runtime may perform.<\/p>\n<\/div>\n<div class=\"sect3 data-line-2697\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; color: #000000; font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', HelveticaNeue-Light, Ubuntu, 'Droid Sans', sans-serif, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;\">\n<h4 id=\"_machine_support_and_software_algorithms\" style=\"box-sizing: border-box; margin: 1em 0px 0.5em; padding: 0px; direction: ltr; font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', HelveticaNeue-Light, Ubuntu, 'Droid Sans', sans-serif, serif; font-weight: 600; font-style: normal; text-rendering: optimizelegibility; line-height: 1.25; font-size: 1.4375em; word-spacing: -0.05em; color: #000000; letter-spacing: -0.01em;\">1.2.1. Machine Support and Software Algorithms<\/h4>\n<div class=\"paragraph data-line-2699 data-h-mdw4jh\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Programmers are used to thinking of arithmetic operations as processor operations. For basic floating-point arithmetic, that model largely holds: addition, subtraction, multiplication, and division map directly to machine instructions. Square root is the clearest further example.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2701 data-h-a0nd71\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Transcendental functions break the model. Sine, cosine, exponential, logarithm, and general power are normally computed by software algorithms assembled from ordinary arithmetic. Those algorithms perform argument reduction, evaluate polynomial or table approximations, reconstruct the result, and handle special values such as NaN, infinities, and signed zero.<\/p>\n<\/div>\n<div class=\"admonitionblock note data-line-2704\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; --adoc-accent: #0063d3;\">\n<table style=\"box-sizing: border-box; border-collapse: separate; border-spacing: 0px; margin-bottom: 1.25em; border-width: 0px 0px 0px 2.4px; border-style: none none none solid; border-color: currentcolor currentcolor currentcolor #0063d3; border-image: initial; background: none 0% 0% \/ auto repeat scroll padding-box border-box color(srgb 0 0.388235 0.827451 \/ 0.08); width: 848.75px; --adoc-marker-gap: color-mix(    in srgb,    #0063d3 8%,    #ffffff  ); border-radius: 0px 6px 6px 0px;\">\n<tbody style=\"box-sizing: border-box;\">\n<tr style=\"box-sizing: border-box;\">\n<td class=\"icon\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em 0.5625em 0.4em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; text-align: center; width: 56px;\"><\/td>\n<td class=\"content\" style=\"box-sizing: border-box; margin: 0px; padding: 0.55em 1.15em; direction: ltr; font-size: 1.0625em; display: table-cell; line-height: 1.6; text-rendering: optimizelegibility; letter-spacing: -0.01em; border-left: 0px;\">\n<div class=\"paragraph data-line-2705 data-h-1gw3e8z\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\"><strong style=\"box-sizing: border-box; font-weight: bold; line-height: inherit; letter-spacing: -0.005em;\">Historical Exception: x87<\/strong><\/p>\n<\/div>\n<div class=\"paragraph data-line-2707 data-h-6esb1v\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">x86 still includes historical x87 instructions for transcendental functions, among them\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">FSIN<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">FCOS<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">FPTAN<\/code>, and the logarithm instruction\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">FYL2X<\/code>. Modern compilers and math libraries rarely use them.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2709 data-h-lo9t4c\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">The x87 instruction set relies on an outdated stack-based register model and processes one value at a time. Its transcendental instructions also have limited accuracy.\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">FSIN<\/code>, for example, reduces its argument using a 66-bit approximation of \u03c0, so its precision deteriorates for large arguments and for values close to a multiple of \u03c0.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2711 data-h-fnxgwn\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Current implementations therefore use software algorithms built from ordinary floating-point instructions rather than the x87 transcendental instructions.<\/p>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"paragraph data-line-2714 data-h-31t9pl\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">On current instruction sets, the operations relevant here fall into three groups.<\/p>\n<\/div>\n<table class=\"tableblock frame-all grid-all stretch data-line-2718 data-h-177621u\" style=\"box-sizing: border-box; border-collapse: collapse; border-spacing: 0px; margin-bottom: 1.25em; border: 1px solid rgba(128, 128, 128, 0.35); width: 848.75px; max-width: 100%;\">\n<caption class=\"title\" style=\"box-sizing: border-box; color: #717171; line-height: 1.44; font-weight: 400; margin-top: 0px; margin-bottom: 0.25em; text-rendering: optimizelegibility; text-align: left; font-size: 1rem; font-style: italic;\">Table 2. Machine support for different operations<\/caption>\n<colgroup style=\"box-sizing: border-box;\">\n<col style=\"box-sizing: border-box;\" width=\"40%\" \/>\n<col style=\"box-sizing: border-box;\" width=\"20%\" \/>\n<col style=\"box-sizing: border-box;\" width=\"40%\" \/><\/colgroup>\n<thead style=\"box-sizing: border-box;\">\n<tr style=\"box-sizing: border-box;\">\n<th class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5em 0.625em 0.625em; direction: ltr; font-size: inherit; font-weight: 600; text-align: left; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); vertical-align: top; text-rendering: optimizelegibility; background: none 0% 0% \/ auto repeat scroll padding-box border-box color(srgb 0 0 0 \/ 0.07);\">Operation<\/th>\n<th class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5em 0.625em 0.625em; direction: ltr; font-size: inherit; font-weight: 600; text-align: left; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); vertical-align: top; text-rendering: optimizelegibility; background: none 0% 0% \/ auto repeat scroll padding-box border-box color(srgb 0 0 0 \/ 0.07);\">Typical machine support<\/th>\n<th class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5em 0.625em 0.625em; direction: ltr; font-size: inherit; font-weight: 600; text-align: left; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); vertical-align: top; text-rendering: optimizelegibility; background: none 0% 0% \/ auto repeat scroll padding-box border-box color(srgb 0 0 0 \/ 0.07);\">How the result is obtained<\/th>\n<\/tr>\n<\/thead>\n<tbody style=\"box-sizing: border-box;\">\n<tr style=\"box-sizing: border-box;\">\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\"><code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">+<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">-<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">*<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">\/<\/code>\u00a0on\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">float<\/code>\u00a0and\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">double<\/code><\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Direct<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">One instruction per operation, with the rounding required by Java<\/p>\n<\/td>\n<\/tr>\n<tr style=\"box-sizing: border-box; background: none 0% 0% \/ auto repeat scroll padding-box border-box color(srgb 0 0 0 \/ 0.04);\">\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Square root (<code style=\"font-family: monospace; color: #a31515; background: none; padding: 0px; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">sqrt<\/code>)<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Direct<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">One correctly rounded square-root instruction<\/p>\n<\/td>\n<\/tr>\n<tr style=\"box-sizing: border-box;\">\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Fused multiply-add (<code style=\"font-family: monospace; color: #a31515; background: none; padding: 0px; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">fma<\/code>)<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Architecture-dependent<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">One instruction with a single final rounding where the processor provides FMA; otherwise a software fallback<\/p>\n<\/td>\n<\/tr>\n<tr style=\"box-sizing: border-box; background: none 0% 0% \/ auto repeat scroll padding-box border-box color(srgb 0 0 0 \/ 0.04);\">\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Rounding operations (<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">rint<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">floor<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">ceil<\/code>)<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Architecture-dependent<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Typically lowered to one or a small number of instructions on current instruction sets<\/p>\n<\/td>\n<\/tr>\n<tr style=\"box-sizing: border-box;\">\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Exponential and logarithmic functions (<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">exp<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">log<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">log10<\/code>)<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">No generally used direct instruction<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Argument reduction followed by polynomial or table approximation<\/p>\n<\/td>\n<\/tr>\n<tr style=\"box-sizing: border-box; background: none 0% 0% \/ auto repeat scroll padding-box border-box color(srgb 0 0 0 \/ 0.04);\">\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">General power (<code style=\"font-family: monospace; color: #a31515; background: none; padding: 0px; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">pow<\/code>)<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">No generally used direct instruction<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Special-case handling followed by logarithm and exponential computation<\/p>\n<\/td>\n<\/tr>\n<tr style=\"box-sizing: border-box;\">\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Sine, cosine, and tangent (<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">sin<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">cos<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">tan<\/code>)<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">No generally used direct instruction<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Argument reduction followed by polynomial approximation<\/p>\n<\/td>\n<\/tr>\n<tr style=\"box-sizing: border-box; background: none 0% 0% \/ auto repeat scroll padding-box border-box color(srgb 0 0 0 \/ 0.04);\">\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Inverse trigonometric functions (<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">asin<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">acos<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">atan<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">atan2<\/code>)<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">No generally used direct instruction<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Software algorithm throughout<\/p>\n<\/td>\n<\/tr>\n<tr style=\"box-sizing: border-box;\">\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Hyperbolic functions (<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">sinh<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">cosh<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">tanh<\/code>)<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">No generally used direct instruction<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Software algorithms built largely on the exponential function<\/p>\n<\/td>\n<\/tr>\n<tr style=\"box-sizing: border-box; background: none 0% 0% \/ auto repeat scroll padding-box border-box color(srgb 0 0 0 \/ 0.04);\">\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Cube root and hypotenuse (<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">cbrt<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">hypot<\/code>)<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">No generally used direct instruction<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; border: 1px solid rgba(128, 128, 128, 0.35); text-align: left; vertical-align: top;\">\n<p class=\"tableblock\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Software algorithms;\u00a0<code style=\"font-family: monospace; color: #a31515; background: none; padding: 0px; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">hypot(\u2026\u200b)<\/code>\u00a0scales its arguments to avoid intermediate overflow<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"paragraph data-line-2762 data-h-1iff38\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">The processor is not short of specialized instructions; they simply apply to different operations. Methods such as\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Integer.bitCount(\u2026\u200b)<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">numberOfLeadingZeros(\u2026\u200b)<\/code>, and\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">reverseBytes(\u2026\u200b)<\/code>\u00a0can each lower to a single instruction, while\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math.sin(\u2026\u200b)<\/code>\u00a0remains a library operation.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2764 data-h-1bpd10e\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">That difference has a cost. A floating-point multiplication takes only a few cycles, whereas a transcendental function usually requires many instructions.\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math.sin(\u2026\u200b)<\/code>\u00a0becomes more expensive still when a large argument requires the slow path of argument reduction. A machine instruction is therefore only one possible implementation mechanism. Where no suitable instruction exists, an implementation must provide an algorithm. Where an instruction does exist, the runtime may still need a fallback for platforms that do not provide it. The cost of software algorithms also gives the runtime an incentive to replace a default implementation with a faster one, but only as far as the contract of the method allows.<\/p>\n<\/div>\n<\/div>\n<div class=\"sect3 data-line-2767\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; color: #000000; font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', HelveticaNeue-Light, Ubuntu, 'Droid Sans', sans-serif, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;\">\n<h4 id=\"_contracts_math_and_strictmath\" style=\"box-sizing: border-box; margin: 1em 0px 0.5em; padding: 0px; direction: ltr; font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', HelveticaNeue-Light, Ubuntu, 'Droid Sans', sans-serif, serif; font-weight: 600; font-style: normal; text-rendering: optimizelegibility; line-height: 1.25; font-size: 1.4375em; word-spacing: -0.05em; color: #000000; letter-spacing: -0.01em;\">1.2.2. Contracts:\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math<\/code>\u00a0and\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath<\/code><\/h4>\n<div class=\"paragraph data-line-2769 data-h-khm3m6\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Machine support does not determine the API contract. For the numerical library methods discussed here,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math<\/code>\u00a0and\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath<\/code>\u00a0define two different contractual models. Java once distinguished between strict and non-strict evaluation of floating-point expressions. JEP 306<sup class=\"footnote\" style=\"box-sizing: border-box; font-size: 0.875em; line-height: 0; position: static; vertical-align: super; top: -0.5em;\">[<a id=\"_footnoteref_1\" class=\"footnote\" style=\"color: #006ab1; box-sizing: border-box; background: none; text-decoration: none; line-height: inherit;\" title=\"View footnote.\" href=\"https:\/\/file+.vscode-resource.vscode-cdn.net\/c%3A\/Users\/christian\/Dropbox\/Eigene_Dokumente\/VectorAPI\/30_lane-wise_unary-binary-ternary.adoc#_footnotedef_1\">1<\/a>]<\/sup>\u00a0removed that distinction in Java 17. Floating-point expressions are now always evaluated strictly, and the\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">strictfp<\/code>\u00a0modifier has become a no-op for which\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">javac<\/code>\u00a0issues a warning.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2772 data-h-cmte5i\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">This change did not make\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math<\/code>\u00a0and\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath<\/code>\u00a0equivalent. The two mechanisms address different concerns:<\/p>\n<\/div>\n<div class=\"ulist data-line-2774\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<ul style=\"box-sizing: border-box; margin: 0px 0px 1.25em 1.5em; padding: 0px; direction: ltr; font-size: 1em; line-height: 1.6; list-style-position: outside; font-family: inherit;\">\n<li class=\"data-line-2774\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 0.625em; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\"><code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">strictfp<\/code>\u00a0governed the evaluation of floating-point expressions.<\/p>\n<\/li>\n<li class=\"data-line-2775\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 0.625em; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\"><code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath<\/code>\u00a0governs the results returned by selected library methods.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"sect4 data-line-2778\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<h5 id=\"_strictmath_a_specified_result\" style=\"box-sizing: border-box; margin: 1em 0px 0.5em; padding: 0px; direction: ltr; font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', HelveticaNeue-Light, Ubuntu, 'Droid Sans', sans-serif, serif; font-weight: 600; font-style: normal; text-rendering: optimizelegibility; line-height: 1.25; font-size: 1.125em; word-spacing: -0.05em; color: #000000; letter-spacing: -0.01em;\">1.2.2.1.\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath<\/code>: A Specified Result<\/h5>\n<div class=\"paragraph data-line-2780 data-h-i9vb92\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">For a defined set of functions,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath<\/code>\u00a0requires the result produced by the specified\u00a0<strong style=\"box-sizing: border-box; font-weight: bold; line-height: inherit; letter-spacing: -0.005em;\">fdlibm<\/strong>\u00a0algorithm when executed according to Java\u2019s arithmetic rules. The name fdlibm stands for\u00a0<strong style=\"box-sizing: border-box; font-weight: bold; line-height: inherit; letter-spacing: -0.005em;\">Freely Distributable Math Library<\/strong>, a collection of algorithms for IEEE 754 floating-point arithmetic developed at Sun in the 1990s.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2782 data-h-r8ekk6\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">For the affected\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath<\/code>\u00a0methods, the relationship to fdlibm is not an OpenJDK implementation choice. The class documentation says so outright, and pins the binding down in remarkable detail, right down to the file naming convention of the C sources.<\/p>\n<\/div>\n<div class=\"quoteblock data-line-2786\" style=\"box-sizing: border-box; margin: 0px 0px 1.25em; padding: 0.75em 1.25em; direction: ltr; display: block; border-left: 2.4px solid rgba(0, 122, 204, 0.5); background: none 0% 0% \/ auto repeat scroll padding-box border-box #f2f2f2; --adoc-marker-gap: #f2f2f2; border-radius: 0px 6px 6px 0px;\">\n<blockquote style=\"background: none 0% 0% \/ auto repeat scroll padding-box border-box #f2f2f2; border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; line-height: 1.76; font-size: 1.15rem; word-spacing: 0.1em; letter-spacing: 0px; font-style: italic; text-align: left;\">\n<div class=\"paragraph data-line-2787 data-h-yvxxcp\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.15rem; text-rendering: optimizelegibility; letter-spacing: 0px; line-height: 1.76; word-spacing: 0.1em; font-style: italic; text-align: left;\">To help ensure portability of Java programs, the definitions of some of the numeric functions in this package\u00a0<strong style=\"box-sizing: border-box; font-weight: bold; line-height: inherit; letter-spacing: -0.005em;\">require<\/strong>\u00a0that they produce the same results as certain published algorithms. These algorithms are available from the well-known network library\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">netlib<\/code>\u00a0as the package &#8222;Freely Distributable Math Library,&#8220;\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">fdlibm<\/code>. These algorithms, which are written in the C programming language, are then to be understood to be transliterated into Java and executed with all floating-point and integer operations following the rules of Java arithmetic. The following transformations are used in the transliteration: [\u2026]<\/p>\n<\/div>\n<div class=\"paragraph data-line-2790 data-h-yjem4u\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.15rem; text-rendering: optimizelegibility; letter-spacing: 0px; line-height: 1.76; word-spacing: 0.1em; font-style: italic; text-align: left;\">The Java math library is defined with respect to\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">fdlibm<\/code>\u00a0version 5.3 with a fix to\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">pow<\/code>\u00a0so that its error bounds conform to the quality of implementation criteria for\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">pow<\/code>. Where\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">fdlibm<\/code>\u00a0provides more than one definition for a function (such as\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">acos<\/code>), use the &#8222;IEEE 754 core function&#8220; version (residing in a file whose name begins with the letter\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">e<\/code>). The methods which require\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">fdlibm<\/code>\u00a0semantics are\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">sin<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">cos<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">tan<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">asin<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">acos<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">atan<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">exp<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">log<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">log10<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">cbrt<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">atan2<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">pow<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">sinh<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">cosh<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">tanh<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">asinh<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">acosh<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">atanh<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">hypot<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">expm1<\/code>, and\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">log1p<\/code>.<\/p>\n<\/div>\n<\/blockquote>\n<div class=\"attribution\" style=\"box-sizing: border-box; margin: 0.75em 0.5ex 0px 0px; padding: 0px; direction: ltr; text-align: right; font-size: 0.9375em; line-height: 1.44; font-style: italic; color: #717171;\">\u2014 Java SE 27 and JDK 27 Early-Access API Specification<cite style=\"box-sizing: border-box; display: block; letter-spacing: -0.025em;\"><a style=\"color: #006ab1; box-sizing: border-box; background: none; text-decoration: none; line-height: inherit;\" title=\"https:\/\/download.java.net\/java\/early_access\/jdk27\/docs\/api\/java.base\/java\/lang\/StrictMath.html\" href=\"https:\/\/download.java.net\/java\/early_access\/jdk27\/docs\/api\/java.base\/java\/lang\/StrictMath.html\" data-href=\"https:\/\/download.java.net\/java\/early_access\/jdk27\/docs\/api\/java.base\/java\/lang\/StrictMath.html\"><code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">java.lang.StrictMath<\/code><\/a><\/cite><\/div>\n<\/div>\n<div class=\"paragraph data-line-2793 data-h-1jml5f0\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">The API specification is one of the three documents that make up the Java SE platform specification, alongside the language specification and the virtual machine specification. The fdlibm requirement therefore binds every conforming implementation.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2795 data-h-ekv9di\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">What is required is a result, not a construction. The documentation describes the C algorithms as transliterated into Java and executed under Java\u2019s arithmetic rules. This constrains what leaves the method without prescribing how a particular implementation must be organized internally. OpenJDK implements this contract through Java ports in the package-private\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">java.lang.FdLibm<\/code>\u00a0class. A call such as\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath.sin(\u2026\u200b)<\/code>\u00a0therefore follows this default source-level path:<\/p>\n<\/div>\n<div class=\"listingblock data-line-2798 data-h-skboc6\" style=\"box-sizing: border-box; margin: 0px 0px 1.25em; padding: 0px; direction: ltr;\">\n<div class=\"content\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; position: relative;\">\n<pre class=\"highlightjs highlight\" style=\"box-sizing: border-box; font-family: monospace; font-size: 0.90625em; white-space: pre-wrap; margin: 0px; padding: 0.85em 1em; direction: ltr; line-height: 1.44; text-rendering: optimizespeed; border-radius: 6px; overflow-wrap: break-word; overflow: auto; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); border-color: rgba(128, 128, 128, 0.35); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\"><code class=\"language-java hljs\" style=\"font-family: monospace; color: #24292e; background: transparent; padding: 0px; border-radius: 4px; box-sizing: border-box; font-size: inherit; font-weight: 400; line-height: inherit; display: block; overflow-x: auto;\" data-lang=\"java\" data-highlighted=\"yes\"><span class=\"hljs-keyword\" style=\"box-sizing: border-box; color: #d73a49;\">public<\/span> <span class=\"hljs-keyword\" style=\"box-sizing: border-box; color: #d73a49;\">static<\/span> <span class=\"hljs-type\" style=\"box-sizing: border-box; color: #d73a49;\">double<\/span> <span class=\"hljs-title function_\" style=\"box-sizing: border-box; color: #6f42c1;\">sin<\/span><span class=\"hljs-params\" style=\"box-sizing: border-box;\">(<span class=\"hljs-type\" style=\"box-sizing: border-box; color: #d73a49;\">double<\/span> a)<\/span> {\r\n    <span class=\"hljs-keyword\" style=\"box-sizing: border-box; color: #d73a49;\">return<\/span> FdLibm.Sin.compute(a);\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"admonitionblock note data-line-2805\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; --adoc-accent: #0063d3;\">\n<table style=\"box-sizing: border-box; border-collapse: separate; border-spacing: 0px; margin-bottom: 1.25em; border-width: 0px 0px 0px 2.4px; border-style: none none none solid; border-color: currentcolor currentcolor currentcolor #0063d3; border-image: initial; background: none 0% 0% \/ auto repeat scroll padding-box border-box color(srgb 0 0.388235 0.827451 \/ 0.08); width: 848.75px; --adoc-marker-gap: color-mix(    in srgb,    #0063d3 8%,    #ffffff  ); border-radius: 0px 6px 6px 0px;\">\n<tbody style=\"box-sizing: border-box;\">\n<tr style=\"box-sizing: border-box;\">\n<td class=\"icon\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em 0.5625em 0.4em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; text-align: center; width: 56px;\"><\/td>\n<td class=\"content\" style=\"box-sizing: border-box; margin: 0px; padding: 0.55em 1.15em; direction: ltr; font-size: 1.0625em; display: table-cell; line-height: 1.6; text-rendering: optimizelegibility; letter-spacing: -0.01em; border-left: 0px;\">\n<div class=\"paragraph data-line-2806 data-h-1oselc7\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\"><strong style=\"box-sizing: border-box; font-weight: bold; line-height: inherit; letter-spacing: -0.005em;\">History<\/strong><\/p>\n<\/div>\n<div class=\"paragraph data-line-2808 data-h-134hlsc\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">In older JDK releases, several\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath<\/code>\u00a0methods were declared\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">native<\/code>\u00a0and eventually called fdlibm routines written in C. The migration away from the native implementation happened gradually, with individual algorithms translated from C to Java over several releases. The transcendental functions followed in JDK 21. The class documentation tracks the change: where it once described the C algorithms as executed under Java\u2019s floating-point rules, it now describes them as transliterated into Java.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2810 data-h-ulnihi\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">The Java ports remain closely based on fdlibm 5.3. The original library is no longer maintained as an independent project, but descendants of its code survive in FreeBSD\u2019s msun, musl libc, Julia\u2019s openlibm, and the Go standard library.<\/p>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"paragraph data-line-2813 data-h-1baqm4w\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">A virtual machine may compile or inline this code, but it may not substitute an algorithm that produces a different result.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2815 data-h-1gi25fr\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\"><code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath<\/code>\u00a0therefore guarantees reproducibility of the specified result. It does not necessarily guarantee a result that is closer to the exact mathematical value than the result returned by\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math<\/code>.<\/p>\n<\/div>\n<\/div>\n<div class=\"sect4 data-line-2818\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<h5 id=\"_math_constrained_implementation_freedom\" style=\"box-sizing: border-box; margin: 1em 0px 0.5em; padding: 0px; direction: ltr; font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', HelveticaNeue-Light, Ubuntu, 'Droid Sans', sans-serif, serif; font-weight: 600; font-style: normal; text-rendering: optimizelegibility; line-height: 1.25; font-size: 1.125em; word-spacing: -0.05em; color: #000000; letter-spacing: -0.01em;\">1.2.2.2.\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math<\/code>: Constrained Implementation Freedom<\/h5>\n<div class=\"paragraph data-line-2820 data-h-1p8rfl3\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">For many transcendental functions,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math<\/code>\u00a0specifies an error bound and, where applicable, monotonicity requirements. It does not require the fdlibm result. IEEE 754-2019 defines functions such as sine, cosine, exponential, logarithm, and power as recommended operations with correctly rounded semantics, but it does not require every programming environment to provide them. Java generally specifies weaker, method-specific guarantees for these functions.<sup class=\"footnote\" style=\"box-sizing: border-box; font-size: 0.875em; line-height: 0; position: static; vertical-align: super; top: -0.5em;\">[<a id=\"_footnoteref_2\" class=\"footnote\" style=\"color: #006ab1; box-sizing: border-box; background: none; text-decoration: none; line-height: inherit;\" title=\"View footnote.\" href=\"https:\/\/file+.vscode-resource.vscode-cdn.net\/c%3A\/Users\/christian\/Dropbox\/Eigene_Dokumente\/VectorAPI\/30_lane-wise_unary-binary-ternary.adoc#_footnotedef_2\">2<\/a>]<\/sup><\/p>\n<\/div>\n<div class=\"paragraph data-line-2823 data-h-y44tgh\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">The Java source implementation commonly delegates to\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath<\/code>:<\/p>\n<\/div>\n<div class=\"listingblock data-line-2826 data-h-g5io1q\" style=\"box-sizing: border-box; margin: 0px 0px 1.25em; padding: 0px; direction: ltr;\">\n<div class=\"content\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; position: relative;\">\n<pre class=\"highlightjs highlight\" style=\"box-sizing: border-box; font-family: monospace; font-size: 0.90625em; white-space: pre-wrap; margin: 0px; padding: 0.85em 1em; direction: ltr; line-height: 1.44; text-rendering: optimizespeed; border-radius: 6px; overflow-wrap: break-word; overflow: auto; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); border-color: rgba(128, 128, 128, 0.35); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\"><code class=\"language-java hljs\" style=\"font-family: monospace; color: #24292e; background: transparent; padding: 0px; border-radius: 4px; box-sizing: border-box; font-size: inherit; font-weight: 400; line-height: inherit; display: block; overflow-x: auto;\" data-lang=\"java\" data-highlighted=\"yes\"><span class=\"hljs-meta\" style=\"box-sizing: border-box; color: #005cc5;\">@IntrinsicCandidate<\/span>\r\n<span class=\"hljs-keyword\" style=\"box-sizing: border-box; color: #d73a49;\">public<\/span> <span class=\"hljs-keyword\" style=\"box-sizing: border-box; color: #d73a49;\">static<\/span> <span class=\"hljs-type\" style=\"box-sizing: border-box; color: #d73a49;\">double<\/span> <span class=\"hljs-title function_\" style=\"box-sizing: border-box; color: #6f42c1;\">sin<\/span><span class=\"hljs-params\" style=\"box-sizing: border-box;\">(<span class=\"hljs-type\" style=\"box-sizing: border-box; color: #d73a49;\">double<\/span> a)<\/span> {\r\n    <span class=\"hljs-keyword\" style=\"box-sizing: border-box; color: #d73a49;\">return<\/span> StrictMath.sin(a);\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph data-line-2833 data-h-11iq5\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">This delegation defines the default implementation. It does not restrict the runtime to that implementation. A virtual machine may substitute another algorithm whenever the replacement continues to satisfy the\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math<\/code>\u00a0contract.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2835 data-h-sncu8d\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Square root is the important exception. IEEE 754 requires square root to be correctly rounded. For a given input and rounding mode, there is exactly one admissible floating-point result. Java reflects that requirement in the contract of\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math.sqrt(\u2026\u200b)<\/code>: the result must be correctly rounded rather than merely remain within an ulp bound.\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math.sqrt(\u2026\u200b)<\/code>\u00a0and\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath.sqrt(\u2026\u200b)<\/code>\u00a0therefore return the same result. The documented list of methods bound to fdlibm semantics shows the same fact from the other side:\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">sqrt<\/code>\u00a0does not appear on it.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2837 data-h-ivswer\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">For functions such as\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">sin(\u2026\u200b)<\/code>,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">cos(\u2026\u200b)<\/code>, and\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">pow(\u2026\u200b)<\/code>, no comparable requirement eliminates the implementation freedom.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect3 data-line-2840\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; color: #000000; font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', HelveticaNeue-Light, Ubuntu, 'Droid Sans', sans-serif, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;\">\n<h4 id=\"_runtime_implementation\" style=\"box-sizing: border-box; margin: 1em 0px 0.5em; padding: 0px; direction: ltr; font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', HelveticaNeue-Light, Ubuntu, 'Droid Sans', sans-serif, serif; font-weight: 600; font-style: normal; text-rendering: optimizelegibility; line-height: 1.25; font-size: 1.4375em; word-spacing: -0.05em; color: #000000; letter-spacing: -0.01em;\">1.2.3. Runtime Implementation<\/h4>\n<div class=\"paragraph data-line-2842 data-h-16xtet\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">A Java method body describes the default source-level path, but not necessarily the code executed after compilation. As discussed earlier, HotSpot may recognize selected methods as intrinsics and replace their Java-level invocation during JIT compilation. The source code extract above shows that\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math.sin(\u2026\u200b)<\/code>\u00a0is marked with\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">@IntrinsicCandidate<\/code>; whether HotSpot actually provides an intrinsic for the method is determined by its internal table of known intrinsics. For a supported call, the JIT compiler may emit compiler-generated code or invoke a runtime stub instead of following the Java-level path.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2844 data-h-1l291fg\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">HotSpot provides an intrinsic for\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math.sin(\u2026\u200b)<\/code>, but not for\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath.sin(\u2026\u200b)<\/code>. For\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math.sin(\u2026\u200b)<\/code>, HotSpot may therefore replace the default delegation path with a runtime stub that implements the function using platform-specific instruction sequences. On x86-64, the relevant stubs are based on routines contributed from Intel\u2019s scalar\u00a0<strong style=\"box-sizing: border-box; font-weight: bold; line-height: inherit; letter-spacing: -0.005em;\">Compiler Math Library (LIBM)<\/strong><sup class=\"footnote\" style=\"box-sizing: border-box; font-size: 0.875em; line-height: 0; position: static; vertical-align: super; top: -0.5em;\">[<a id=\"_footnoteref_3\" class=\"footnote\" style=\"color: #006ab1; box-sizing: border-box; background: none; text-decoration: none; line-height: inherit;\" title=\"View footnote.\" href=\"https:\/\/file+.vscode-resource.vscode-cdn.net\/c%3A\/Users\/christian\/Dropbox\/Eigene_Dokumente\/VectorAPI\/30_lane-wise_unary-binary-ternary.adoc#_footnotedef_3\">3<\/a>]<\/sup>\u00a0and implement the function using SSE and AVX instruction sequences. The implementation is incorporated directly into HotSpot; the JVM does not dynamically link against the external Intel library at runtime. This substitution is permitted because\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math.sin(\u2026\u200b)<\/code>\u00a0does not require the fdlibm result. It requires only a result within the specified error bound and with the required monotonicity properties.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2848 data-h-moqmp6\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">A direct call to\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath.sin(\u2026\u200b)<\/code>, by contrast, remains bound to the specified result. The JIT compiler may compile and inline\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">FdLibm.Sin.compute(\u2026\u200b)<\/code>, but it may not substitute an algorithm that changes that result.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2850 data-h-fn2410\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">Square root illustrates how the contract distinction remains separate from the hardware\/software distinction. Both\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math.sqrt(\u2026\u200b)<\/code>\u00a0and\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath.sqrt(\u2026\u200b)<\/code>\u00a0carry\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">@IntrinsicCandidate<\/code>, and HotSpot defines an intrinsic for each. A hardware square-root instruction and a conforming software implementation must agree bit for bit, so a single\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">sqrtsd<\/code>\u00a0instruction can replace either method body without weakening either contract.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2852 data-h-qgya5a\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">An intrinsic is therefore not hardware taking over from software. It is one implementation replacing another under the constraints of the API contract. The complete path is therefore:<\/p>\n<\/div>\n<div class=\"paragraph data-line-2854 data-h-17j9fr3\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">operation \u2192 API contract \u2192 permitted implementation \u2192 generated machine code<\/p>\n<\/div>\n<div class=\"admonitionblock note data-line-2858\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; --adoc-accent: #0063d3;\">\n<table style=\"box-sizing: border-box; border-collapse: separate; border-spacing: 0px; margin-bottom: 1.25em; border-width: 0px 0px 0px 2.4px; border-style: none none none solid; border-color: currentcolor currentcolor currentcolor #0063d3; border-image: initial; background: none 0% 0% \/ auto repeat scroll padding-box border-box color(srgb 0 0.388235 0.827451 \/ 0.08); width: 848.75px; --adoc-marker-gap: color-mix(    in srgb,    #0063d3 8%,    #ffffff  ); border-radius: 0px 6px 6px 0px;\">\n<tbody style=\"box-sizing: border-box;\">\n<tr style=\"box-sizing: border-box;\">\n<td class=\"icon\" style=\"box-sizing: border-box; margin: 0px; padding: 0.5625em 0.625em 0.5625em 0.4em; direction: ltr; font-size: inherit; display: table-cell; line-height: 1.6; text-align: center; width: 56px;\"><\/td>\n<td class=\"content\" style=\"box-sizing: border-box; margin: 0px; padding: 0.55em 1.15em; direction: ltr; font-size: 1.0625em; display: table-cell; line-height: 1.6; text-rendering: optimizelegibility; letter-spacing: -0.01em; border-left: 0px;\">\n<div class=\"paragraph data-line-2859 data-h-9pc47\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\"><strong style=\"box-sizing: border-box; font-weight: bold; line-height: inherit; letter-spacing: -0.005em;\">Choosing Between Math and StrictMath<\/strong><\/p>\n<\/div>\n<div class=\"paragraph data-line-2861 data-h-48rml9\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\"><code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">Math<\/code>\u00a0is the default choice. It gives the runtime freedom to select an implementation that satisfies the documented error bounds while taking advantage of platform-specific optimizations.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2863 data-h-194j0m1\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px 0px 1.25rem; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">For methods with specified fdlibm semantics,\u00a0<code style=\"font-family: monospace; color: #a31515; background: none 0% 0% \/ auto repeat scroll padding-box border-box rgba(220, 220, 220, 0.4); padding: 0.12em 0.4em; border-radius: 4px; box-sizing: border-box; font-size: 0.9375em; font-weight: 400; letter-spacing: 0px; word-spacing: -0.15em; line-height: 1.44; text-rendering: optimizespeed; overflow-wrap: break-word; font-style: normal !important; border-color: color(srgb 0 0 0 \/ 0.1); border-style: solid; border-width: 0.8px; border-image: none 100% \/ 1 \/ 0 stretch;\">StrictMath<\/code>\u00a0is appropriate when results must be reproducible bit for bit across machines, virtual machines, or vendors. Typical cases include deterministic simulations, distributed computations whose nodes must produce identical values, and golden-value tests that run on multiple platforms.<\/p>\n<\/div>\n<div class=\"paragraph data-line-2865 data-h-125cv73\" style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr;\">\n<p style=\"box-sizing: border-box; margin: 0px; padding: 0px; direction: ltr; font-family: inherit; font-weight: 400; font-size: 1.0625em; text-rendering: optimizelegibility; letter-spacing: -0.01em;\">What separates the two classes is implementation freedom on one side and a specified numerical result on the other, not speed on one side and accuracy on the other.<\/p>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<section class=\"footnotes\"><\/section>\n<\/article>\n","protected":false},"excerpt":{"rendered":"<p>Not every operation in a Java program has a corresponding machine instruction. Some operations can be lowered directly to hardware, while others require a software algorithm. For library methods, the API contract determines which results are acceptable, and that contract in turn determines which implementation substitutions the runtime may perform. 1.2.1. Machine Support and Software [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false,"_links_to":"","_links_to_target":""},"categories":[1],"tags":[],"class_list":["post-4741","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/4741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/comments?post=4741"}],"version-history":[{"count":3,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/4741\/revisions"}],"predecessor-version":[{"id":4744,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/4741\/revisions\/4744"}],"wp:attachment":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/media?parent=4741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/categories?post=4741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/tags?post=4741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}