Systems and methods for improved efficient multiplication

The FPLNS multiplier addresses the high power consumption of machine learning accelerators by using a biased logarithmic number system for efficient arithmetic operations, achieving reduced power and complexity with minimal accuracy loss.

US20260377139A1Pending Publication Date: 2026-11-26CASSIA AI INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
US19/688427
Authority / Receiving Office
US · United States
Patent Type
Applications(United States)
Current Assignee / Owner
Priority Date
2025-05-23
Filing Date
2026-05-26
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

Machine learning accelerator chips consume high power, making them unwieldy for edge devices, and there is a need for efficient computation with minimal power consumption while maintaining performance.

Method used

Implement a hardware inexact floating-point logarithmic number system (FPLNS) multiplier that performs arithmetic operations using a biased logarithmic number system for efficient calculations, reducing power consumption and complexity by applying selective corrections based on input regions.

Benefits of technology

The FPLNS system significantly reduces hardware resource utilization, switching activity, latency, and power consumption while maintaining scalable operation and minimal accuracy loss in machine learning models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US20260377139A1-D00000_ABST
    Figure US20260377139A1-D00000_ABST
Patent Text Reader

Abstract

An integrated circuit is configured to perform logarithmic-domain arithmetic operations on one or more binary values represented in a floating-point logarithmic number system (FPLNS) format. The integrated circuit is configured to generate an input logarithmic-domain value corresponding to a logarithm of a quantity including one plus at least a portion of a mantissa value, determine a region associated with the input logarithmic-domain value based on one or more selected bits of the input logarithmic-domain value, selectively apply a correction operation to at least a portion of the input logarithmic-domain value based on the determined region to generate a corrected logarithmic-domain value, wherein different regions are associated with different correction behaviors, and utilize the corrected logarithmic-domain value in a multiplication operation in order to reduce arithmetic complexity, hardware resource utilization, switching activity, latency, and power consumption.
Need to check novelty before this filing date? Find Prior Art

Description

CROSS REFERENCE TO RELATED APPLICATIONS

[0001] The present application claims benefit of U.S. Provisional Patent Application No. 63 / 811,470 filed May 23, 2025 and entitled “Partial and Linear Corrections to Mitchells Method of Multiplication” which is incorporated by reference herein.FIELD OF THE INVENTION

[0002] Embodiments discussed herein relate generally to accelerated processing and more particularly to the implementation of floating-point number format with a biased logarithmic number system (FPLNS) utilizing approximate addition for efficient calculations.BACKGROUND

[0003] Current machine learning (ML) accelerator chips execute trillions of multiply-accumulate (MAC) operations per second, and billions of activation functions per second. In order to achieve such speeds, individual chips may consume hundreds of watts of power. As machine learning models become more complicated, they are consuming larger amounts of power. However, there is a push to move ML accelerators to the edge so power consumption has become a limiting factor.

[0004] Until 2019, major companies developed a machine learning solution that would optimize a process that was internal to that company, thus saving cost per month. Since then, more and more companies have been developing products that use machine learning for distribution. In order to take advantage of deep learning algorithms, these custom products have a need for their own embedded machine learning accelerator. At this time, such accelerators include GPUs from NVidia and AMD, and field programmable gate arrays (FPGAs) from Xilinx and Intel. Newer custom ML processors such as from Google, NVidia, ARM, and others have been developed.

[0005] These ML accelerator devices, while capable of high performance, consume incredible amounts of power which make them unwieldy. Case in point: running a 4 W TPU on a cell phone with a 3000 mA-hr battery at full speed will deplete the battery in less than an hour. It is known that power consumption can be reduced in exchange for reduced performance, however, machine learning applications with higher computation demands are progressively being pushed to the edge.SUMMARY

[0006] An example system comprises an integrated circuit configured to perform logarithmic-domain arithmetic operations on one or more binary values represented in a floating-point logarithmic number system (FPLNS) format. In some embodiments, the integrated circuit includes or comprises an integrated circuit including a hardware inexact floating-point logarithmic number system (FPLNS) multiplier configured to perform FPLNS functions. The integrated circuit may be configured to access registers containing a first floating-point binary value and a first logarithmic binary value of the first floating-point binary value, each of the first floating-point binary value and the first logarithmic binary value being in an FPLNS data format, the first floating-point binary value in the FPLNS format including a sign bit followed by exponent bits, the exponent bits followed by mantissa bits, access registers containing a second floating-point binary value and a second logarithmic binary value of the second floating-point binary value, each of the second floating-point binary value and the second logarithmic binary value being in an FPLNS data format, the second floating-point binary value in the FPLNS format, multiply by the FPLNS multiplier, the first floating-point binary value and the second floating-point binary value, the FPLNS multiplier configured to: add, using an approximate adder, at least a portion of the first logarithmic binary value to at least a portion of the second logarithmic binary value to form a first logarithmic sum, shift a bias constant by a number of bits of the mantissa of the first floating-point binary value to form a first shifted bias value, subtract a correction factor from the first shifted bias value to form a first corrected bias value, and subtract the first corrected bias value from the first logarithmic sum to form a first result. The integrated circuit being further configured to perform an antilogarithm on the first result to generate a multiplication result of the multiplication of the first floating-point binary value and the second floating-point binary value.

[0007] In some embodiments, the integrated circuit generates an input logarithmic-domain value corresponding to a logarithm of a quantity including one plus at least a portion of a mantissa value, determines a region associated with the input logarithmic-domain value based on one or more selected bits of the input logarithmic-domain value, selectively applies a correction operation to at least a portion of the input logarithmic-domain value based on the determined region to generate a corrected logarithmic-domain value, wherein different regions are associated with different correction behaviors, and utilizes the corrected logarithmic-domain value in a multiplication operation in order to reduce arithmetic complexity, hardware resource utilization, switching activity, latency, and power consumption.

[0008] In various embodiments, the logarithmic-domain value approximates log2(1+x) where x corresponds to at least a portion of the mantissa value. The correction operation may comprise a partial correction operation applied to fewer than all possible regions of the input logarithmic-domain value. The integrated circuit may selectively apply the correction operation only when selected bits of the input logarithmic-domain value satisfy a condition associated with elevated approximation error. The selected bits may comprise upper-order bits of the input logarithmic-domain value.

[0009] In some embodiments, the correction operation comprises a piecewise approximation operation in which different regions of the input logarithmic-domain value are associated with different translation operations. The different translation operations may comprise one or more of subtraction of a correction value, addition of a correction value, preservation of one or more bit fields, forcing one or more output bits to a predetermined value, decrementing one or more bit fields, masking operations, or substitution operations.

[0010] The integrated circuit may be configured to perform a logarithmic multiplication operation according to a Mitchell-style logarithmic multiplication approximation. The input logarithmic-domain value may comprise an 8-bit mantissa-domain value. In some embodiments, the input logarithmic-domain value comprises a 16-bit mantissa-domain value.

[0011] In some embodiments, the integrated circuit includes: a subtractor configured to generate a corrected candidate value, a multiplexer configured to select between the corrected candidate value and an uncorrected value, and selection logic configured to control the multiplexer based on one or more selected bits of the input logarithmic-domain value. In various embodiments, the selection logic includes one or more XOR gates. In some embodiments, the subtractor, the multiplexer, and the selection logic are merged into a co-optimized combinational logic circuit.

[0012] The integrated circuit includes a range detector may be configured to divide the input logarithmic-domain value into a plurality of regions. Multiple regions may share a common translation function. The correction operation may be implemented without a lookup table and without polynomial interpolation circuitry. The integrated circuit may be incorporated into one or more of a machine-learning accelerator, a systolic array, a tensor processor, an FPGA arithmetic unit, an approximate multiply-accumulate array, or an edge inference processor.

[0013] In some embodiments, the integrated circuit is configured such that the correction operation reduces approximation error while reducing arithmetic complexity relative to subtraction of a multibit correction quantity across an entire approximation domain.

[0014] In various embodiments, utilization of the corrected logarithmic-domain value in the multiplication operation in order to reduce arithmetic complexity, hardware resource utilization, switching activity, latency, and power consumption is relative to multibit correction architectures while maintaining scalable operation across multiple mantissa bit widths.

[0015] Utilization of the corrected logarithmic-domain value in the multiplication operation may be further in order to improve scalability across multiple mantissa bit widths and reduce combinational logic complexity, switching activity, and power consumption relative to logarithmic correction architectures utilizing multibit correction arithmetic across an approximation domain.

[0016] An example method may comprise generating, using an integrated circuit configured to perform logarithmic-domain arithmetic operations on one or more binary values represented in a floating-point logarithmic number system (FPLNS) format, an input logarithmic-domain value corresponding to a logarithm of a quantity including one plus at least a portion of a mantissa value, determining, using the integrated circuit, a region associated with the input logarithmic-domain value based on one or more selected bits of the input logarithmic-domain value, selectively applying, using the integrated circuit, a correction operation to at least a portion of the input logarithmic-domain value based on the determined region to generate a corrected logarithmic-domain value, wherein different regions are associated with different correction behaviors, and utilizing, using the integrated circuit, the corrected logarithmic-domain value in a multiplication operation in order to reduce arithmetic complexity, hardware resource utilization, switching activity, latency, and power consumption.

[0017] In some embodiments, the integrated circuit of this method includes or comprises an integrated circuit including a hardware inexact floating-point logarithmic number system (FPLNS) multiplier configured to perform FPLNS functions. The integrated circuit may be configured to access registers containing a first floating-point binary value and a first logarithmic binary value of the first floating-point binary value, each of the first floating-point binary value and the first logarithmic binary value being in an FPLNS data format, the first floating-point binary value in the FPLNS format including a sign bit followed by exponent bits, the exponent bits followed by mantissa bits, access registers containing a second floating-point binary value and a second logarithmic binary value of the second floating-point binary value, each of the second floating-point binary value and the second logarithmic binary value being in an FPLNS data format, the second floating-point binary value in the FPLNS format, multiply by the FPLNS multiplier, the first floating-point binary value and the second floating-point binary value, the FPLNS multiplier configured to: add, using an approximate adder, at least a portion of the first logarithmic binary value to at least a portion of the second logarithmic binary value to form a first logarithmic sum, shift a bias constant by a number of bits of the mantissa of the first floating-point binary value to form a first shifted bias value, subtract a correction factor from the first shifted bias value to form a first corrected bias value, and subtract the first corrected bias value from the first logarithmic sum to form a first result. The integrated circuit being further configured to perform an antilogarithm on the first result to generate a multiplication result of the multiplication of the first floating-point binary value and the second floating-point binary value.

[0018] An example system comprises an integrated circuit including a hardware inexact floating-point logarithmic number system (FPLNS) multiplier configured to perform FPLNS functions. The integrated circuit may be configured to access registers containing a first floating-point binary value and a first logarithmic binary value of the first floating-point binary value, each of the first floating-point binary value and the first logarithmic binary value being in an FPLNS data format, the first floating-point binary value in the FPLNS format including a sign bit followed by exponent bits, the exponent bits followed by mantissa bits, access registers containing a second floating-point binary value and a second logarithmic binary value of the second floating-point binary value, each of the second floating-point binary value and the second logarithmic binary value being in an FPLNS data format, the second floating-point binary value in the FPLNS format, multiply by the FPLNS multiplier, the first floating-point binary value and the second floating-point binary value, the FPLNS multiplier configured to: add, using an approximate adder, at least a portion of the first logarithmic binary value to at least a portion of the second logarithmic binary value to form a first logarithmic sum, shift a bias constant by a number of bits of the mantissa of the first floating-point binary value to form a first shifted bias value, subtract a correction factor from the first shifted bias value to form a first corrected bias value, and subtract the first corrected bias value from the first logarithmic sum to form a first result. The integrated circuit being further configured to perform an antilogarithm on the first result to generate a multiplication result of the multiplication of the first floating-point binary value and the second floating-point binary value.

[0019] In some embodiments the system includes a processor configured to: convert the first floating-point binary value to the first logarithmic binary value, the first floating-point binary value being in the FPLNS format, the processor configured to convert the first floating-point binary value to the first logarithmic binary value comprising the processor configured to: determine a base-2 logarithm of a quantity of one plus a mantissa of the first floating-point binary value to form a first log quantity, add, using the approximate adder, at least a portion of the first log quantity to the exponent of the first floating-point binary value to form a first total, and subtract the bias constant from the first total to form the first logarithmic binary value, and convert the second floating-point binary value to the second logarithmic binary value, the first floating-point binary value being in the FPLNS format, the processor configured to convert the second floating-point binary value to the second logarithmic binary value comprising the processor configured to: determine a base-2 logarithm of a quantity of one plus a mantissa of the second floating-point binary value to form a second log quantity, add, using the approximate adder, at least a portion of the second log quantity to the exponent of the second floating-point binary value to form a second total, and subtract the bias constant from the second total to form the first logarithmic binary value.

[0020] In various embodiments, the multiplication result being in the FPLNS format. In some embodiments, add, using the approximate adder, the at least a portion of the first logarithmic binary value to the at least a portion of the second logarithmic binary value to form the first logarithmic sum comprises add, using an exact adder, a first set of significant bits of the first logarithmic binary value with a first set of significant bits of the second logarithmic binary value, and add, using the approximate adder, a second set of less significant bits of the first logarithmic binary value with a second set of less significant bits of the second logarithmic binary value, the first set of significant bits of the first logarithmic binary value being more significant than the second set of significant bits of the first logarithmic binary value, and the first set of significant bits of the second logarithmic binary value being more significant than the second set of significant bits of the second logarithmic binary value.

[0021] The bias constant may be 2(E−1)−1, where E is the number of bits in the exponent of the first floating-point binary value in the FPLNS format. In some embodiments the FPLNS multiplier retrieves the correction factor from one or more registers that do not contain the first floating-point binary value, the first logarithmic binary value, the second floating-point binary value, and the second logarithmic binary value. The correction factor may be within a range of 0.04 to 0.06.

[0022] In some embodiments the exponent bits of the first floating-point binary value in the FPLNS format are positioned such that the highest exponent bit of the exponent bits is closest to the sign bit and the lowest exponent bit is closest to the mantissa bits, the mantissa bits of the first floating-point binary value of the FPLNS format being positioned such that the highest mantissa bit of the mantissa bits is closest to the exponent bits and the lowest mantissa bit is farthest from the exponent bits. Similarly, in various embodiments, the exponent bits of the first logarithmic binary value in the FPLNS format are positioned such that the highest exponent bit of the exponent bits is closest to the sign bit and the lowest exponent bit is closest to the mantissa bits, the mantissa bits of the first logarithmic binary value of the FPLNS format being positioned such that the highest mantissa bit of the mantissa bits is closest to the exponent bits and the lowest mantissa bit is farthest from the exponent bits.

[0023] In various embodiments, the FPLNS multiplier is further configured to divide a third floating-point binary value and a fourth floating-point binary value, the third floating-point binary value and the fourth floating-point binary value being in the FPLNS data format, the FPLNS multiplier being configured to divide the third floating-point binary value and the fourth floating-point binary value by: subtracting, by the FPLNS multiplier, a third logarithmic binary value of the third floating-point binary value from the fourth logarithmic binary value of the fourth floating-point binary value to form a first logarithmic difference, shifting the bias constant by a number of bits of the mantissa of the third floating-point binary value to form the second shifted bias value, subtracting the correction factor from the second shifted bias value to form a second corrected bias value, and adding the second corrected bias value from the first logarithmic sum to form a second result, and the integrated circuit being further configured to perform an antilogarithm on the second result to generate a division result of the division of the third floating-point binary value and the fourth floating-point binary value.

[0024] An example method comprises accessing registers by an integrated circuit, the registers containing a first floating-point binary value and a first logarithmic binary value of the first floating-point binary value, each of the first floating-point binary value and the first logarithmic binary value being in an FPLNS data format, the first floating-point binary value in the FPLNS format including a sign bit followed by exponent bits, the exponent bits followed by mantissa bits, the integrated circuit including a hardware inexact floating-point logarithmic number system (FPLNS) multiplier configured to perform FPLNS functions, accessing registers by the integrated circuit containing a second floating-point binary value and a second logarithmic binary value of the second floating-point binary value, each of the second floating-point binary value and the second logarithmic binary value being in an FPLNS data format, the second floating-point binary value in the FPLNS format, multiplying, using an approximate adder, at least a portion of the first floating-point binary value and the second floating-point binary value, the multiplication comprising: adding, by the FPLNS multiplier, the first logarithmic binary value to the second logarithmic binary value to form a first logarithmic sum, shifting a bias constant by a number of bits of the mantissa of the first floating-point binary value to form a first shifted bias value, subtracting a correction factor from the first shifted bias value to form a first corrected bias value, and subtracting the first corrected bias value from the first logarithmic sum to form a first result, the method further performing an antilogarithm on the first result to generate a multiplication result of the multiplication of the first floating-point binary value and the second floating-point binary value.

[0025] An example system comprises an integrated circuit including a hardware inexact floating-point logarithmic number system (FPLNS) divider configured to perform FPLNS functions, the integrated circuit configured to: access registers containing a first floating-point binary value and a first logarithmic binary value of the first floating-point binary value, each of the first floating-point binary value and the first logarithmic binary value being in an FPLNS data format, the first floating-point binary value in the FPLNS format including a sign bit followed by exponent bits, the exponent bits followed by mantissa bits; access registers containing a second floating-point binary value and a second logarithmic binary value of the second floating-point binary value, each of the second floating-point binary value and the second logarithmic binary value being in an FPLNS data format, the second floating-point binary value in the FPLNS format, dividing, by the FPLNS divider, the first floating-point binary value and the second floating-point binary value, the FPLNS divider configured to: subtract, using an approximate adder, at least a portion of the first logarithmic binary value to at least a portion of the second logarithmic binary value to form a first logarithmic sum, shift a bias constant by a number of bits of the mantissa of the first floating-point binary value to form a first shifted bias value, subtract a correction factor from the first shifted bias value to form a first corrected bias value, and add the first corrected bias value from the first logarithmic sum to form a first result, and the integrated circuit being further configured to perform an antilogarithm on the first result to generate a division result of the multiplication of the first floating-point binary value and the second floating-point binary value.

[0026] In some embodiments, the system includes a processor configured to: convert the first floating-point binary value to the first logarithmic binary value, the first floating-point binary value being in the FPLNS format, the processor configured to convert the first floating-point binary value to the first logarithmic binary value comprising the processor configured to: determine a base-2 logarithm of a quantity of one plus a mantissa of the first floating-point binary value to form a first log quantity, add, using the approximate adder, at least a portion of the first log quantity to the exponent of the first floating-point binary value to form a first total, and subtract the bias constant from the first total to form the first logarithmic binary value, and convert the second floating-point binary value to the second logarithmic binary value, the first floating-point binary value being in the FPLNS format, the processor configured to convert the second floating-point binary value to the second logarithmic binary value comprising the processor configured to: determine a base-2 logarithm of a quantity of one plus a mantissa of the second floating-point binary value to form a second log quantity, add, using the approximate adder, at least a portion of the second log quantity to the exponent of the second floating-point binary value to form a second total, and subtract the bias constant from the second total to form the first logarithmic binary value.

[0027] In some embodiments, the multiplication result is in the FPLNS format. In various embodiments, subtract, using the approximate adder, the at least a portion of the first logarithmic binary value to the at least a portion of the second logarithmic binary value to form the first logarithmic sum comprises subtract, using an exact adder, a first set of significant bits of the first logarithmic binary value from a first set of significant bits of the second logarithmic binary value, and subtract, using the approximate adder, a second set of less significant bits of the first logarithmic binary value from a second set of less significant bits of the second logarithmic binary value, the first set of significant bits of the first logarithmic binary value being more significant than the second set of significant bits of the first logarithmic binary value, and the first set of significant bits of the second logarithmic binary value being more significant than the second set of significant bits of the second logarithmic binary value.

[0028] The bias constant may be 2(E−1)−1, where E is the number of bits in the exponent of the first floating-point binary value in the FPLNS format. In some embodiments, the FPLNS multiplier retrieves the correction factor from one or more registers that do not contain the first floating-point binary value, the first logarithmic binary value, the second floating-point binary value, and the second logarithmic binary value.

[0029] In various embodiments, the correction factor is within a range of 0.04 to 0.06. The exponent bits of the first floating-point binary value in the FPLNS format may be, in some embodiments, positioned such that a highest exponent bit of the exponent bits is closest to the sign bit and a lowest exponent bit is closest to the mantissa bits, the mantissa bits of the first floating-point binary value of the FPLNS format being positioned such that the highest mantissa bit of the mantissa bits is closest to the exponent bits and the lowest mantissa bit is farthest from the exponent bits. The exponent bits of the first logarithmic binary value in the FPLNS format may be positioned such that the highest exponent bit of the exponent bits is closest to the sign bit and the lowest exponent bit is closest to the mantissa bits, the mantissa bits of the first logarithmic binary value of the FPLNS format being positioned such that the highest mantissa bit of the mantissa bits is closest to the exponent bits and the lowest mantissa bit is farthest from the exponent bits.

[0030] In some embodiments, the FPLNS multiplier is further configured to divide a third floating-point binary value and a fourth floating-point binary value, the third floating-point binary value and the fourth floating-point binary value being in the FPLNS data format, the FPLNS multiplier being configured to divide the third floating-point binary value and the fourth floating-point binary value by: subtracting, by the FPLNS multiplier, a third logarithmic binary value of the third floating-point binary value from the fourth logarithmic binary value of the fourth floating-point binary value to form a first logarithmic difference, shifting the bias constant by a number of bits of the mantissa of the third floating-point binary value to form the second shifted bias value, subtracting the correction factor from the second shifted bias value to form a second corrected bias value, and adding the second corrected bias value from the first logarithmic sum to form a second result, and the integrated circuit being further configured to perform an antilogarithm on the second result to generate a division result of the division of the third floating-point binary value and the fourth floating-point binary value.

[0031] An example method comprises accessing registers by an integrated circuit, the registers containing a first floating-point binary value and a first logarithmic binary value of the first floating-point binary value, each of the first floating-point binary value and the first logarithmic binary value being in an FPLNS data format, the first floating-point binary value in the FPLNS format including a sign bit followed by exponent bits, the exponent bits followed by mantissa bits, the integrated circuit including a hardware inexact floating-point logarithmic number system (FPLNS) multiplier configured to perform FPLNS functions, accessing registers by the integrated circuit containing a second floating-point binary value and a second logarithmic binary value of the second floating-point binary value, each of the second floating-point binary value and the second logarithmic binary value being in an FPLNS data format, the second floating-point binary value in the FPLNS format, dividing, using an approximate adder, at least a portion of the first floating-point binary value and at least a portion of the second floating-point binary value, the division comprising: subtracting, by the approximate adder, the first logarithmic binary value from the second logarithmic binary value to form a first logarithmic sum, shifting a bias constant by a number of bits of the mantissa of the first floating-point binary value to form a first shifted bias value, subtracting a correction factor from the first shifted bias value to form a first corrected bias value, and adding the first corrected bias value from the first logarithmic sum to form a first result; and performing an antilogarithm on the first result to generate a multiplication result of the multiplication of the first floating-point binary value and the second floating-point binary value.BRIEF DESCRIPTION OF THE DRAWINGS

[0032] FIG. 1 depicts an example semiconductor chip 104 that includes an FPLNS multiplier.

[0033] FIG. 2 depicts an FPLNS system in some embodiments.

[0034] FIG. 3 is an example of an FPLNS format for a floating-point value

[0035] FIG. 4 is an example of an FPLNS format for a logarithmic value.

[0036] FIG. 5A is a plot of log2(1+X) and X+C where C=0 in an example.

[0037] FIG. 5B is a plot of log2(1+X) and X+C where C=0.0473 in an example.

[0038] FIG. 6 is an example of a FPLNS format with a radix point defined at the arrow for the fixed-point base-2 logarithm.

[0039] FIG. 7A depicts a flowchart for multiplying two logarithmic binary values using the FPLNS process where the correction factor MU is a constant.

[0040] FIG. 7B depicts a flowchart for multiplying two logarithmic binary values using the FPLNS process where the correction factor MU is a variable.

[0041] FIG. 8A depicts a flowchart for dividing two logarithmic binary values using the FPLNS process where the correction factor MU is a constant.

[0042] FIG. 8B depicts a flowchart for dividing two logarithmic binary values using the FPLNS process where the correction factor MU is a variable.

[0043] FIG. 9A depicts an example process of FPLNS logarithm base C in some embodiments.

[0044] FIG. 9B depicts another example process of FPLNS logarithm base C in some embodiments.

[0045] FIG. 10 depicts exponentiation process 1000 in some embodiments.

[0046] FIG. 11 depicts an example process of classification utilizing FPLNS functions in some embodiments.

[0047] FIG. 12 depicts example adder implementations with 4 bits in some embodiments.

[0048] FIG. 13 depicts an alternate example adder implementation with 16 bits in some embodiments.

[0049] FIG. 14 depicts adder implementations with 16 bits built from smaller adders in some embodiments.

[0050] FIG. 15 depicts hybrid approximate adders in some embodiments.

[0051] FIG. 16 depicts an example floating point adder that can be parameterized for any number of exponent bits E and fraction bits M in some embodiments.

[0052] FIG. 17 is a flowchart for FPLNS logarithm base 2 using approximate addition in some embodiments.

[0053] FIG. 18 depicts FPLNS exponentiation base C in some embodiments.

[0054] FIG. 19 depicts an example generalized arithmetic unit (ALU) that can incorporate exact logic, floating point logic, or approximate logic such as the FPLNS unit in some embodiments.

[0055] FIG. 20 depicts a systolic array in some embodiments.

[0056] FIG. 21 depicts a systolic array using a weight-stationary organization in some embodiments.

[0057] FIG. 22 is a block diagram illustrating a digital device capable of performing instructions to perform tasks as discussed herein.

[0058] FIG. 23 illustrates an example table and associated approximation data corresponding to a logarithmic approximation architecture in accordance with various embodiments.

[0059] FIG. 24 depicts an illustrative circuit for utilizing a correcting factor in some embodiments.

[0060] FIG. 25 illustrates an example region-selective correction architecture configured to reduce approximation error associated with logarithmic multiplication while reducing computational complexity, switching activity, and power consumption relative to globally corrected logarithmic approximation systems in some embodiments.

[0061] FIG. 26 illustrates an example partial-correction circuit for an 8-bit mantissa input in some embodiments.

[0062] FIG. 27 illustrates a generalized partial-correction circuit applicable to a mantissa of any selected bit width, where the mantissa represents a fractional value scaled to be within a range from 0 to 1 in some embodiments.

[0063] FIG. 28 illustrates an example fixed piecewise approximation table depicting a reduced approximation error associated with logarithmic multiplication while utilizing simplified combinational logic and simplified subtraction operations relative to correction architectures that subtract multibit correction quantities in some embodiments.

[0064] FIG. 29 illustrates an example circuit implementation for the fixed piecewise approximation in some embodiments.

[0065] FIG. 30 illustrates a generalized circuit architecture for implementing a piecewise approximation or correction function for a binary input value of arbitrary bit length in some embodiments.

[0066] FIG. 31 illustrates a table representative fixed piecewise approximation for a 16-bit input value in some embodiments.

[0067] FIG. 32 illustrates an example circuit implementation for a fixed piecewise approximation using a 16-bit mantissa or fixed-point fractional value scaled to be within a range from 0 to 1 in some embodiments.

[0068] FIG. 33 illustrates an example circuit implementation for a fixed piecewise approximation using a 10-bit mantissa or fixed-point fractional value scaled to be within a range from 0 to 1 in some embodiments.

[0069] FIG. 34 illustrates an example generalized circuit implementation for a fixed piecewise approximation using an r-bit mantissa or fixed-point fractional value scaled to be within a range from 0 to 1 in some embodiments.DETAILED DESCRIPTION

[0070] In various embodiments, a library of approximate computation arithmetic functions for ML computation significantly reduces circuit complexity with less than 1% accuracy loss across models (e.g., ResNet and MobileNetV1). Some embodiments enable: 90% smaller circuit size, 68% less power, and 55% less latency in 45 nm.

[0071] Approximate computing arithmetic algorithms discussed herein may perform, for example, multiplication, division, exponentiation, and logarithms. These operations may be the basis for many activation functions. These approximate computation techniques may also synergize with many other commonly used approximation techniques deployed today such as pruning and weight compression.

[0072] Various embodiments described herein utilize a number format that combines a floating-point number format with a biased logarithmic number system (FPLNS number system). This allows the same bits to store both the original number and its logarithm with the same set of bits. A special biasing factor may minimize average error which may maximize model accuracy. In one example, this allows a model trained traditionally, or even provided by a 3rd party, to be used with FPLNS computation inference engine with less than 1% model accuracy loss whereas traditional LNS methods can suffer from 5% model accuracy loss or greater during inference.

[0073] In various embodiments, floating-point accuracy in addition / subtraction computations is improved or optimized over the prior art. Further, there is improved accuracy in approximate FPLNS multiplication / division computations over previous implementations (e.g., with worst case relative error magnitude of 8%). Further, systems and methods discussed herein may perform inexact logarithm and exponentiation functions in hardware using only bit permutation and fixed-point addition which enables higher-order activation functions like softmax.

[0074] It will be appreciated that with the FPLNS system described herein, no look-up tables or piecewise-linear tables are required.

[0075] The customers we will target are system-on-chip (SoC) designers and field programmable gate array (FPGA) integrators that develop or deploy ML accelerator intellectual property (IP) for implementation in edge products. The IP cores often include hundreds to thousands of MAC cores for fast computation.

[0076] There is also a need for fast computation of the softmax activation function. With several thousand fabless semiconductor SoC companies and tens of thousands more companies that use FPGA for integration, ML accelerator cores have been re-implemented repeatedly to focus solely on ML acceleration. With the industry consolidating in the coming years, only the most power and efficient ML accelerator companies will thrive in edge devices.

[0077] Previous research has shown that several machine learning algorithms are resilient to floating-point formats that used reduced precision. The core of any machine learning model relies on many multiply-accumulate operations so there is potential for optimization of power.

[0078] Various embodiments are implemented at a hardware level in either field programmable gate arrays (FPGAs) or application-specific integrated circuits (ASICs). In some embodiments, there is a reduction in clock cycles when implemented in software. Some embodiments of functions discussed herein may be implemented as IP cores (e.g., Verilog cores) to be licensed to FPGA and ASIC hardware producers / developers.

[0079] FIG. 1 depicts an example semiconductor chip 104 that includes an FPLNS multiplier. Various embodiments described herein significantly reduce the total hardware complexity of multiplication and exponentiation through the use of a hybrid floating-point / logarithmic-number (FPLNS) multiplier. This reduction in digital complexity potentially can lead to significant savings in power consumption while increasing performance with minimal loss of ML model accuracy.

[0080] Both chip 102 and chip 104 in this example include a routed 32-bit multiplier in 45 nm. The original multiplier is on chip 102. An FPLNS multiplier with implementation discussed herein (e.g., that utilizes FPLNS data storage format as discussed herein and shown in FIGS. 3 and 4) is on chip 104. Chip 104 is significantly smaller than chip 102 owing to the FPLNS multiplier system implemented in the hardware.

[0081] In the example of FIG. 1, chip 104 includes a size reduction of 90% for 32-bit floating-point multiplier in 45 nm over chip 102. Further, chip 104 in FIG. 1 has a power reduction of 68% for 32-bit floating-point multiplier in 45 nm over chip 102. Moreover, chip 104 has latency reduction of 55% for 32-bit floating-point multiplier in 45 nm over chip 102. Further, in the example of FIG. 1, chip 104 has a 6.85 times improvement in performance to power over chip 102 due to the FPLNS multiplier on chip 104. Utilizing the FPLNS system of chip 104 in the example of FIG. 1, chip 104 has 18.6 times performance over area when compared to chip 102.

[0082] Further, in the example of FIG. 1, with a node of 45 nm, the multipliers may be compared as follows:FP32 StandardFPLNSMultiplier of Chip 102Multiplier of Chip 104Cells: 4624Cells: 423Latency: 3.5 nsLatency: 1.6 nsPower: 2.26 mWPower: 20.722 mWArea: 12,544.0 um2Area: 1,474.56 um2Perf / Pwr: 126.4 MhZPerf / Pwr: 856.7 MhZPerf / Area: 0.0228 Mhz / um2Perf / Area: 0.4239 Mhz / um2

[0083] With a node of 7 nm, the FPLNS chip (e.g., chip 104) may also have significant improvements over a BF16 standard multiplier. The multipliers may be compared as follows:BF16 StandardFPLNSMultiplier of Chip 102Multiplier of Chip 104Cells: 598Cells: 222Latency: 1425.12 psLatency: 433.16 psPower: 277 uWPower: 119 uWArea: 77.0 um2Area: 37 um2Perf / Pwr: 2.533 MhZ / um2Perf / Pwr: 18.03 MhZ / um2Perf / Area: 9.113 Mhz / um2Perf / Area: 57.98 Mhz / um2

[0084] Some embodiments significantly reduce the total hardware complexity of multiplication and exponentiation through the use of a hybrid floating-point / logarithmic-number system (FPLNS). This reduction in digital complexity can lead to significant savings in power consumption while increasing performance but with negligible model accuracy loss. The core of any machine learning model relies on many multiply-accumulate operations so there are improvements for efficiency. Further, the chip 104 has benefits in power, performance, and area over chip 102 without impacting ML model accuracy (e.g., less than 1% accuracy loss proven in both ResNet and MobileNetV1 models).

[0085] Previous research has shown that several machine learning algorithms are resilient to floating-point formats that used reduced precision. The core of any machine learning model relies on many multiply-accumulate operations so there is potential for optimization of power.

[0086] FIG. 2 is an example of FPLNS system 300 in some embodiments. The FPLNS system 200 may be integrated within an integrated circuit (e.g., FPGA and / or ASIC) or may be software (e.g., an IP core). The FPLNS system 200 may be implemented within an integrated circuit (e.g., as an FPLNS multiplier) or as an IP core. The FPLNS system 200 may reduce power consumption relative pre-existing systems that perform these calculations. In one example, the power consumption of the integrated circuit may be less than 3 W with greater than 4 Tera Operations Per Second (“TOPS”). In some embodiments, the FPLNS scaling system 300 may be or include an ML accelerator and a compiler (e.g., OONX compiler).

[0087] In various embodiments, the FPLNS system trades multiplication and exponentiation accuracy in exchange for reduced logic complexity and / or circuit size. The reduced logic complexity leads to lower power consumption with higher performance. Although operation accuracy suffers, ML model accuracy loss can be less than 1%. The metrics of area, speed, and power are the key determinants of cost in the semiconductor space. There is a trend towards smaller precision floating-point formats because multiplication complexity reduces quadratically with a reduced number of bits in the mantissa of floating-point numbers. In one example, the FPLNS system discussed herein may reduce multiplication to linear complexity with E+5 bits of average precision.

[0088] FIG. 3 is an example of an FPLNS format for a floating-point value. The same format may be utilized for a floating-point value and a logarithmic value. FIG. 4 is an example of the FPLNS format defined with a radix point at the arrow for the fixed-point base-2 logarithm.

[0089] In FIGS. 3 and 4, “s” refers to the sign bit, “e”s refer to the exponent values, and “m”s refer to the mantissa values. The FPLNS data format holds real number and logarithm base-2 simultaneously in the same bits.

[0090] In FIG. 3, a floating-point value in this format is equal to (−1){circumflex over ( )}s*(1+m / (2{circumflex over ( )}M))*2{circumflex over ( )}(e−B) such that b=2{circumflex over ( )}(E−1)−1. The sign bit 410 is a 1-bit unsigned int. The e may be an E-bit unsigned int, and m may be an M-bit unsigned int.

[0091] In this example, the format uses a biased sign-magnitude format. For a fixed point number represented in the format there is a sign bit, a whole portion (e bits or exponent bits 420 of FIG. 4), and a fraction portion (m bits or mantissa bits 430). They are layered on top of each other. The biassing (bias B), in this example, is equal to 2(E−1)−1.

[0092] FIG. 4 is an example of an FPLNS format for a logarithmic value. As discussed herein, the format for the logarithmic value and the floating-point value is the same format. In FIG. 4, a logarithmic value in this format corresponds to e−B+(m+MU) / (2{circumflex over ( )}M). The radix point is between the LSB(e) and the MSB(m). In this example, the format uses a biased sign-magnitude format. For a fixed point number represented in the format there is a sign bit, a whole portion (e bits or exponent bits 450 of FIG. 4), and a fraction portion (m bits or mantissa bits 460) with a radix point between the e bits and the m bits. They are layered on top of each other. The biassing (bias B) is a constant and is equal to 2(E−1)−1. If we have 8 bits for E (E=8), this implies B=127. M in this example is the fraction portion of the fixed-point format. This is biased by the factor Mu (i.e., the correction factor C). The correction factor (Mu) in this example may be between (0.0-0.99). In one example, Mu is a value such as 0.043. In various embodiments, 0<=Mu<2{circumflex over ( )}M (e.g., M is the number of bits of the mantissa). Mu may be variable or a constant.

[0093] The FPLNS system also specified collection of arithmetic functions for operating on data.

[0094] In various embodiments, the hybrid floating-point / logarithmic-number system (FPLNS) represents both the original k-bit floating-point number N and its base-2 logarithm L using the same set of k bits without any extra information. If a digital designer wishes to use L in an operation, then the designer may account for a data-independent bit permutation operation, and an addition of a constant biasing factor B. Because the commonly used floating-point formats are semi-logarithmic formats, a floating-point number can be converted to an approximate logarithm through the use of a bit-permutation and a single fixed-point addition by constant B for the transform to L. Use of the original number N is accomplished by using the traditional floating-point (FP) operations without modification.

[0095] Once a hybrid representation of both the number N and its base-2 logarithm L is established, it is possible to implement multiplication and division directly from the biased logarithm by using two fixed-point addition operations and a bit permutation: one addition of the L1 and L2 values, and a second addition of the bias B. It will be appreciated that addition and / or subtraction may utilize an approximate adder, an exact adder, or both (e.g., a hybrid adder) as discussed herein. Exponentiation and logarithms may also be calculated directly by bit-permutation operations. Transcendental functions for ML may be implemented using Newton's method or a Taylor series. By using FPLNS, it is possible to reduce the complexity of multiplication and exponentiation functions by an order of magnitude. Because the loss in accuracy due to this approximate representation minimally affects ML model accuracy, the power efficiency increases significantly.

[0096] A large body of published research exists that demonstrates reduced complexity of multiplication and division using logarithmic number systems (LNS). While multiplication in LNS is improved, performing both multiplication and addition are required for most numerical algorithms. Unfortunately, exact addition in LNS is not easy. Piecewise linear approximations, look-up tables, or other hybrid methods are required to convert between logarithmic and linear domains, or to compute more complicated transcendental functions. Various systems described herein may not utilize look-up tables, or piecewise linear approximations.

[0097] Various embodiments of the hybrid floating-point / logarithmic-number system (FPLNS) discussed herein represent both the original k-bit floating-point number N and its base-2 logarithm L using the same set of k bits without any extra information. In one example implementation in some embodiments, if a digital designer wishes to use L in an operation, then the designer may account for a data-independent bit permutation operation, and an addition of a constant biasing factor B. This discussion is based around 32-bit IEEE754, but this representation can be extended to any bit length. Because the commonly used floating-point format is a semi-logarithmic format, it can be converted to an approximate logarithm through the use of a bit-permutation and a single fixed-point addition by constant B for the forward transform to L. Using the original number N is accomplished by using the traditional half-precision or full-precision floating-point (FP) operations without modification.

[0098] For example, the number N can be represented as:N=(1.0+M)×2E−B

[0099] In IEEE754 32-bit format, E is a non-negative 8-bit integer, B is a constant value 127, and M is the 23-bit mantissa. If the base-2 logarithm is taken, L may be presented as follows:L=log2N=log2(1+M)+E−B

[0100] M is a value that is between 0 and 1. This is important to note because of this approximation:log2(1+M)≈M+C Where factor C is a correction factor (referred to herein also as Mu).This is shown graphically for two possible values of C in FIGS. 5A and 5B. FIGS. 5A and 5B depict graphs with two possible values of C for the above example. FIG. 5A is a plot of log2(1+X) and X+C where C=0 in an example. FIG. 5B is a plot of log2(1+X) and X+C where C=0.0473 in an example.

[0102] In various embodiments, there are two methods to minimize error: minimizing the maximum error or minimizing the average error. While minimizing the maximum error will place a boundary on calculations that depend on L, minimizing the average error over all possible fractional values provides better ML model accuracy results. As a result, L can be represented as:L=E−B+M+C

[0103] Another example of a logarithmic value (sign ignored) is given in the (E+M+1) bit format which may correspond toL⁡(val)=e-B+(m+MU)2M.E=number of bits, e=value in binary. M=number of bits, and m=value in binary. B is the bias for the e portion and Mu is the bias for the lower portion. E−B+(M+Mu) / (2{circumflex over ( )}M) shifted right by M bits. E bits are in a first register M bits is in second register. When divided by 2 to the M, it shifts it right by m bits.The value E+M may represent the logarithm of N plus the bias, minus the correction factor. This follows the previous equation:L+B−C=E+M Again, correction factor “C” is Mu. Based on this approximation, the FPLNS binary representation of L may be defined as a fixed-point format layered on top of the IEEE754 format using the same 32 bits as shown in FIG. 6. FIG. 6 is an example of a FPLNS format with a radix point defined at the arrow for the fixed-point base-2 logarithm. The bias / correction is an implied constant. Therefore, the floating-point format when viewed differently provides a method for operating on the logarithm. It will be appreciated that the biasing factor B and correction factor C (both constants) may be accounted for.

[0106] As follows, it is now possible to define multiplication and division in terms of the approximate logarithms:N1×N2=L1+L2+B−C=M1+E1+M2+E2−B+C

[0107] In various embodiments, in order to compute the product of N1 and N2, an example algorithm may use uses the following steps:

[0108] 1. Separate the sign bits S1, and S2.

[0109] 2. Sum the bottom n−1 bits using fixed-point (integer) addition.

[0110] 3. Add the precomputed constant (B−C) in fixed-point format.

[0111] 4. Compute the sign bit S=S1⊕S2.

[0112] This algorithm may have an effective linear complexity with respect to the number of bits. As a corollary, the division algorithm can be defined the same way as per the following equation:N1N2=L1-L2-B+C

[0113] While not essential to a large number of recent machine learning models, division may be useful when defining activation functions like softmax and ReLU.

[0114] The FPLNS architectural model is not limited to 32-bit floating-point but may be generalized to arbitrary levels of precision in both floating-point and integer formats. While values of B and C are specified for FP32 floating-point here, it is possible to derive new values for FP16, and BF16. FPLNS computation of INT8 multiplication is possible if int-float conversion is used.

[0115] The FPLNS system 200 comprises an input module 202, an addition module 204, a multiplication module 206, a division module 208, a log module 210, an exponentiation module 212, a higher order module 214, and a datastore 216. The FPLNS system 200 may be implemented by an FPLNS multiplier (e.g., a hardware FPLNS multiplier integrated into an integrated circuit such as depicted in FIG. 1). In some embodiments the FPLNS system 200 may control a processor, multiplier (e.g., FPLNS multiplier), and / or the like to perform any of the FPLNS functions described herein. In some embodiments, a processor may access registers while the FPLNS multiplier performs FPLNS functions or assists in performing FPLNS functions.

[0116] Returning to FIG. 2, the FPLNS system 200 includes the input module 202 which may optionally organize or store data using the FPLNS data format depicted in FIGS. 3 and 4. The input module 202 may sort the exponent bits in order of size, such that the highest exponent bit 322 of the exponent bits 320 is closest to the sign bit 310 and the lowest exponent bit 324 is closest to the mantissa bits 330 (as shown in FIG. 3). Similarly, the input module 302 may sort the mantissa bits 330 in order of size such that the highest mantissa bit 332 of the mantissa bits is closest to the exponent bits and the lowest mantissa bit 334 is farthest from the exponent bits.

[0117] Similarly, referring to FIG. 4, the input module 202 may sort the exponent bits in order of size such that the highest exponent bit 452 of the exponent bits 450 is closest to the sign bit 440 and the lowest exponent bit 454 is closest to the mantissa bits (as shown in FIG. 4). Similarly, the input module 202 may sort the mantissa bits 460 in order of size such that the highest mantissa bit 462 of the mantissa bits is closest to the exponent bits and the lowest mantissa bit 464 is farthest from the exponent bits.

[0118] The input module may receive and / or convert any amount of data into the FPLNS format.

[0119] In various embodiments, the input module 202 may optionally convert floating-point binary values (e.g., in the FPLNS format) to logarithmic binary values. For example, the input module 202 may: (1) take the base-2 logarithm of a quantity of one plus a mantissa of the first floating-point binary value to form a first log quantity, (2) add the first log quantity to the exponent of the first floating-point binary value to form a first total, and (3) subtract a constant bias from the first total to form the logarithmic binary value. In one example, a logarithmic binary value of a floating-point binary value is log2(1+M)+E−B. In another example, the input module 202 may generate a logarithmic binary value by the following:L⁡(val)=e-B+(m+MU)2Mwhere e=exponent value in binary, M=number of bits of the mantissa, and m=mantissa value in binary, B is the constant bias (e.g., B=2(E−1)−1, where E=number of bits of the exponent), and MU is the correction factor C. The correction factor MU may be a constant depending on usage or a variable (e.g., provided by a user and / or taken from a register). In one example, MU is a value such as 0.043. MU is between 0.0 to 9.9. In some embodiments MU is between 0.04 to 0.06.For machine learning, rough approximations can be used (e.g., no newton's methods) because the degree of accuracy is not necessary (e.g., for classification, mean square error for FPLNS softmax is on the order of 0.0003). In some embodiments, for ResNet 18 (mu of 0.0) provides a loss of 4-6%.

[0121] The addition module 204 may perform the addition of any two binary values or two logarithmic values. In some embodiments, the FPLNS system shares the same floating-point addition operation of IEEE 754. Addition and subtraction may be calculated using the standard floating-point addition operations so there is no loss of accuracy. This is a benefit as addition accuracy has been shown to be more important than multiplication accuracy in its effects on ML models. It will be appreciated that the addition module 204 may include an approximate adder, an exact adder, or both (e.g., a hybrid adder) as discussed herein.

[0122] IEEE 754 Floating-point (FP) and FPLNS share similar addition operations. The same exception flags also used: nan (not a number), inf (infinity), ov (overflow), uf (underflow), ze (zero).

[0123] The multiplication module 206 may perform multiplication of two binary values or two logarithmic values (the multiplication function being referred to herein as fplns mult (first value, second value)). The multiplication module 206 manages multiplication functions (referred to herein as fplns mult (value1, value2)). In one example, given numbers a,b in floating-point and corresponding L(x) and L(y) logarithms in FPLNS format:p=x*y [actual multiplication]L(p)=L(x)+L(y)−(B<<M)+MU[fplns mul(x,y)]In this example, the sign bit is dropped and these are fixed-point addition / subtraction operations. (B<<M) is constant and MU may be variable or constant. Note that biased forms of L(x) and L(y) require zero computation.

[0125] There may be optimized implementations with constant MU and variable MU. In some embodiments, the multiplication module 208 may use commutative and associative properties of addition / subtraction to find equivalent circuits.

[0126] In some embodiments, Sign bit p·s=XOR (x·s,y·s) (i.e., exclusive or of sign bits from x and y).

[0127] As discussed herein, in some embodiments, the sign bit is dropped and the multiplication module 206 utilizes fixed-point addition / subtraction operations. FIG. 7A depicts a flowchart for multiplying two logarithmic binary values using the FPLNS process where the correction factor MU is a constant. FIG. 7B depicts a flowchart for multiplying two logarithmic binary values using the FPLNS process where the correction factor MU is a variable. In some embodiments, the biased forms of L(x) and L(y) require zero or little computation.

[0128] It will be appreciated that when MU is a constant, a constant for MU may be encoded or based on the process being performed (e.g., a particular MU for softmax functionality and another MU for a different function). When MU is variable, the multiplication module 206 may retrieve MU from a register (e.g., a first register may hold the first logarithmic binary value to be multiplied, a second register may hold the second logarithmic binary value to be multiplied, and the third register may hold a value representing MU). In some embodiments, a user may provide MU to be used (e.g., through code or within an interface).

[0129] In FIG. 7A, the first logarithmic binary value L(x) is added to second logarithmic binary value L(y). B, the constant bias as defined above, is shifted by the number of bits in the mantissa (e.g., the mantissa of the first and / or second floating-point binary values to be multiplied). After shifting, constant MU is subtracted from the constant bias B to generate a corrected bias value. The corrected bias value is subtracted from the sum of the first logarithmic binary value L(x) and the second logarithmic binary value L(y) to generate L(z) (i.e., the antilog of Z will produce the product of the two binary values).

[0130] In FIG. 7B, the first logarithmic binary value L(x) is added to second logarithmic binary value L(y). B, the constant bias as defined above, is shifted by the number of bits in the mantissa (e.g., the mantissa of the first and / or second floating-point binary values to be multiplied). After shifting, variable MU is subtracted from the constant bias B to generate a corrected bias value. In this example, variable MU may be retrieved from a memory register. The corrected bias value is subtracted from the sum of the first logarithmic binary value L(x) and the second logarithmic binary value L(y) to generate L(z) (i.e., the antilog of Z will produce the product of the two binary values). As previously discussed, addition and / or subtraction may utilize an approximate adder, an exact adder, or both (e.g., a hybrid adder) as discussed herein.

[0131] In some embodiments, the multiplication module 206 may use commutative and / or associative properties of addition / subtraction to find equivalent circuits.

[0132] The division module 208 may perform division in some embodiments (the division function referred to as fplns div (value 1, value 2) herein). Again, the division module 208 uses the logarithmic representation. Given numbers a and b in floating-point and the corresponding L(x) and L(Y) logarithms in FPLNS format, q=x / y (actual division) and L(q)=L(x)−L(y)+(B<<M)−MU.

[0133] In various embodiments, the sign bit is dropped and these ae fixed-point addition / subtraction operations. Bias factor B is a constant (i.e., B<<M or B shifted based on the number of bits in the mantissa of the floating-point binary value is always constant). MU may be a constant or a variable as discussed with regard to the multiplication module 206. As discussed herein, the biased forms of L(x) and L(y) require zero or little computation.

[0134] FIG. 8A depicts a flowchart for dividing two logarithmic binary values using the FPLNS process where the correction factor MU is a constant. In FIG. 8A, the first logarithmic binary value L(x) is subtracted from a second logarithmic binary value L(y). B, the constant bias as defined above, is shifted by the number of bits in the mantissa (e.g., the mantissa of the first and / or second floating-point binary values to be divided). After shifting, constant MU is subtracted from the constant bias B to generate a corrected bias value. The corrected bias value is added to the difference of the first logarithmic binary value L(x) and the second logarithmic binary value L(y) to generate L(z) (i.e., the antilog of L(z) will be the division of the two binary values).

[0135] FIG. 8B depicts a flowchart for dividing two logarithmic binary values using the FPLNS process where the correction factor MU is a variable. In FIG. 8B, the first logarithmic binary value L(x) is subtracted from the second logarithmic binary value L(y). B, the constant bias as defined above, is shifted by the number of bits in the mantissa (e.g., the mantissa of the first and / or second floating-point binary values to be divided). After shifting, variable MU is subtracted from the constant bias B to generate a corrected bias value. In this example, variable MU may be retrieved from a memory register. The corrected bias value is added to the difference of the first logarithmic binary value L(x) and the second logarithmic binary value L(y) to generate L(z) (i.e., the antilog of L(z) will be the division of the two binary values).

[0136] In some embodiments, the division module 208 may use commutative and / or associative properties of addition / subtraction to find equivalent circuits.

[0137] The log module 210 converts a biased, fixed-point number to a floating-point number. In one example (the function referred to herein as fplns log2(variable)), given values x and L(x) in the FPLNS format, L(x) in this example is a 31 bit biased, fixed-point number with a sign bit (the sign bit is not a part of the 31 bit value). In the next step, the log module 210 drops the sign bit so that |L(v)| (i.e., the absolute value of L(v)) is a 31-bit number. Variable u is defined as u=|L(v)|−((B<<M)−MU). In the second step, u is converted to the floating-point format where it is converted to sign bit s and |u| and then normalized to the floating-point format with sign bit s (e.g., using a priority encoder and adders that may be found in the prior art).

[0138] In some embodiments, the log module 210 may use commutative and / or associative properties of addition / subtraction to find equivalent circuits.

[0139] In some embodiments, the log module 210 may convert to logarithm base C. Given a variable C, then K is defined as either:

[0140] K=fpnls log 2(C) (the method used above regarding the log module 210 conversion of a biased, fixed-point number)

[0141] K=Log(2) in floating-point for constant C.

[0142] Given the input value v and u=fplns log 2(v) and assuming fplns log C(x)=fplinsdiv(u,K). Here, fplinsdiv(u,K) refers to the process of division of u and K following the process depicted in flowcharts in FIGS. 8A and 8B.

[0143] FIG. 9A depicts an example process of FPLNS logarithm base C in some embodiments. FIG. 9B depicts another example process of FPLNS logarithm base C in some embodiments. It will be appreciated that these flowcharts are equivalent when considering that fplns log C(x)=fplns div(u,K).

[0144] In FIG. 9A, the log module 210 takes fplns log 2 of (x) (see above regarding fplns log2(value)). Subsequently the fplns log 2 is divided with K to output z. As discussed herein, given values x and L(x) in the FPLNS format, L(x) in this example is a 31 bit biased, fixed-point number with a sign bit (the sign bit is not a part of the 31 bit value). In the next step, the log module 210 drops the sign bit so that |L(v)| (i.e., the absolute value of L(v)) is a 31-bit number. Variable u is defined as u=|L(v)|−((B<<M)−MU). In the second step, u is converted to the floating-point format where it is converted to sign bit s and |u| and then normalized to the floating-point format with sign bit s (e.g., using a priority encoder and adders that may be found in the prior art). The division module 208 divides the output of fplns log 2(x) with K (e.g., K may be retrieved from a register).

[0145] As depicted in FIG. 8A, the first logarithmic binary value L(x) is subtracted from a second logarithmic binary value L(K). B, the constant bias as defined above, is shifted by the number of bits in the mantissa (e.g., the mantissa of the first and / or second floating-point binary values to be divided). After shifting, constant MU is subtracted from the constant bias B to generate a corrected bias value. The corrected bias value is added to the difference of the first logarithmic binary value L(x) and the second logarithmic binary value L(y) to generate L(z) (i.e., the division of the two binary values). If C is a variable, the flowchart depicted in FIG. 8B may be followed.

[0146] FIG. 9B is an equivalent process of FIG. 9A where fplns log C(x)−fplns div (u,K). In FIG. 9B, the log module 210 takes fplns log 2 of (x) in a manner similar to that described regarding FIG. 9A. Subsequently the fplns log 2 is divided with fplns log2(C) to output z. As discussed herein, given values C and L(C) in the FPLNS format, L(C) in this example is a 31 bit biased, fixed-point number with a sign bit (the sign bit is not a part of the 31 bit value). In the next step, the log module 210 drops the sign bit so that |L(C)| (i.e., the absolute value of L(C)) is a 31-bit number. Variable u is defined as u=|L(C)|−((B<<M)−MU). In the second step, u is converted to the floating-point format where it is converted to sign bit s and |u| and then normalized to the floating-point format with sign bit s (e.g., using a priority encoder and adders that may be found in the prior art). The division module 208 divides the output of fplns log 2(x) with fplns log2(C) (e.g., C may be retrieved from a register).

[0147] Base-2 logarithms and base-2 exponents may be calculated by converting from fixed-point to floating-point, or vice-versa. In some embodiments, converting can be accomplished by accounting for the bias / correction then using priority encoder with a barrel shifter.

[0148] The exponentiation module 212 performs exponentiation. In one example, the exponentiation module 212 performs exponentiation base 2 (fplns exp2 (value)). The exponentiation base 2 function is a conversion of a floating-point number to a biased, fixed-point number. Correction factor MU may be variable or constant.

[0149] Given v and L(v) in the FPLNS format, the exponentiation module 212 splits x into sign s, exponent e, and mantissa m. The mantissa m is fraction 0·m+(M−1) . . . m_0 such that m_i is bit i. Mantissa m′=1+m and SHAMT=e−B. If s==0 (if the s bit==0), then the final value is m′<<SHAMT)−MU) and if s==1, then the final value is fplnsdiv(1, ((m′<<SHAMT)−MU)). Left shift (<<) becomes right shift (>>) if SHAMT<0.

[0150] FIG. 10 depicts exponentiation process 1000 in some embodiments. Given x, the exponentiation module 212 may optionally split the sign bit, m′, and e from the fplns format of x. The process is optional in that the exponentiation module 212 may retrieve the information (and calculate m′) based on the information stored in the fplns storage format. The exponentiation module 212 may take the difference between exponent e and bias B (e.g., where B is a constant). The value m′ is shifted based on the difference of exponent e and bias B.

[0151] The exponentiation module 212 may shift B based on the bits of the mantissa and take the difference of correction factor Mu before adding the result to the shifted value m′ to form a first exponentiation value.

[0152] If the s bit is greater than or equal to 0, then the exponentiation value is output as z.

[0153] If the s bit is not greater than or equal to 0, then the division module 208 may divide (1, first exponentiation value) to output as z.

[0154] The square root module 214 may perform square root functions. In one example, the fplns square root function of (x)=fplns exp2 (fplns mult (0.5,fplns log 2(x))). Similarly, fplns square root function of (x)=fplns exp2(float (L(x)>>1)). 0.5 may be a constant. L(x) is the unbiased, fixed-point logarithm base 2. Shifting right by 1 is the same as division of integer by 2. In some embodiments, the fplns operations may be partially substituted with standard floating-point operations. Float (y) converts a fixed-point value y to floating-point.

[0155] The square root module 214 may also perform Nth root functions. For example, fplns root (x)=fplns exp2 (fplns mul (1 / n, fplns log2(x))) or fplns root (x)=fplns exp2 (fplns div (fplns log 2 (x), n). 1 / n may be a constant. In some embodiments, 1 / n may be substituted with fplnsdiv (1, n) for variable n-th root.

[0156] In some embodiments, average error may be minimized due to log2(1+x) approximation by minimizing F(x, MU) with respect to MU. For example:F⁡(x,μ)=11-0⁢∫01log2(1+x)-(x+μ)⁢dx

[0157] Further, a maximum error due to log2(1+x) approximation can be minimized calculating MU. For example:μ=12⁢max[log2(1+x)-x]

[0158] The FPLNS system may be used in many cases. The higher order module 214, in conjunction with other modules, may perform higher order functions. For example, the higher order module 214 may be utilized for deep learning primitive functions such as:

[0159] FPLNS 2D Convolution

[0160] FPLNS Batch Normalization

[0161] FPLNS Matrix Multiplication

[0162] FPLNS Sigmoid

[0163] FPLNS Average Pooling

[0164] FPLNS Softmax

[0165] Other functions that may be performed by the higher order module 214 using the functions discussed herein (e.g., fplns mult, fplns div, and the like) may include but are not limited to softplus, Gaussian, Guassian error linear unit (GELU), scaled exponential linear unit (SELU), leaky rectified linear unit (Leaky ReLU), Parametric rectified linear unit (PreLU), sigmoid linear unit (SiLU, Sigmoid shrinkage, SiL, or Swish-1), Mish, erf(x), hyperbolic cosine, hyperbolic sine, hyperbolic tangent, continuously differentiable exponential linear unit (CELU), Exponential Linear Unit (ELU), hard sigmoid, hard Swish, logarithmic softmax, and softsign.

[0166] The higher order module 214 may implement higher order functions as state machines or may pipeline processes. In some embodiments, the higher order module 214 may take advantage of Taylor expansion or Newton's method in performing one or more functions.

[0167] One or more of the fplns functions discussed herein may be utilized in any number of different functions or processes. In some embodiments, fplns functions may be utilized with accurate functions (e.g., in an ensemble approach depending on needs). Fplns functions, however, may perform many tasks more quickly with power savings than accurate functions or combinations of fplns and accurate functions.

[0168] For example, image processing may take advantage of fplns functions for improvements in speed, scaling, and power efficiency over the prior art, thereby improving upon the technical deficiencies of pre-existing technological solutions.

[0169] The datastore 216 may include any number of data structures that may retain functions. In various embodiments, functions discussed herein are implemented in hardware (e.g., using an fplns multiplier) within an integrated circuit and / or using an IP core.

[0170] FIG. 11 depicts an example process of classification 1100 utilizing fplns functions in some embodiments. In FIG. 11, a set of images 1102 may be received. In one example, the images 1102 is the Modified National Institute of Standards and Technology database (MNIST) image set from the MNIST database. The MNIST is a large database of handwritten digits ranging from 0 to 9 that is commonly used for training various image processing systems.

[0171] Matrix multiplication may be performed using fplns mult functions as discussed herein (i.e., fplns multiplication) for considerable improvements in speed, scaling, and power (especially when considering the number of times the multiplication function must be performed).

[0172] In this example, an image of 28×28 is taken in and converted into a one-dimensional array of 784.

[0173] In this simple example, the one-dimensional array of 784 is multiplied in step 1110 by a weighting matrix 1108 of 784×16 to produce a vector of 16 values 1112.

[0174] The vector of 16 values 1112 is similarly multiplied in step 1116 by a weighting matrix 1114 of 16×16 to produce a vector of 16 values 1118.

[0175] The vector of 16 values 1118 is similarly multiplied in step 1122 by a weighting matrix 1120 of 16×10 to produce a vector of 10 values 1124.

[0176] As discussed herein, each matrix multiplication function (e.g., in steps 1110, 1116, and 1122) may utilize fplns multiplication functions.

[0177] An activation function 1126 is performed on the vector of 10 values 1124 to create a vector of percentages which may then be used to classify the image 1104. Examples of multiplication functions may include a sigmoid function or a softmax function.σ⁡(x)=11+e-x.

[0178] The sigmoid function may be as follows: In various embodiments, the fplns exponentiation function may be utilized in the denominator. Further, the fplns division function may be utilized. Alternately, there may be any combination of fplns functions and accurate functions. For example, the fplns exponentiation function may be used as well as an accurate division function. In another example, the fplns division function functions may be utilized with accurate exponentiation and / or addition.fi(x→)=exi∑ j=1J⁢exj.

[0179] The softmax function may be as follows: In various embodiments, the fplns exponentiation function may be utilized in the denominator and the numerator. Further, the fplns division function may be utilized. Alternately, there may be any combination of fplns functions and accurate functions. For example, the fplns exponentiation function may be used as well as an accurate exponentiation function. In another example, the fplns exponentiation functions may be utilized with accurate division and / or addition. Alternately, fplns division functions may be utilized with accurate exponentiation functions.

[0180] The fplns functions enable significant improvements in speed, scaling, power, and efficiency. The fplns functions also support a wide variety of high-level functions.

[0181] While accuracy of basic FPLNS arithmetic primitives may show significant inaccuracies, the net effect on several models is minimal as follows:ModelData setAccuracyFPLNS AccuracyAccuracy LossFully connectedMNIST87.5% 87.4% 0.1% MobilNetV1MNIST98.46%98.19%0.27%ResNet18ImageNet69.76% / 89.08%69.22% / 88.79%0.54% / 0.29%ResNet50ImageNet76.13% / 92.86%75.22% / 92.56%0.91% / 0.30%

[0182] In this example, four models have been implemented using approximate FPLNS primitives for multiplication, division, inverse square root, and exponentiation. The fully connected model, used as an initial test model, is a 3-level network that uses sigmoid activation functions. These models were trained in a traditional fashion using exact arithmetic for up to 200 epochs. Then, the models were tested for inference using both standard and FPLNS deep learning primitive layers. Only computation algorithms were changed. The weight quantization and model architectures were unmodified. The results demonstrate that FPLNS arithmetic is clearly competitive with an accuracy loss of less than 1% across all models tested. This is better than 8-bit quantization which has 1.5% accuracy loss for ResNet50.

[0183] Integer Quantization: If an integer is first converted to floating-point, then FPLNS techniques may be used to accelerate the INT8 multiplication or activation functions. In some embodiments, FPLNS systems and methods discussed herein may be utilized in ML models which use a mix of precision across multiple layers.

[0184] Weight Pruning / Clustering: It is possible to prune zero weights from the computation. Also, it is possible to combine a cluster of weights of nearly the same value into a single value then store it in a Huffman table. Both weight pruning and clustering techniques are methods for macro-level approximate model computation and both methods can be used in tandem with FPLNS computation to achieve even lower power consumption than pruning / clustering alone. FPLNS is not mutually exclusive to pruning / clustering.

[0185] FIG. 12 depicts example adder implementations with 4 bits in some embodiments. A single exact adder of n bits can be composed of a single exact adder or a combination of smaller exact adders. An example definition of an exact adder is as follows. Given two-bit vectors A and B with n bits each, an exact adder circuit computes the sum of both A and B as S which has n bits of output. The adder circuit may have a carry-in bit, c_i (also called c_0 or c_zero) and may have a carry-out bit, c_o (also y_n or c_out). Where identified as part of a variable, the underscore represents a subscript. For example, ci=aibi may be represented as c_i=a_i & b_i. Pseudo Verilog notation also used e.g. ci=aibi may be represented as c[i]=a[i]& b[i].

[0186] Returning to vectors A and B, in this example:A=a[n−1:0]=(a[n−1], . . . ,a[0])B=b[n−1:0]=(b[n−1], . . . ,b[0])An exact adder circuit computes the sum of A and B such that S=A+B. Each bit may be computed with the following equations:s[i]=a[i]{circumflex over ( )}b[i]{circumflex over ( )}c[i]c[i+1]=a[i]&b[i]+a[i]&c[i]+b[i]&c[i]where c represents a carry vector.In some embodiments, any system which computes the digital outputs of S equivalent to those defined by s[i]=a[i] {circumflex over ( )}b[i] {circumflex over ( )}c[i] is considered an exact adder.It will be appreciated that intermediary signals (c[i], . . . , c[i+k]) encoding the relation to s[i+k] from an input a[i] or b[i] may be substituted with a logically equivalent circuit (e.g., carry-lookahead adder, carry propagate adder, dual carry-chain, etc.)Further, larger adders may be constructed from two or more smaller adders using different adder circuit schemes.

[0191] FIG. 12 includes examples of exact adder implementations with 16 bits in some embodiments. Diagram 1202 depicts an example 16-bit ripple-carry adder constructed from four identical 4-bit adder blocks. Inside each one are four full adders, adding:A[i+3:i],B[i+3:i]plus a carry-in.In this example, each block (labeled “Add1”):takes 4 bits of A4 bits of B

[0194] 1 carry-in

[0195] produces 4 sum bits

[0196] and 1 carry-out

[0197] Each block represents a 4-bit adder that takes a 4-bit slice of A (such as A[3:0], A[7:4], etc.), a corresponding 4-bit slice of B, and a single carry-in bit.

[0198] Inside each block are four full adders that collectively compute a 4-bit sum and produce a carry-out bit. The carry-out of each 4-bit block feeds directly into the carry-in of the next block, forming a chain from the least significant bits to the most significant bits. Thus, the leftmost block adds A[3:0] and B[3:0] using the global carry-in (often zero), produces S[3:0], and generates a carry that “ripples” into the next block. The next block adds A[7:4] and B[7:4] along with that incoming carry, and so on for the remaining two blocks, until the final block computes the top four sum bits S[15:12] and produces the overall carry-out. It will be appreciated that adders of arbitrary width may be created by chaining multiple small adders together.

[0199] Diagram 1204 depicts an example 8-bit adder built from two 4-bit adder blocks, each labeled “Add2.” The inputs A[7:0] and B[7:0] are divided into two 4-bit groups: the lower four bits (A[3:0] and B[3:0]) go to the left Add2 block, and the upper four bits (A[7:4] and B[7:4]) go to the right Add2 block. The left block performs the addition of the lower bits using the global carry-in (cin), producing the low-order sum bits S[3:0] and generating a carry-out. That carry-out is then fed into the carry-in of the right block, which adds the upper four bits together with the incoming carry to produce the high-order sum bits S[7:4] and the final carry-out (cout). As with a standard ripple-carry structure, the carry generated in the lower block propagates into the upper block before the overall result is complete.

[0200] Diagram 1206 depicts an example single-block 8-bit adder, labeled “Add4,” which performs the entire addition of the 8-bit input vectors A[7:0] and B[7:0] within one unified module rather than splitting the work across multiple 4-bit slices. Both 8-bit inputs feed directly into the Add4 block, along with a single carry-in (cin). Inside this block is a chain of eight full adders-one for each bit position-connected internally by ripple-carry wiring, so the carry generated by each lower bit flows to the next higher bit. The block outputs the complete 8-bit sum S[7:0] along with a final carry-out (cout). Functionally, this performs the same operation as the two-slice adder discussed above, however, in diagram 1406, all eight bits of addition and the internal carry propagation occur inside the Add4 module. This depiction shows that an 8-bit adder can be treated as a single cohesive component whose internal logic handles all bitwise additions and carry propagation, providing a clean, simple interface with 8-bit inputs, an optional carry-in, and an 8-bit sum with carry-out.

[0201] In an exact adder, each bit of the sum and each carry value is computed according to the rules of true binary addition. This means every bit position uses a full-adder equation, where the sum bit s[i] depends on three inputs (e.g., a[i], b[i], and a carry-in c[i]) and the next carry c[i+1] depends on how many of those inputs are 1. Because of this, an exact adder must propagate carries from the least significant bit up through all higher bits, which ensures mathematical correctness but introduces hardware cost, delay, and power consumption. The multi-block exact adders discussed herein all follow this same principle: each internal slice implements full binary addition and passes its carry to the next block.

[0202] FIG. 13 depicts an alternate example adder implementation with 16 bits in some embodiments. A carry prefix adder implementation alternative may be as follows:s[i]=a[i]{circumflex over ( )}b[i]{circumflex over ( )}g[i−1,−1]g[i,j]=g[i,k]|p[i,k]&g[k−1,j]p[i,j]=p[i,k]&p[k−1,j]p[i,i]=a[i]|b[i]g[i,i]=a[i]&b[i]The p[i,j] and g[i,j] signals may be logical equivalent circuits that replace c[i] signals.An approximate adder, by contrast, deliberately breaks the strict rules of binary addition at one or more bit positions in order to reduce hardware complexity, delay, or power. Instead of computing:s[i]=a[i]⊕b[i]⊕c[i]andc[i+1]=a[i]b[i]+a[i]c[i]+b[i]c[i], an approximate adder design may replace the sum equation s [i] (and often the carry equation as well) with a simpler Boolean function that is faster or cheaper to implement but not necessarily correct for all inputs. In one example, the approximate adder is defined as:s[i]=a[i]|b[i], with only one final carry outputc[n]=a[n−1]&b[n−1]In this example, the intermediate carry values c[1], c[2], . . . , c[n−1] are not defined. Because the sum bits no longer depend on carry-in values, the adder may lose the ripple-carry structure. Each bit may produce its output independently (e.g., using only a single OR gate per bit), which may simplify and accelerate the hardware. However, the numerical result no longer necessarily equals the true binary sum.As a result, exact adders preserve the full carry chain and enforce correct binary addition, while approximate adders discard or simplify the carry logic and redefine the sum function, producing results that are approximations but are much cheaper and faster to compute.Another example of an approximate adder is as follows:S=A+B for n-bit approximate adders[i]=a[i]{circumflex over ( )}b[i]|c[i]c[i+1]=a[i]&b[i]This example approximate adder differs from both an exact adder and the earlier example approximate adder by retaining a simplified notion of carry while still discarding the full arithmetic correctness of a true full adder. In an exact adder, each sum bit is computed as a[i]⊕b[i]⊕c[i], and each carry-out is produced by the full-adder expression ab+ac+bc, ensuring that carries are generated whenever two or more inputs are 1 and allowing carries to propagate through all bit positions. This example approximate adder computes the carry-out of each bit as a[i]& b[i], meaning that carries arise only when both bits are 1; situations that would normally generate a carry because of an incoming carry are ignored. The sum bit is also modified. For example, instead of combining all three inputs through XOR, it may use (a[i]⊕b[i])|c[i]. In this example, this means the sum is based on XOR of the bit-pair but is forced to 1 whenever the carry-in is 1, biasing the sum upward and breaking the parity-based behavior of exact addition. Compared to the first example approximate adder, where the sum is simply an OR and no intermediate carries exist, this second example approximate adder preserves a simplified carry chain.FIG. 14 depicts adder implementations with 16 bits built from smaller adders in some embodiments. Diagram 1402 depicts an example 16-bit exact adder constructed by cascading two smaller exact adders that together produce a full 16-bit sum with correct carry propagation. In this example, diagram 1402 depicts a 12-bit adder on the right and a 4-bit adder on the left. The lower 12 bits of the input operands, A[11:0] and B[11:0], enter the Add12 block along with the global carry-in ci. This block performs an exact 12-bit addition and outputs both the lower sum bits S[11:0] and a single carry-out bit, labeled c

[12] , which represents the carry into bit position 12 of the final 16-bit result. That carry bit is then fed directly into the Add4 block on the left, which handles the upper four bits of the operands (i.e., A[15:12] and B[15:12]). The Add4 block computes the upper portion of the sum (S[15:12]) using the incoming carry from the Add12 block as its own carry-in. Finally, Add4 produces the global carry-out co, representing the carry beyond the most significant bit.Diagram 1404 depicts an example sixteen-bit exact adder built by connecting two eight-bit exact adders in a ripple-carry configuration. The lower block labeled Add8 receives the least significant eight bits of the input operands, A[7:0] and B[7:0], along with the global carry-in signal c_i. It produces the corresponding eight least significant sum bits, S[7:0], and generates a carry output c[8] that represents the carry into bit position eight. That carry output is routed into the second Add8 block, which operates on the upper eight bits of the operands, A[15:8] and B [15:8]. The upper block uses c[8] as its carry-in, computes the upper sum bits S[15:8], and produces the final carry-out c_o.Diagram 1406 presents an example single sixteen-bit exact adder that handles the full addition operation in one unified block. The inputs A[15:0] and B[15:0] represent the complete sixteen-bit operands that enter the adder along with the global carry-in signal c_i. The Add16 block performs a full sixteen-bit binary addition using all of these inputs at once rather than dividing the computation into smaller subadders. The block produces the sixteen sum bits S[15:0] and generates a final carry-out signal c_o, which indicates whether the addition produced a carry beyond the most significant bit. Functionally, this configuration represents a monolithic sixteen-bit exact adder that computes the result in a single stage without internal carry chaining between smaller segments.FIG. 15 depicts hybrid approximate adders in some embodiments. For example, diagram 1502 illustrates an example hybrid approximate adder constructed by combining an exact adder block (ADD) with an approximate adder block (AADD) so that the lower bits are computed accurately while the upper bits are computed approximately. The left block, labeled Add4, is a conventional 4-bit exact adder that receives the low-order slices A[3:0] and B[3:0] along with the global carry-in. This block produces the correct sum bits S[3:0] and a precise carry-out based on full binary addition. That carry-out is then forwarded to the second block, labeled AAdd12, which implements a 12-bit approximate adder operating on A[15:4] and B[15:4]. Unlike the exact slice, the approximate slice uses simplified sum and carry equations that reduce hardware cost or delay at the expense of accuracy. Because the approximate block still accepts the incoming carry, the design maintains numerical consistency where lower-bit carries affect higher-bit results, but only to the extent allowed by the approximation. The outputs of the approximate block become the upper twelve sum bits S[15:4], and the block also produces the final carry-out. In various embodiments, this approach preserves exact computation where errors would be most noticeable or most damaging (e.g., in this case, the least significant bits) while applying approximation to higher bits, where errors tend to be smaller in magnitude.Diagram 1504 depicts another example of a hybrid approximate adder, but with the bit-widths of the exact and approximate sections divided evenly. The left block, labeled Add8, is an 8-bit exact adder that receives the lower half of the operands, A[7:0] and B[7:0], along with the global carry-in. This block performs full, correct binary addition on these least significant bits and produces the precise lower sum bits S[7:0] as well as a mathematically correct carry-out. That carry-out then feeds into the second block, AAdd8, which is an 8-bit approximate adder responsible for computing the upper half of the sum, S[15:8], using A[15:8] and B[15:8]. Although this approximate block still accepts the incoming carry, it generates the upper sum bits more efficiently, with lower delay, power, or hardware cost. Because the approximate logic is confined to the more significant bits, the design intentionally allows small or moderate numerical approximations in the top half of the sum while preserving exact correctness in the bottom half, where errors would be more noticeable.Diagram 1506 depicts an example three-stage hybrid approximate adder in which the 16-bit addition is partitioned into one exact region followed by two different approximate regions, each using its own internal approximation strategy. The first block, Add4, is a 4-bit exact adder that receives the lowest-order bits A[3:0] and B[3:0] along with the global carry-in. This block performs precise binary addition and produces both an accurate 4-bit sum segment S[3:0] and a correct carry-out. That carry-out then drives the second block, AAdd4 (Type 1), which is an approximate 4-bit adder applied to the next bit slice, A[7:4] and B[7:4]. This “Type 1” approximate adder uses one specific simplification rule set (e.g., a reduced carry equation or a modified sum equation) to generate S[7:4] more cheaply or quickly, while still responding to the incoming carry from the exact region. The carry-out from this Type 1 approximate slice then feeds into the final block, AAdd8, an 8-bit approximate adder that operates on the upper half of the inputs, A[15:8] and B[15:8], using its own (potentially different) approximate arithmetic rules. This structure demonstrates a configurable and hierarchical approach to approximate computing: exact addition is preserved where precision is most critical, a moderate approximation is applied in the mid-range bits where errors may be somewhat tolerable, and a more aggressive or broader-width approximation is applied to the highest-order bits where error impact may be minimized relative to performance or energy savings.Diagram 1508 depicts an example of an approximate 16-bit adder implemented as a single block. Labeled AAdd16, the block receives the entire 16-bit inputs A[15:0] and B[15:0] along with a global carry-in, and internally applies a chosen approximate-arithmetic strategy (e.g., such as simplified sum logic, reduced or eliminated carry propagation, or an aggressively pruned carry chain) across all sixteen bit positions. Unlike the hybrid designs that combine exact and approximate slices, this configuration contains no exact region; every bit, from least significant to most significant, is computed using approximate logic. As a result, the block minimizes hardware cost, delay, and energy consumption more dramatically than mixed designs, since it does not need to support full binary-addition correctness in any segment. In this example, the output consists of the approximate 16-bit sum S[15:0] and an approximate carry-out, both reflecting the behavior dictated by the internal approximation rules.An approximate adder substitutes the equation defining each sum bit of s[i] of S with a new functional definition.Example 1S=A+B for n-bit approximate adders[i]=a[i]|b[i]c[n]=a[n−1]&b[n−1]Note that c[i] is not definedExample 2S=A+B for n-bit approximate adders[i]=a[i]{circumflex over ( )}b[i]|c[i]c[i+1]=a[i]&b[i]Many other schemes for substitution are possible for s[i] and c[i+1]Signals c[i] may be replaced by another signal scheme, possibly approximate (i.e., not logically equivalent). For example, p[i,j] and g[i,j] signals from the carry prefix adder implementation.An approximate adder may be composed of multiple smaller adder circuits, which may be approximate or exact.It will be appreciated that the approximate adder and the exact adder, individually or together, may be utilized for subtraction. For example, a negated second operand may be included.In some embodiments, approximate subtraction is implemented by reusing the same hybrid approximate adder structure that performs approximate addition. Just as in two's-complement arithmetic, subtraction is carried out by adding the two's-complement negation of the second operand. To do this, the operand B may be first bitwise inverted to produce B, and the global carry-in to the adder set to 1 so that the adder computes A+B+1, which is A−B in two's complement form. The hybrid adder then operates normally. In one example, its exact lower-bit region produces a precise carry into the approximate region, and its approximate upper-bit slices generate the remaining higher-order bits of the result according to their simplified arithmetic rules. Because the approximate blocks still accept the incoming carry, the subtraction process may behave structurally like addition, although the numerical result may deviate from the mathematically exact difference due to the approximated sum and carry logic in the higher-order stages. Thus, approximate subtraction requires no specialized hardware beyond the hybrid approximate adder itself, allowing the architecture to support both approximate addition and approximation-aware subtraction within the same unified datapath.For example, A−B=A+(two's complement of B)−A+(B+1). In this example, each bit of B may be inverted, and then the inverted bits may be fed into the adder (e.g., approximate adder or exact adder) instead of B, and the global carry-in may be set to 1 to account for the “+1” in two's complement. The internal structure of the adder (e.g., whether it's all exact, all approximate, or hybrid like Add8+AAdd8) may not change.FIG. 16 depicts an example floating point adder that can be parameterized for any number of exponent bits E and fraction bits M in some embodiments. Each input operand may be first unpacked into sign, exponent, and fraction fields. The fraction is augmented with an implicit leading 1 to form the significand. A comparator and a small integer ALU, labeled “Small ALU,” compute the difference between the exponents so that the operand with the smaller exponent can have its significand shifted right by that amount. This produces an aligned pair of significands, plus guard, round, and sticky bits that track information lost during shifting. The adder selects the larger exponent as the tentative result exponent and sends the two aligned significands, together with the operand signs, to the “Big ALU.” The Big ALU performs either addition or subtraction of the aligned significands, depending on the signs, and produces an intermediate sum. That sum then passes through normalization logic, which detects whether there is a carry out that requires a right shift and exponent increment, or whether leading zeros require a left shift and exponent decrement. The Small ALU is reused for these exponent adjustments. After normalization, rounding logic examines the guard, round, and sticky bits to determine whether the significand must be incremented, possibly triggering another short normalization step. Finally, the sign, adjusted exponent, and rounded significand are repacked into the floating point format with E exponent bits and M fraction bits, yielding the result.

[0224] Within this structure, the Big ALU operates on M+1 or more bits of significand, including guard and round bits. An approximate adder, as discussed herein, could replace the Big ALU to reduce latency, area, or energy at the cost of some arithmetic error in the significand. For example, an approximate adder may simplify carry propagation and / or use approximate logic in the lower fraction bits. A hybrid arrangement is also possible, in which the Big ALU is built from an exact adder for the most significant fraction bits and an approximate adder for the least significant bits. The exact and approximate adders may be coupled by a conventional carry interface, so that the structure may behave as a single wide adder but with reduced complexity in selected regions.

[0225] The Small ALU performs shorter integer operations, primarily exponent differences for alignment and increments or decrements during normalization and rounding. In some embodiments, the Small ALU may utilize an approximate adder, an exact adder, or a combination. In one example, a hybrid exponent ALU may preserve exact addition for most exponent values but use a simplified or approximate design for rarely used ranges, or for one or two least significant exponent bits.

[0226] In various embodiments, the Big ALU and Small ALU may be instantiated as purely exact adders, purely approximate adders, or combinations of exact and approximate slices, while the surrounding control and normalization logic remains unchanged.

[0227] FIG. 17 is a flowchart for FPLNS logarithm base 2 using approximate addition in some embodiments. In some embodiments, a value stored in the Fixed-Point Logarithmic Number System (FPLNS) is converted back into a standard floating-point format, using a sequence of stages that prepare, interpret, and normalize the numeric representation. In one example, the procedure begins with L(v), a 31-bit fixed-point encoding of log2(v) that includes a sign bit because logarithmic values may be positive or negative. The first operation discards this sign bit to produce |L(v)|, which is then treated as a 31-bit unsigned magnitude; only the absolute value is needed at this stage because the sign will be reconstructed later. From this magnitude, the algorithm computes an intermediate valueu=|L(v)|−((B<<M)−MU),with all arithmetic still performed in fixed-point form. Because this subtraction may yield a negative result, the next block—FPABS—extracts the sign of u and converts u to its absolute value. FPABS effectively transforms the two's-complement fixed-point representation into a sign bit and a pure magnitude, forming the initial components of a floating-point number.Following FPABS, the SIGNMAG stage assembles a preliminary floating-point structure by combining the extracted sign bit with the magnitude |u|. At this stage, the quantity is expressed in sign-magnitude form: the sign bit is explicitly represented, and the magnitude is treated as an unnormalized significand. The exponent and mantissa, however, have not yet been normalized according to the requirements of the floating-point format. This normalization occurs in the final stage, RENORM. RENORM scans the magnitude to locate the most significant 1-bit, shifts the mantissa accordingly, and adjusts the exponent so that the value adheres to the normalization rules of the target floating-point representation. Through this process, the intermediate sign-magnitude value may be transformed into a fully normalized floating-point number.

[0229] Returning to FIG. 17, the input labeled x represents the magnitude of the fixed-point logarithmic value |L(v)|obtained after removing the original sign bit. The fpabs block performs the same function as the FPABS stage described earlier: it determines the sign of the incoming value and produces its absolute magnitude so that the downstream arithmetic operates on a clean sign-and-magnitude representation. The right side of the diagram computes the constant offset (B<<M)−MU, exactly matching the expression used to form the intermediate value u. The two branches then converge at a subtraction node, which carries out the fixed-point computation:u=|L(v)|−((B<<M)−MU).

[0230] This subtraction may be an approximate subtraction as discussed herein. The result of this subtraction is passed to the SignMag stage, which constructs a preliminary floating-point structure by combining the extracted sign with the magnitude of u, leaving the exponent and mantissa in an unnormalized state. The subsequent Renorm block corresponds to the renormalization step previously described: it scans the magnitude to locate the most significant nonzero bit, shifts the mantissa accordingly, and adjusts the exponent so that the value satisfies the normalization requirements of the target floating-point format. The final output, labeled z, is therefore the fully normalized floating-point representation of the original fixed-point logarithmic input.

[0231] In the FPLNS framework, computing a logarithm with an arbitrary base Cis performed, in some embodiments, by dividing the FPLNS base-2 logarithm of a value by the base-2 logarithm of C. When Cis itself a variable, the system first computes K=fplns log 2(C) using the same logarithmic pipeline used for any other value. When Cis a constant, however, its base-2 logarithm is precomputed in standard floating-point format to improve both accuracy and efficiency, yielding K=log2(C). For any input value v, the system also computes u=fplns log 2(v). The logarithm of vin base Cis then obtained by performing an FPLNS division of u by K, formally expressed asfplns logc(v)=fplnsdiv(u,K).

[0232] Returning to FIGS. 9A and 9B, the figures depict flowcharts for computing a logarithm with an arbitrary base C in some embodiments. FIGS. 9A and 9B illustrate how the FPLNS system computes a logarithm in an arbitrary base C by reusing its existing base-2 logarithmic and division pipelines. In one example, the process begins by obtaining the base-2 logarithm (e.g., as discussed herein) of the input value v, producing u=fplns log, (v). The system determines (e.g., potentially in parallel, although not necessarily) a scaling factor K that represents log2(C). If C is itself a variable, K is computed by passing C through the same FPLNS logarithm unit, yielding K=fplns log2(C). If C is a constant, however, K may be supplied as a precomputed floating-point constant log2(C) to improve or maximize accuracy and / or eliminate unnecessary computation. Once both u and K are available, the FPLNS division unit computes the ratio u / K. Because logarithms satisfy the identity logc(v)=log2(v) / log2(C), this division produces the desired base-C logarithm of v. The final output, labeled z, therefore represents fplns log(v), allowing the system to support arbitrary logarithm bases such as e, 10, or other user-defined constants while relying on FPLNS log-base-2 and division operations. It will be appreciated that the base-2 logarithm and / or division may utilize approximate subtraction as discussed herein.

[0233] In FPLNS exponentiation base 2, the stored logarithmic representation L(v) may be first decoded into its three components: a sign bit s, an exponent field e, and a mantissa m, where the mantissa represents a fractional value of the form 0·mM-1 mM-2 . . . m0. From this mantissa, an augmented significand m′=1.0+m may be formed, mirroring the implicit-leading-1 structure of normalized floating-point formats. The algorithm then computes a shift amount, SHAMT=e−B, which determines how far the significand must be shifted to reconstruct a power-of-two-scaled real-number value. If the sign bit s is zero, indicating a nonnegative logarithmic argument, the exponentiation result may be obtained directly as (m′<<SHAMT)−MU, where left shifts increase magnitude and a right shift is used instead when SHAMT is negative. If the sign bit is one, indicating a negative logarithmic argument corresponding to a reciprocal, the system may compute the value as an FPLNS division of unity by the same shifted quantity, that is, fplnsdiv(1, (m′<<SHAMT)−MU). Through these steps, the FPLNS representation of a logarithmic value may be efficiently converted back into its corresponding real-space magnitude using only fixed-point shifting and, when needed, a single reciprocal operation.

[0234] Returning to FIG. 10, FIG. 10 depicts a flowchart for an exponentiation base 2 procedure in some embodiments. The process begins with the input x, which is split into its three FPLNS fields: the sign bit s, the exponent e, and the augmented mantissa m′, where m′=1.0+m reflects the normalized significand structure. In parallel, a constant bias value (B<<M)−MU may be supplied for later adjustment. The exponent and bias may be subtracted to form the shift amount SHAMT=e−B, after which the significand m′ may be shifted left or right depending on the sign of SHAMT. This produces the quantity (m′<<SHAMT)−MU, shown in FIG. 18 as flowing into an addition block. The sign bit s may determine whether the final result should be taken directly or inverted by a reciprocal. If the encoded logarithmic value is nonnegative (s=0), the shifted significand may be used as the output. If the value is negative (s=1), the flow is diverted to compute the reciprocal using the FPLNS division (e.g., using exact subtraction, approximate subtraction, or both), effectively producing 1 / ((m′<<SHAMT)−MU). A final comparison may check whether the intermediate quantity is nonzero before selecting the appropriate output value z.

[0235] In FPLNS exponentiation with an arbitrary base C, the system may reuse the existing log-base-2 and exponentiation-base-2 mechanisms by first expressing exponentiation in terms of powers of two. For a given base C, a scaling factor K is formed representing log2(C). If C is variable, this factor is computed through the FPLNS logarithm unit, producing K=fplns log2(C) in floating-point form. If C is a constant, however, log2(C) is precomputed as a floating-point value to maximize accuracy and reduce hardware effort. For any input value v, the system then computes u=fplnsmul(v, K), which corresponds to multiplying the exponent v by the change-of-base factor. Because exponentiation in base C satisfies the identity C″=2vlog<sub2>2< / sub2>(C), the final step may pass u to the FPLNS base-2 exponentiation unit, yielding fplnsexpC(v)=fplnsexp2(u). It will be appreciated that log-base-2 and exponentiation-base-2 discussed herein may utilize exact addition, approximate addition, or both when practical. Further, it will be appreciated that log-base-2 and exponentiation-base-2 discussed herein may utilize exact subtraction, approximate subtraction, or both when practical.

[0236] FIG. 18 depicts FPLNS exponentiation base C in some embodiments. This flowchart illustrates how exponentiation in an arbitrary base C may be carried out within the FPLNS framework by relying on the relationship Cx=2xlog<sub2>2< / sub2>(C). The process begins with the input value x, which represents the exponent in the expression Cx. A scaling factor K may be supplied, corresponding to log2(C). If C is a constant, K may be provided directly as a precomputed floating-point constant for accuracy; if C is variable, K may be produced by passing C through the FPLNS logarithm, yielding fplns log2(C). The input x and the factor K may converge in the FPLNS multiplier, producing u=fplnsmul(x, K), which represents the exponent of the equivalent base-2 expression. This intermediate value u may then be passed to the FPLNS base-2 exponentiation unit, fplnsexp2, which may reconstruct the corresponding real-space value using the exponentiation procedure previously described for base 2. The output z may represent fplnsexp(x), enabling exponentiation for any base using FPLNS multiply, logarithm-base-2, and exponentiate-base-2 components. It will be appreciated that FPLNS multiply, logarithm-base-2, and exponentiate-base-2 may be performed using exact addition, approximate addition, a combination of exact addition and approximate addition, exact subtraction, approximate subtraction, a combination of exact subtraction and approximate subtraction, or any combination thereof.

[0237] FIG. 19 depicts an example generalized arithmetic unit (ALU) that can incorporate exact logic, floating point logic, or approximate logic, such as the FPLNS unit in some embodiments. The example ALU may accept three input operands, A, B, and C, along with an operation selector that determines which computation the internal logic performs. The central block labeled ALU / FPU / FPLNSU represents a configurable execution core capable of integer arithmetic, floating point operations, or logarithmic-domain arithmetic depending on its implementation. After the selected operation completes, the unit produces an output value Y together with an exception indicator that captures conditions such as overflow, invalid operations, or other arithmetic anomalies. This ALU illustrates, in one example, how approximate arithmetic hardware can be integrated alongside conventional integer and floating point logic.

[0238] In one example implementation, a register file contains a series of storage locations r0 through r7, each holding an n bit value that can be supplied to the ALU as input operands. The ALU (e.g., depicted in FIG. 19) may perform one arithmetic operation at a time on the selected register values and then optionally write the result back into one of the registers. The combination of the register file and the ALU may be the basis for more advanced designs in which approximate arithmetic units can be substituted for the exact ALU to reduce area or energy consumption while retaining the same high level instruction interface.

[0239] FIG. 19 depicts an example SIMD arithmetic unit in some embodiments. The example SIMD arithmetic unit is composed of several parallel ALU blocks, each labeled ALU0 through ALU3, arranged side by side so that a single instruction controls multiple data paths simultaneously. In a SIMD organization, a single register in the register file contains multiple packed data elements, and a single issued instruction causes the hardware to perform the same operation on each element in parallel during one clock cycle. To support this behavior, this example SIMD instantiates multiple FPLNSU or ALU blocks, each operating on its own slice of the wider register. In different embodiments, the number of slices depends on how the datapath is partitioned. In one example, a full width n bit operation may use all slices as one combined unit. In some embodiments, the same hardware can switch into smaller slice modes such as n over two bits across two lanes, n over four bits across four lanes, or finer subdivisions that enable increased parallelism. Some implementations may support non power of two partitioning, such as dividing the n bit register into three or seven lanes, allowing more flexible use of the hardware. In some embodiments, the SIMD ALU may utilize data parallelism by applying one opcode to several independent operands at once, with each ALU block operating concurrently on a different segment of the packed register contents.

[0240] In the example SIMD ALU of FIG. 19, the SIMD operation splits n-bit signals into multiple smaller n′-bit numbers. In this example, there are 4 ALUs, and the n-bit inputs are split into four groups of n′=n / 4-bit inputs. For an example n=64, there may be A[63:48], A[47:32], A[31:16], A[15:0] for 16-bit inputs. Corresponding signals for B and C as well. The outputs Y would be split as well.

[0241] A vector processor extends the traditional scalar CPU model by allowing each register in the register file to hold not a single value but a sequence of values that form a vector. In some embodiments, each vector register contains multiple scalar elements arranged in columns, and the arithmetic logic unit (which may utilize exact adders, approximate adders, or a combination of both) may operate on one column of elements per clock cycle across all vector registers. For example, if each register holds eight 64-bit elements, the processor performs one operation on the first element of each relevant register in cycle one, then moves to the second element in cycle two, and continues until all elements have been processed. The effective vector length is may be controlled by a special VLEN register, which allows software to specify how many elements of the vector registers participate in an operation, with the ALU automatically disabling work on columns beyond that length.

[0242] In some embodiments, the vector processor may be implemented with SIMD logic (e.g., as utilized regarding FIG. 19) with multiple elements computed per clock cycle. In some embodiments:

[0243] Styles of operators (s: scalar; v: vector):

[0244] Op s,s->s (simple scalar arithmetic, e.g., mul / div)

[0245] Op s,s->v (e.g. duplicate s1 by s2 times)

[0246] Op s,v->v (e.g. multiply s*v)

[0247] Op s,v->s (e.g. compute exp (v_i−s) and take summation

[0248] Op v,v->s (e.g., dot product)

[0249] Op v,v->v (e.g., element-wise scalar computation like v1_i+v2_i for all i)

[0250] FIG. 20 depicts a systolic array in some embodiments. A systolic array performs matrix multiplication by pushing data rhythmically through a grid of processing elements. In the output-stationary organization, each processing element is responsible for producing one output value and therefore keeps the accumulating partial sum locally. The partial result for that output element may not move during the computation. Instead, activations flow horizontally through the array and weights flow vertically. Each processing element receives an activation from the left and a weight from above, performs a multiply operation, and adds the product to its resident partial sum. After the multiply-accumulate step (which may utilize approximate addition, exact addition, or a combination of both), the activation may be forwarded to the next processing element in the row, and the weight may be forwarded to the next processing element in the column. Because the partial sum remains stationary at each processing element, the array efficiently supports GEMM operations where the result matrix remains local until the computation completes. This may reduce write traffic to memory because only the final outputs are written back once accumulation is finished.

[0251] FIG. 21 depicts a systolic array using a weight-stationary organization in some embodiments. In the weight-stationary organization, each processing element may hold a weight for the entire duration of the operation. The weight may be preloaded into the processing element and remains fixed. Activations may stream horizontally across each row and are multiplied by the stationary weight when they arrive. Partial sums may flow vertically through the array, allowing successive multiply results to accumulate as they propagate. This approach minimizes weight movement and is advantageous when weights are reused many times, such as in neural-network inference. In some embodiments, by keeping weights stationary and moving activations instead, the architecture may reduce the bandwidth demands placed on the memory system for weight retrieval. Partial sums accumulate as they descend through the array and are stored only after all required contributions have passed through each processing element. As discussed herein, this approach (e.g., the partial sums) may utilize an exact adder, an approximate adder, or a combination of both.

[0252] In some embodiments, a systolic array organizes computation into a hierarchy of tiles and processing elements so that data continuously flows across the array while partial results are accumulated locally. At the top level, the array consists of a grid of tiles, each receiving streams of activations and weights from its left and top edges. These inputs are then forwarded through the array in a rhythmic pattern. Activations generally flow horizontally across tiles, while weights move vertically downward. This arrangement permits each tile to work on a sub-portion of a larger matrix multiplication (e.g., utilizing one or more exact adders, one or more approximate adders, or one or more of a combination of both), sending intermediate results further down toward the output edge.

[0253] Each tile may contain a smaller two-dimensional arrangement of processing elements. These elements may be connected such that activations enter from one side, weights enter from another, and partial sums move downward from one processing element to the next. Inside each processing element, the operation may comprise multiplying an activation by a weight and adding the result to an incoming partial sum. The structure of the processing element may support different dataflow modes, such as weight-stationary and output-stationary. In weight-stationary mode, a processing element may keep a weight locally resident while activations flow through, which minimizes weight movement and is beneficial when weights remain constant across many activation windows. In output-stationary mode, the processing element may retain its partial sum locally and repeatedly accumulates new products before eventually forwarding the final result, which reduces partial sum traffic and is well suited for reducing large numbers of terms into a single output value.

[0254] In various embodiments, rows of activations and columns of weights are aligned in time so that each processing element encounters the appropriate pair at the correct cycle. Partial sums may propagate in one direction until the final result exits the bottom of the array and is written into an accumulator or scratchpad.

[0255] FIG. 22 is a block diagram illustrating a digital device capable of performing instructions to perform tasks as discussed herein. A digital device is any device with memory and a processor. Specifically, FIG. 22 shows a diagrammatic representation of a machine in the example form of a computer system 2200 within which instructions 2224 (e.g., software) for causing the machine to perform any one or more of the methodologies discussed herein may be executed. In alternative embodiments, the machine operates as a standalone device or may be connected (e.g., networked) to other machines, for instance, via the Internet. In a networked deployment, the machine may operate in the capacity of a server machine or a client machine in a server-client network environment, or as a peer machine in a peer-to-peer (or distributed) network environment.

[0256] The machine may be a server computer, a client computer, a personal computer (PC), a tablet PC, a set-top box (STB), a personal digital assistant (PDA), a cellular telephone, a smartphone, a web appliance, a network router, switch or bridge, or any machine capable of executing instructions 2224 (sequential or otherwise) that specify actions to be taken by that machine. Further, while only a single machine is illustrated, the term “machine” shall also be taken to include any collection of machines that individually or jointly execute instructions 2224 to perform any one or more of the methodologies discussed herein.

[0257] The example computer system 2200 includes a processor 2202 (e.g., a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), one or more application-specific integrated circuits (ASICs), one or more radio-frequency integrated circuits (RFICs), or any combination of these), a main memory 2204, and a static memory 2206, which are configured to communicate with each other via a bus 2208. The computer system 2200 may further include a graphics display unit 2210 (e.g., a plasma display panel (PDP), a liquid crystal display (LCD), a projector, or a cathode ray tube (CRT)). The computer system 2200 may also include alphanumeric input device 2212 (e.g., a keyboard), a cursor control device 2214 (e.g., a mouse, a trackball, a joystick, a motion sensor, or other pointing instrument), a data store 2216, a signal generation device 2218 (e.g., a speaker), an audio input device (e.g., a microphone), not shown, and a network interface device 2220, which also are configured to communicate with a network 2226 via the bus 2208.

[0258] The data store 2216 includes a machine-readable medium 2222 on which are stored instructions 2224 (e.g., software) embodying any one or more of the methodologies or functions described herein. The instructions 2224 (e.g., software) may also reside, completely or at least partially, within the main memory 2204 or within the processor 2202 (e.g., within a processor's cache memory) during execution thereof by the computer system 2200, the main memory 2204 and the processor 2202 also constituting machine-readable media. The instructions 2224 (e.g., software) may be transmitted or received over a network (not shown) via the network interface 2220.

[0259] While machine-readable medium 2222 is shown in an example embodiment to be a single medium, the term “machine-readable medium” should be taken to include a single medium or multiple media (e.g., a centralized or distributed database, or associated caches and servers) able to store instructions (e.g., instructions 2224). The term “machine-readable medium” shall also be taken to include any medium that is capable of storing instructions (e.g., instructions 2224) for execution by the machine and that cause the machine to perform any one or more of the methodologies disclosed herein. The term “machine-readable medium” includes, but should not be limited to, data repositories in the form of solid-state memories, optical media, and magnetic media.

[0260] As discussed herein, a hybrid Floating Point Logarithmic Number System (“FPLNS”) architecture is discussed in which a floating-point value and an approximate logarithmic representation of the floating-point value are represented using a common bit format, thereby enabling efficient implementation of multiplication, division, logarithmic, exponentiation, and related transcendental functions with substantially reduced hardware complexity. In some embodiments, a floating-point value represented in sign, exponent, and mantissa form is interpreted as an approximate base-2 logarithm by utilizing the exponent bits and mantissa bits in a biased fixed-point logarithmic representation, such that the logarithmic transform may be approximated according to log2(1+M)≈M+μ, where Mis a mantissa portion and u is a correction factor selected to reduce approximation error. The system may perform multiplication and division operations in the logarithmic domain primarily through fixed-point addition and subtraction operations rather than conventional multiplier circuitry, thereby reducing circuit area, latency, and power consumption.

[0261] In some embodiments, the same data format supports both conventional floating-point arithmetic operations and logarithmic-domain operations without requiring additional storage overhead, lookup tables, or piecewise-linear interpolation tables. The disclosed architecture may further support approximate arithmetic units, approximate adders, configurable correction factors, logarithmic and antilogarithmic conversion circuitry, activation functions for machine learning, vectorized and systolic processing architectures, and / or configurable implementations for arbitrary floating-point precisions including FP16, BF16, FP32, and related formats. Various embodiments are particularly suited for machine learning accelerators, edge inference devices, and other semiconductor implementations where reductions in power consumption, silicon area, and computational latency are desirable while maintaining acceptable computational accuracy.

[0262] In some embodiments, a multiplication method utilizes logarithmic-domain arithmetic according to a technique commonly referred to as Mitchell's method. Mitchell's method reduces computational complexity associated with conventional binary multiplication by approximating multiplication operations through logarithmic addition operations. Rather than performing a full binary multiplication directly, a first input value and a second input value may each be converted into an approximate logarithmic representation, the logarithmic representations may be added together, and an antilogarithm operation may subsequently generate an approximate product value. Accordingly, multiplication circuitry may be implemented primarily through bit operations, shifting operations, fixed-point addition operations, and normalization logic rather than large binary multiplier arrays. Such architectures are particularly advantageous in digital signal processors (DSPs), graphics processing units (GPUs), artificial intelligence accelerators, low-power machine-learning inference devices, FPGA multiply-accumulate (MAC) arrays, and related high-throughput arithmetic systems where reductions in silicon area, power consumption, and latency are desirable.

[0263] In various embodiments, Mitchell's method approximates a binary number according to:x=2k(1+f)where k represents an exponent portion and f represents a fractional mantissa portion. A logarithmic representation may then be expressed according to:log2(x)=k+log2(1+f)Exact logarithm computation, however, may require expensive hardware resources, lookup tables, interpolation logic, or polynomial approximation circuitry. Mitchell's method therefore simplifies the logarithmic computation by approximating:log2(1+f)≈f such that:log2(x)≈k+f In various embodiments, multiplication between a first value and a second value may therefore be approximated according to:log2(xy)≈(k1+f1)+(k2+f2)where k1 and f1 correspond to the first input value and k2 and f2 correspond to the second input value. An antilogarithm operation may then generate an approximate product value. Such embodiments may significantly reduce arithmetic hardware complexity relative to conventional multiplier implementations by replacing multiplication circuitry with lower-complexity addition, shifting, and normalization circuitry. Although approximation error may be introduced due to the logarithmic approximation, the resulting reduction in hardware complexity may provide substantial improvements in circuit area, power consumption, routing complexity, and processing latency.In various embodiments, a Floating Point Logarithmic Number System (“FPLNS”) architecture extends logarithmic multiplication techniques by utilizing a shared floating-point and logarithmic representation within a common binary format. In some embodiments, a floating-point value represented according to sign, exponent, and mantissa fields may additionally represent an approximate logarithmic-domain value without requiring separate storage structures. A floating-point value may be represented according to:N=(1+M)2E−B where M represents a mantissa portion, E represents an exponent portion, and B represents a bias value. In various embodiments, a logarithmic approximation may be determined according to:log2(N)=log2(1+M)+E−B where the logarithmic term may be approximated according to:log2(1+M)≈M+μwhere μ represents a correction factor selected to reduce approximation error. Accordingly, the logarithmic-domain representation may be approximated as:L~E−B+M+H In some embodiments, multiplication between a first value and a second value may be performed in the logarithmic domain through fixed-point addition operations according to:L(P)=L(X)+L(Y)−(B<<M)+u where L(X) and L(Y) represent logarithmic-domain representations of the first and second values, respectively, and (B<<M) represents a shifted bias quantity. In various embodiments, division operations may similarly be implemented through fixed-point subtraction operations in the logarithmic domain.Unlike earlier logarithmic multiplication approaches utilizing only a direct mantissa approximation, various FPLNS embodiments introduce one or more correction factors configured to reduce approximation error associated with logarithmic conversion. In some embodiments, the correction factor may be constant, variable, piecewise-defined, conditional upon bit patterns, dependent upon mantissa regions, or otherwise adaptively selected. In various embodiments, the FPLNS architecture may therefore preserve reduced-complexity arithmetic operations associated with logarithmic multiplication while substantially improving numerical accuracy relative to earlier logarithmic approximation systems.In some embodiments, the FPLNS architecture may further support logarithmic operations, exponentiation operations, activation functions for machine learning, systolic processing arrays, vectorized arithmetic units, and approximate arithmetic circuits configured for artificial intelligence acceleration. Various embodiments may reduce multiplier circuit complexity from quadratic complexity associated with conventional binary multipliers to substantially linear complexity with respect to bit width while maintaining acceptable numerical accuracy for machine learning inference and related computational workloads.In various embodiments, logarithmic multiplication architectures may be enhanced through piecewise correction mechanisms configured to reduce approximation error associated with logarithmic-domain multiplication methods, including Mitchell-style multiplication architectures and related floating-point logarithmic number system (“FPLNS”) architectures. Conventional Mitchell-style multiplication techniques may approximate:log2(1+x)≈x while earlier FPLNS architectures may improve the approximation through use of a single global correction factor according to:log2(1+x)=x+u where μ is a constant or globally selected correction factor. Although such correction factors may reduce average error, residual approximation error remains nonlinear across the mantissa domain. In particular, the error function:c(x)=log2(1+x)−x varies significantly over different mantissa regions such that a single correction factor may not adequately minimize error across all possible input values.In various embodiments, improved logarithmic multiplication architectures introduce segmented correction logic, piecewise correction logic, conditional correction logic, bit-dependent correction logic, and / or region-dependent linear approximations configured to more accurately approximate the nonlinear residual error term associated with logarithmic approximation. Rather than utilizing a single global correction factor, some embodiments define multiple correction behaviors based upon one or more bit patterns, mantissa regions, exponent regions, condition evaluations, threshold values, or combinations thereof. In some embodiments, correction values may therefore vary according to:log2(1+x)≈x+μi(x)where μi(x) is selected according to one or more properties of the input value, including bit fields, mantissa ranges, upper-bit patterns, region classifications, or other criteria.In some embodiments, piecewise approximation logic may improve the approximation distance between a linear approximation and the logarithmic function log2(1+x) through selective modification of bit fields associated with the logarithmic-domain representation. Various embodiments may utilize conditional logic that preserves portions of a bit field for selected bit patterns while selectively decrementing, masking, replacing, or conditionally modifying other portions of the bit field for alternate patterns. In some embodiments, selected upper-bit patterns may cause mantissa bits to remain unchanged while other upper-bit patterns may trigger subtraction operations, decrement operations, shifted correction operations, or partial replacement operations. Certain bit patterns may additionally invoke special-case correction handling configured to reduce approximation error in specific regions of the logarithmic approximation curve.In some embodiments, segmented correction logic may therefore implement a piecewise-linear approximation of the nonlinear Mitchell residual error function while preserving substantially reduced hardware complexity relative to exact logarithmic implementations. Rather than utilizing lookup tables, polynomial evaluators, interpolation engines, or high-order arithmetic approximation circuits, various embodiments may implement correction behavior through low-cost combinational logic including bit inspection operations, conditional decrement operations, selective field substitution operations, masking operations, shifting operations, multiplexing operations, and simplified fixed-point arithmetic operations. Such embodiments may therefore substantially reduce approximation error while preserving reduced silicon area, reduced power consumption, reduced latency, reduced routing complexity, and reduced arithmetic complexity.In some embodiments, piecewise correction architectures may utilize conditional correction rules associated with selected mantissa regions. For example, selected upper-bit patterns may cause preservation of mantissa values, while alternate upper-bit patterns may trigger subtraction of a constant value from selected upper mantissa bits while preserving lower mantissa bits. In some embodiments, a selected mantissa region may invoke complete replacement of one or more lower mantissa fields with predetermined values. Such embodiments may therefore define segmented approximation regions associated with distinct correction behaviors. The segmented approximation regions may collectively approximate the nonlinear logarithmic residual function using substantially linear or partially linearized correction segments.In various embodiments, piecewise correction architectures may be generalized to arbitrary bit widths including floating-point formats utilizing varying exponent widths and mantissa widths. Correction logic may therefore scale parametrically across FP16, BF16, FP32, FP64, integer formats, custom floating-point formats, reduced-precision machine-learning formats, or other arithmetic representations. In some embodiments, correction circuitry may additionally be incorporated into approximate multiply-accumulate (MAC) arrays, systolic processing arrays, AI accelerators, FPGA DSP replacement architectures, neural-network inference processors, vector processors, tensor-processing architectures, or other semiconductor arithmetic systems.In various embodiments, segmented correction architectures may materially reduce multiplication error associated with logarithmic multiplication while preserving substantially the same low-complexity arithmetic structure associated with Mitchell-style multiplication systems. Such embodiments may therefore achieve improved numerical accuracy without materially increasing circuit area, hardware complexity, power consumption, or processing latency.FIG. 23 illustrates an example table and associated approximation data corresponding to a logarithmic approximation architecture in accordance with various embodiments. FIG. 23 illustrates relationships between an input quantity x, an exact logarithmic function value log2(1+x), and one or more corrected approximation values y utilized in a logarithmic multiplication architecture (in this example, the correcting factor is −0.03125). The approximation values shown in FIG. 23 may correspond to corrected logarithmic-domain representations utilized by approximate multiplication circuitry, floating-point logarithmic number system (“FPLNS”) circuitry, Mitchell-style multiplication circuitry, or combinations thereof.In some embodiments, the horizontal axis (x-axis) of FIG. 23 represents input values corresponding to mantissa-domain values, fractional values, normalized binary fractions, fixed-point values, logarithmic input fractions, or combinations thereof. In various embodiments, the x-axis may span a normalized fractional range corresponding to mantissa values between 0 and 1. The x-axis values, in this example, may correspond to binary fractional values associated with mantissa fields of floating-point representations. The x-axis values may be represented according to fixed-point binary quantities, including multi-bit mantissa quantities associated with logarithmic approximation operations.The vertical axis (y-axis) of FIG. 23 represents approximation outputs associated with logarithmic approximation circuitry. The y-axis values may correspond to approximation outputs configured to approximate:log2(1+x)or corrected variants thereof. FIG. 23 illustrates approximation values y generated according to correction logic configured to reduce residual error associated with logarithmic approximation. The table of FIG. 23 may therefore illustrate relationships between exact logarithmic values (desired result), linearly approximated values (Mitchell's method), and corrected values (Cassia.ai).In some embodiments, the values of y illustrated in FIG. 23 may correspond to approximation values generated according to conditional bit-dependent correction rules. Such correction rules may selectively preserve, decrement, modify, replace, or otherwise transform selected mantissa bit fields according to one or more bit patterns associated with the input value x. In various embodiments, different regions of the x-axis may therefore correspond to different correction behaviors applied to generate corresponding y-axis approximation values.In some embodiments, the approximation values shown in FIG. 23 illustrate that the correction architecture substantially reduces deviation between the exact logarithmic function log2(1+x) and the corresponding approximate logarithmic representation. The corrected approximation values may therefore reduce nonlinear residual error associated with conventional Mitchell-style approximations of the form: log2(1+x)≈x while preserving substantially reduced arithmetic complexity.In some embodiments, FIG. 23 further illustrates that the corrected approximation values may approximate the nonlinear logarithmic function using segmented linear regions and low-complexity correction transforms. Various embodiments may therefore achieve substantially improved approximation accuracy without utilizing lookup tables, interpolation hardware, polynomial evaluation circuitry, or high-order approximation logic. Instead, some embodiments may generate the values of y illustrated in FIG. 23 through simplified combinational logic including bit inspection operations, conditional subtraction operations, field-preservation operations, selective decrement operations, shifting operations, masking operations, or combinations thereof.In various embodiments, the approximation values illustrated in FIG. 23 may therefore be utilized in logarithmic multiplication circuitry configured for artificial intelligence accelerators, approximate multiply-accumulate (MAC) arrays, systolic processing arrays, FPGA arithmetic units, edge inference processors, tensor-processing architectures, or other reduced-power arithmetic systems where reduced multiplication error and reduced hardware complexity are both desirable.FIG. 24 depicts an illustrative circuit for utilizing a correcting factor in some embodiments. Referring to FIG. 24, in this example, the correcting factor may be a number in the range from −1 to 0 (or the correction operator may be a minus and the correction factor may be a number in the range from 0 to 1) The correcting factor may be different for different examples.FIG. 25 illustrates an example region-selective correction architecture configured to reduce approximation error associated with logarithmic multiplication while reducing computational complexity, switching activity, and power consumption relative to globally corrected logarithmic approximation systems in some embodiments. FIG. 25 illustrates approximation behavior associated with selectively applying correction operations only within regions of the logarithmic approximation curve exhibiting elevated approximation error. Rather than applying a correction factor uniformly across an entire approximation domain, various embodiments selectively apply correction logic only within identified mantissa regions where approximation error exceeds one or more thresholds.The horizontal axis (x-axis) of FIG. 25 represents mantissa-domain input values, normalized fractional values, fixed-point fractional values, binary fractional values, or combinations thereof associated with logarithmic approximation operations. In various embodiments, the x-axis may span a normalized fractional range corresponding to mantissa values between 0 and 1. The x-axis values may correspond to mantissa bit patterns associated with floating-point arithmetic representations, logarithmic-domain representations, or approximate multiplication circuitry.The vertical axis (y-axis) of FIG. 25 represents logarithmic approximation output values corresponding to corrected or selectively corrected approximations of:log2(1+x)The y-axis values may correspond to approximation outputs generated according to conditional region-dependent correction logic configured to reduce residual approximation error associated with Mitchell-style logarithmic multiplication techniques.FIG. 25 illustrates that approximation error may vary nonlinearly across the mantissa domain such that certain regions exhibit substantially larger residual error than other regions. Rather than globally applying a correction factor across all possible mantissa values, various embodiments selectively apply correction logic only within regions associated with elevated error magnitude. Such embodiments may therefore reduce computational overhead, switching activity, arithmetic operations, routing complexity, and power consumption while preserving improved approximation accuracy in high-error regions.

[0291] In some embodiments, correction logic may be conditionally enabled according to one or more bit-pattern evaluations associated with upper mantissa bits. For example, in an embodiment utilizing an 8-bit mantissa representation, correction logic may operate according to:if XOR(x[7:6]), y=log2(1+x)−0.125else y=log2(1+x)where:x[7:6] corresponds to selected upper mantissa bits,XOR(x [7:6]) evaluates whether the selected upper bits differ,and y corresponds to the corrected logarithmic approximation output.

[0295] In various embodiments, when the selected upper mantissa bits differ, a correction value may be applied to reduce approximation error within the corresponding mantissa region. Conversely, when the selected upper mantissa bits are equal, no correction factor may be applied. Such embodiments may therefore selectively activate correction circuitry only within regions exhibiting elevated residual error.

[0296] In some embodiments, the conditional correction behavior illustrated in FIG. 25 effectively partitions the mantissa domain into multiple approximation regions associated with distinct correction behaviors. Such segmented approximation regions may substantially improve approximation accuracy while preserving low arithmetic complexity. Because correction logic is conditionally activated only for selected regions, switching activity and arithmetic operations may be reduced relative to globally corrected architectures that continuously apply correction operations regardless of local approximation error magnitude.

[0297] In various embodiments, the values of y illustrated in FIG. 25 may therefore correspond to selectively corrected logarithmic approximation values generated according to low-cost combinational logic including, but not limited to:

[0298] bit inspection operations,

[0299] XOR operations,

[0300] conditional subtraction operations,

[0301] fixed-point arithmetic operations,

[0302] masking operations,

[0303] multiplexing operations,

[0304] or combinations thereof.

[0305] The selective correction architecture illustrated in FIG. 25 may avoid the need for lookup tables, interpolation engines, polynomial approximation circuitry, or high-order arithmetic approximation hardware. Various embodiments may therefore achieve substantially improved logarithmic multiplication accuracy while maintaining reduced silicon area, reduced power consumption, reduced routing complexity, and reduced arithmetic latency.

[0306] In various embodiments, the region-selective correction architectures illustrated in FIG. 25 may be utilized within approximate multiply-accumulate (MAC) arrays, AI accelerators, FPGA arithmetic units, systolic processing arrays, edge inference processors, tensor-processing systems, vector arithmetic architectures, or other reduced-power arithmetic systems where reductions in multiplication error and hardware complexity are desirable simultaneously.

[0307] FIG. 26 illustrates an example partial-correction circuit for an 8-bit mantissa input in some embodiments. In this illustrative embodiment, an input value x represents a mantissa or fractional value scaled to be within a range from 0 to 1. The circuit receives or generates a logarithmic approximation value, such as log2(1+x), and selectively applies a correction factor only for selected regions of the input domain. In the illustrated 8-bit example, the highest-order bit of an 8-bit value nis referred to as n[7], where the least-significant bit is n[0]. The next highest-order bit is referred to as n[6]. Thus, the bit field n[7:6] identifies the two most significant bits of the 8-bit mantissa-domain quantity or logarithmic approximation quantity used by the correction circuit.

[0308] FIG. 26 includes a selection logic circuit, such as an exclusive-OR (XOR) gate, configured to receive selected upper bits as inputs. For example, the selection logic may receive log2(1+x) [7] and log2(1+x)[6], or another selected pair of upper-order bits, and generate a multiplexer selection signal. When the selected bits correspond to regions in which correction is desired, the selection logic causes a multiplexer (“mux”) to select a corrected value. When the selected bits correspond to regions in which correction is not desired, the selection logic causes the mux to select an uncorrected value.

[0309] FIG. 26 includes an adder or subtractor configured to combine the logarithmic approximation value with a correction factor. The correction factor may be a number in the range from −1 to 0. Alternatively, the correction operation may be implemented as a subtraction operation, and the correction factor may be represented as a positive number in the range from 0 to 1. For example, the circuit may generate a corrected candidate value according to:y=log2(1+x)+c where c is a negative correction factor, or according to:y=log2(1+x)−c where c is a positive correction factor.The mux may receive at least two inputs: a first input corresponding to the uncorrected approximation value log2(1+x), and a second input corresponding to the corrected approximation value generated by the adder or subtractor. The mux output provides the selected output value y. In one illustrative embodiment, when the selected upper bits indicate a high-error region, the mux selects the corrected value. When the selected upper bits indicate a lower-error region, the mux selects the uncorrected value. In this manner, correction is applied only to selected regions of the approximation domain rather than globally across the entire range.

[0313] The illustrated 8-bit circuit is exemplary and may be extended to other bit widths. For different bit widths, different bit positions may be selected for the mux selection input. For example, a 16-bit, 32-bit, or other mantissa width may use different upper-bit fields, intermediate-bit fields, or combinations of bit fields to identify regions of elevated approximation error. The same general approach may be generalized by selecting one or more bits of an N-bit mantissa or logarithmic-domain quantity to define correction regions and by conditionally selecting between corrected and uncorrected approximation outputs.

[0314] FIG. 26 is illustrative, and further optimizations are possible. For example, where correction is not required when log2(1+x) [7:6] equals binary 11 or binary 00, the adder logic may be simplified because the corrected path need not operate for those regions. In additional embodiments, the adder or subtractor, the mux, and the selection logic, such as the XOR gate, may be merged, simplified, or co-optimized as a single combinational correction circuit. Such optimization may reduce transistor count, switching activity, routing complexity, latency, and power consumption while preserving the region-selective correction behavior.

[0315] FIG. 27 illustrates a generalized partial-correction circuit applicable to a mantissa of any selected bit width, where the mantissa represents a fractional value scaled to be within a range from 0 to 1 in some embodiments. The circuit of FIG. 27 may receive or generate a logarithmic approximation value, such as log2(1+X), and may selectively apply a correction factor based on selection logic associated with one or more bits of the logarithmic approximation value, mantissa value, or related intermediate value.

[0316] FIG. 27 includes a first mux input corresponding to an uncorrected logarithmic approximation value log2(1+X), and a second mux input corresponding to a corrected approximation value generated by applying a correction factor to log2(1+X). The corrected approximation may be generated by an adder that adds a negative correction factor in a range from −1 to 0, or alternatively by a subtractor that subtracts a positive correction factor in a range from 0 to 1. The mux selects between the corrected and uncorrected approximation values according to a selection input generated by selection logic.

[0317] In an example embodiment using an 8-bit mantissa, the selection logic may be implemented as:log2(1+X)[7]XOR log2(1+X)[6]where log2(1+X)[7] and log2(1+X)[6] are selected upper-order bits of the logarithmic approximation value. The XOR output may provide the mux selection input. In some embodiments, the mux selects the corrected approximation value when the selection logic indicates that the input lies within a region having relatively high approximation error, and selects the uncorrected approximation value when the selection logic indicates that correction is not required.The generalized circuit of FIG. 27 may be extended to any mantissa bit width by selecting suitable bits, bit fields, or logical combinations of bits to define regions where correction is desirable. Thus, for different mantissa widths, the selection logic may use different bit positions, different combinations of upper-order bits, or different condition logic to identify regions of elevated approximation error. In some embodiments, the selection logic may include XOR logic, AND logic, OR logic, comparison logic, range-detection logic, decode logic, or combinations thereof.

[0319] FIG. 27 is illustrative, and further optimizations are possible. For example, the adder logic may be simplified because it need not operate when the mux selection input selects the uncorrected path. In some embodiments, the adder may be gated, bypassed, simplified, or partially eliminated for regions where correction is not applied. In further embodiments, the adder, mux, and selection logic may be merged and co-optimized as a single combinational correction circuit to reduce circuit area, switching activity, routing complexity, latency, and power consumption while preserving region-selective correction behavior.

[0320] FIG. 28 illustrates an example fixed piecewise approximation table depicting a reduced approximation error associated with logarithmic multiplication while utilizing simplified combinational logic and simplified subtraction operations relative to correction architectures that subtract multibit correction quantities in some embodiments. FIG. 28 illustrates a representative piecewise approximation configured to reduce the error distance between:y=x andy=log2(1+x)through segmented correction behavior implemented using low-complexity bit manipulation operations.In some embodiments, the approximation is a “fixed piecewise” approximation because the correction behavior is partitioned into multiple regions associated with different logic transformations. Rather than applying a continuous correction function or subtracting a multibit correction quantity across the entire approximation domain, various embodiments selectively modify portions of the approximation value according to predefined bit-pattern regions.The horizontal axis (x-axis) of FIG. 28 represents binary values corresponding to logarithmic approximation inputs, mantissa-domain values, fixed-point logarithmic representations, or combinations thereof. In the illustrative embodiment, the value x may hold an 8-bit binary value representing:log2(1+x)or an associated logarithmic-domain quantity. The x-axis therefore corresponds to discrete binary approximation-domain input regions.The vertical axis (y-axis) of FIG. 28 represents transformed approximation values generated according to the piecewise correction logic. The values on the y-axis may correspond to corrected logarithmic approximation outputs utilized by multiplication circuitry, logarithmic arithmetic circuitry, FPLNS circuitry, or related approximate arithmetic systems.FIG. 28 illustrates multiple approximation regions corresponding to different correction behaviors. The table entries shown in FIG. 28 may therefore correspond to discrete binary ranges associated with distinct transformation operations applied to the input value xin order to generate the corrected output value y.In some embodiments, the correction logic may be implemented according to the following representative pseudocode:if ((x[7:5]=′b111) or(x[7:5]=′b000))y[7:4]=x[7:4]else y[7:4]=x[7:4]−1if (x[7:4]=′b0001)y[3:0]=′b0000else y[3:0]=x[3:0]where:x[7:5] represents the three highest-order bits of the 8-bit input value,x[7:4] represents the upper nibble of the input value,x[3:0] represents the lower nibble of the input value, andy[7:4] and y[3:0] represent corresponding portions of the corrected output value.In some embodiments, a first piecewise region corresponds to upper-bit patterns 111 and 000. For these regions, the upper nibble of the output value remains unchanged such that y[7:4]=x[7:4]. These regions may correspond to approximation regions where additional correction is unnecessary or where the approximation error is already sufficiently small.In various embodiments, a second piecewise region corresponds to all remaining upper-bit patterns. For these regions, the upper nibble may be decremented by one according to y[7:4]=x[7:4]−1. Such embodiments may therefore apply a simplified subtraction operation only to selected approximation regions exhibiting elevated residual approximation error.FIG. 28 additionally illustrates a special-case correction region associated with the upper nibble value 0001. When x[7:4]=′b0001, the lower nibble may be forced to zero according to y[3:0]=′b0000. Otherwise, the lower nibble may remain unchanged according to y[3:0]=x[3:0]. This special-case region may further reduce approximation error in a selected region of the logarithmic approximation domain.In various embodiments, each line of the table of FIG. 28 therefore corresponds to one or more discrete approximation regions associated with:unchanged upper-bit behavior,

[0335] decremented upper-bit behavior,

[0336] special-case lower-bit substitution behavior,

[0337] preserved lower-bit behavior, or

[0338] combinations thereof.

[0339] The piecewise transformations illustrated in FIG. 28 may therefore collectively approximate the nonlinear residual error function associated with logarithmic multiplication while avoiding high-complexity arithmetic correction operations.

[0340] In some embodiments, the logic transformations illustrated in FIG. 28 may be implemented using substantially simpler hardware than architectures that subtract arbitrary multibit correction values. Rather than utilizing lookup tables, interpolation hardware, polynomial approximation circuitry, or large arithmetic correction units, various embodiments may utilize:

[0341] bit inspection operations,

[0342] conditional decrement operations,

[0343] fixed-value substitution operations,

[0344] multiplexing operations,

[0345] masking operations,

[0346] combinational decode logic, or

[0347] combinations thereof.

[0348] Such embodiments may therefore substantially reduce switching activity, silicon area, routing complexity, arithmetic latency, and power consumption while materially improving approximation accuracy.

[0349] In various embodiments, the fixed piecewise approximation architecture illustrated in FIG. 28 is exemplary for 8-bit quantities but may be generalized to other bit widths. Different mantissa widths, logarithmic-domain widths, floating-point widths, or fixed-point widths may utilize different bit partitions, different region definitions, different decrement quantities, different special-case regions, or different piecewise transformation rules while preserving the same general segmented correction principles.

[0350] FIG. 29 illustrates an example circuit implementation for the fixed piecewise approximation in some embodiments. In FIG. 29, the circuit operates on an 8-bit mantissa or fixed-point fractional quantity, where the number is scaled to be within a range from 0 to 1. The notation n[p] refers to the p-th order bit of an 8-bit number n, with the least significant bit identified as n[0]. The notation n[p:q] refers to a vector of bits extending from bit position p down to bit position q.

[0351] The circuit of FIG. 29 receives an 8-bit input X[7:0] and generates an 8-bit corrected output Y[7:0]. The upper portion Y[7:4] may be generated by selectively passing either the upper nibble X[7:4] or a decremented version of the upper nibble, such as X[7:4]−1. As used herein, a “nibble” is a group of four binary bits. More generally, a nibble may refer to any contiguous four-bit portion of a binary quantity. In various embodiments discussed herein, nibble-sized groupings may be utilized for region detection, piecewise approximation logic, correction logic, multiplexing operations, subtraction operations, masking operations, or other arithmetic and combinational logic operations.

[0352] A subtractor block may receive X[7:4] and generate the decremented candidate value. A multiplexer (“mux”) may receive, as inputs, the original upper nibble X[7:4] and the decremented upper nibble X[7:4]−1. Selection logic may control the mux so that selected regions of the input range preserve the original upper nibble, while other regions use the decremented upper nibble.

[0353] In some embodiments, the selection logic may include gates configured to detect upper-bit patterns of X. For example, logic gates may determine whether X[7:5] is equal to 000 or 111. If either of those conditions is satisfied, the mux may select the unmodified upper nibble X[7:4]. If neither condition is satisfied, the mux may select the decremented upper nibble X[7:4]−1. Accordingly, the circuit may implement the piecewise rule:if X[7:5]=000 or X[7:5]=111, Y[7:4]=X[7:4]else Y[7:4]=X[7:4]−1The lower portion Y[3:0] may be generated by logic configured to either preserve the lower nibble X[3:0] or replace the lower nibble with a fixed value. In one illustrative embodiment, if X[7:4] equals 0001, then the lower nibble is forced to 0000; otherwise, the lower nibble is passed through unchanged. Thus:if X[7:4]=0001, Y[3:0]=0000else Y[3:0]=X[3:0]In various embodiments, the logic for generating Y[3:0] may include one or more gates, decoders, comparators, masking circuits, multiplexers, or combinations thereof. Some inputs to the logic that generates Y[3:0] may come from within the subtractor / multiplexer block used to generate Y[7:4]. In this manner, intermediate signals generated for upper-nibble correction may be reused for lower-nibble correction, reducing duplicate logic.FIG. 29 is illustrative and may be extended to other bit widths. Different bit widths may use different bit selects for the mux selection input, different upper-bit ranges, different lower-bit ranges, different decrement values, or different special-case replacement regions. For example, a 16-bit or 32-bit mantissa may use different region-detection bits and may apply piecewise correction to larger or smaller portions of the mantissa field.

[0357] Further optimizations are possible. The subtractor configured to subtract one, the mux, and the selection logic may be merged and co-optimized into a single combinational circuit. Such co-optimization may reduce transistor count, routing complexity, switching activity, power consumption, and latency while preserving the fixed piecewise correction behavior.

[0358] FIG. 30 illustrates a generalized circuit architecture for implementing a piecewise approximation or correction function for a binary input value of arbitrary bit length in some embodiments. In various embodiments, the input value may be, for example, a binary representation of Log2(1+X), and the circuit may generate an output value Y that is approximately equal to X, or that otherwise represents a corrected value suitable for use in a logarithmic-domain multiplication, conversion, or approximation operation.

[0359] In various embodiments, the input value may be divided into a plurality of continuous regions. A range detector may receive some or all bits of the input value and determine which region contains the input value. The range detector may include, for example, comparison logic, decoding logic, bit-pattern detection logic, threshold detection logic, XOR logic, AND / OR gate combinations, or other combinational logic. The range detector may generate one or more range-detection signals identifying the detected input region.

[0360] The output value Y may also be divided into a plurality of regions, bit fields, or subfields. These output regions may be continuous or discontinuous. For example, a first translation block may generate one group of output bits, while a second translation block may generate another group of output bits. In some embodiments, selected output bits may be copied directly from corresponding input bits, while other output bits may be translated, corrected, masked, forced to predetermined values, or generated using arithmetic correction logic.

[0361] In various embodiments, the circuit of FIG. 30 includes one or more translation functions configured to generate candidate output values or candidate output bit fields. Each translation function may correspond to a different correction behavior associated with one or more detected input regions. A translation function may include addition or subtraction of a correction value to or from the input value, forcing some or all output bits to a defined value, passing the input value through without modification, shifting, masking, decrementing, incrementing, substituting, or any combination thereof. In some embodiments, the same translation function may be shared by more than one input region.

[0362] In various embodiments, one or more multiplexers may receive outputs from the translation functions and select one or more translated outputs according to selection signals generated by the range detector. The mux may select, for example, an unmodified input value, an input value corrected by addition or subtraction, an output value having selected bits forced to defined states, or another translated value. The selected mux output may form all or a portion of Y.

[0363] In some embodiments, gates associated with the generalized circuit may generate selection signals, control signals, masking signals, enable signals, or forced-bit signals. For example, gates may detect whether the input value lies within a region for which no correction is required, a region for which a correction value should be added or subtracted, or a region for which selected output bits should be forced to predetermined values. The gates may operate in cooperation with the range detector, translation logic, and mux to implement the piecewise approximation.

[0364] In various embodiments, each region of the input value may have a different value translation, or no translation, imposed on it to generate some or all bits of the output value. For example, a first region may use a no-operation translation in which Y equals the input value, a second region may subtract a correction value, and a third region may force a selected output bit field to zero. Other regions may share one or more of these translations. This allows the circuit to approximate a nonlinear correction function using simplified piecewise logic.

[0365] FIG. 30 is necessarily generalized, and further optimizations are possible. For example, only selected portions of the input value may be translated rather than translating the entire input value. The functions of the range detector, translation blocks, muxes, and gates may be merged into a single optimized combinational circuit. Translation functions may also be reused across multiple ranges to reduce duplicate logic. Such optimizations may reduce area, routing complexity, switching activity, latency, and power consumption while preserving the desired piecewise correction behavior.

[0366] FIG. 31 illustrates a table representative fixed piecewise approximation for a 16-bit input value in some embodiments. In various embodiments, the fixed piecewise approximation improves the error distance between the line y=x and the nonlinear logarithmic curve y=log2(1+x) by using simplified logic and limited subtraction rather than subtracting a full multibit correction value across the entire input range.

[0367] The x-axis of the table of FIG. 31 represents the input value x, which may be a 16-bit binary value corresponding to a mantissa-domain or logarithmic-domain quantity associated with log2(1+x). The y-axis represents the corrected output value y, which is generated from x using piecewise bit-field transformations. The plotted and tabulated values illustrate that different regions of the input range receive different correction treatment.

[0368] The logic of FIG. 31 may be expressed as:if (x[15:13]=111 or x[15:13]=000), y[15:12]=x[15:12]else y[15:12]=x[15:12]-1and:if x[15:12]=0001, y[11:0]=000000000000else y[11:0]=x[11:0]Thus, the first line of the table corresponds to a region in which x[15:13]=000. In that region, the upper four bits x[15:12] are passed through unchanged to y[15:12], and the lower twelve bits are generally preserved unless the special-case upper nibble condition is satisfied. This region may correspond to a portion of the approximation domain where the uncorrected value already provides acceptable error.The second line corresponds to the special case in which x[15:12]=0001. In this region, the upper four bits are preserved as 0001, while the lower twelve bits y[11:0] are forced to zero. This produces a fixed representative value for that region and may reduce error near a boundary or transition region of the approximation curve.The third line corresponds to intermediate regions in which x[15:13] is greater than 000 and less than 111, excluding the special case noted above. In these regions, the upper four bits are decremented by one, while the lower twelve bits are preserved. This implements a simplified piecewise subtraction that reduces the approximation error without requiring subtraction of a full 16-bit correction value.The fourth line corresponds to the region in which x[15:13]=111. In this region, the value is passed through unchanged, such that y=x. This region may correspond to another portion of the input domain where correction is unnecessary or where preserving the input value better tracks the desired logarithmic curve.

[0373] In spreadsheet form, the representative transformation may be expressed as a concatenation of an upper-bit correction and a lower-bit correction. The upper four bits are either passed through unchanged or decremented by one depending on the three most significant bits, while the lower twelve bits are either forced to zero for the 0001 upper-nibble case or passed through unchanged. Although FIG. 31 uses a 16-bit example, the same principles may be generalized to other bit widths by selecting different upper-bit ranges, lower-bit ranges, special-case regions, and decrement or substitution rules.

[0374] FIG. 32 illustrates an example circuit implementation for a fixed piecewise approximation using a 16-bit mantissa or fixed-point fractional value scaled to be within a range from 0 to 1 in some embodiments. In this example, n[p] refers to the p-th order bit of a 16-bit number n, where the least significant bit is n[0]. The notation n[p:q] refers to a vector of bits extending from bit position p down to bit position q.

[0375] In various embodiments, the circuit receives a 16-bit input X[15:0] and generates a corrected 16-bit output Y[15:0]. The upper portion Y[15:12] may be generated by selectively passing either the upper four bits X[15:12] or a decremented version of those bits, such as X[15:12]-1. A subtractor block may receive X[15:12] and generate the decremented candidate value. A multiplexer may receive, as inputs, the original upper field X[15:12] and the decremented field X[15:12]-1. Selection logic may control the mux based on selected higher-order bits, such as X[15:13].

[0376] In this example, the selection logic includes gates configured to detect whether X[15:13] equals 000 or 111. If either condition is detected, the mux selects the unmodified upper field X[15:12]. Otherwise, the mux selects the decremented upper field X[15:12]-1. Thus, the upper-field correction may implement:if X[15:13]=000 or X[15:13]=111, Y[15:12]=X[15:12]else Y[15:12]=X[15:12]−1The lower portion Y[11:0] may be generated by logic configured to either preserve X[11:0] or force those lower bits to a defined value. In one embodiment, if X[15:12] equals 0001, then the lower twelve bits are forced to zero:Y[11:0]=000000000000Otherwise, the lower twelve bits are passed through unchanged:Y[11:0]=X[11:0]Accordingly, the circuit of FIG. 32 may include gates, decode logic, comparators, masking logic, and / or multiplexing logic configured to detect the 0001 upper-field condition and generate Y[11:0]. Some inputs to the logic that generates Y[11:0] may come from within the subtractor / multiplexer block used to generate Y[15:12], thereby allowing reuse of intermediate signals and reducing duplicate logic.

[0380] FIG. 32 is illustrative and may be extended to arbitrary bit widths. Different bit widths may use different selected bits for the mux selection input, different upper correction fields, different lower fields, and different detected ranges. The subtractor, mux, and selection logic may also be merged and co-optimized into a single combinational circuit to reduce area, routing, switching activity, latency, and power consumption while preserving the piecewise approximation behavior.

[0381] FIG. 33 illustrates an example circuit implementation for a fixed piecewise approximation using a 10-bit mantissa or fixed-point fractional value scaled to be within a range from 0 to 1 in some embodiments. The 10-bit mantissa may correspond to the mantissa portion of an IEEE 754 16-bit floating-point value (FP16). The illustrated approach may also be extended to other bit widths, including bit widths greater than five bits.

[0382] In FIG. 33, n[p] refers to the p-th order bit of a binary number n, where the least significant bit is n[0]. The notation n[p:q] refers to a vector of bits extending from bit position p down to bit position q. Although the note refers to an “8-bit number,” in the context of FIG. 33 the notation is applied to the illustrated 10-bit mantissa.

[0383] In various embodiments, the circuit receives a 10-bit input X[9:0] and generates a corrected 10-bit output Y[9:0]. The circuit may include a subtractor, a multiplexer, and selection logic configured to implement a piecewise approximation. For example, an upper portion of the input may be provided both directly to a mux and to a subtractor configured to subtract one from that upper portion. The mux may then select either the original upper field or the decremented upper field based on selection signals generated by logic gates detecting selected regions of the input range.

[0384] In some embodiments, the selection logic may inspect selected upper-order bits of X, such as a group of most significant mantissa bits, to determine whether the input value lies in a region where the original value should be preserved or a region where a decrement correction should be applied. Gates may detect selected boundary regions, such as low-end or high-end regions, and may cause the mux to select the unmodified upper field in those regions. In intermediate regions, the mux may select the decremented field generated by the subtractor. In this manner, the circuit may implement a fixed piecewise correction that reduces the distance between a linear approximation and a desired logarithmic approximation.

[0385] The circuit may also include logic for generating a lower portion of the output, such as Y [3:0], by either preserving corresponding lower input bits or forcing those bits to a defined value for one or more special-case regions. Some inputs to the logic that generates Y[3:0] may be derived from within the subtractor / multiplexer block, allowing reuse of intermediate signals and reducing duplicate logic.

[0386] FIG. 33 is illustrative, and different bit widths may use different bit selections for the mux selection input, different upper fields, different lower fields, and different detected ranges. Further optimizations are possible. For example, the subtractor configured to subtract one, the mux, and the selection logic may be merged and co-optimized into a single combinational circuit to reduce circuit area, routing complexity, switching activity, latency, and power consumption while preserving the piecewise approximation behavior.

[0387] FIG. 34 illustrates an example generalized circuit implementation for a fixed piecewise approximation using an r-bit mantissa or fixed-point fractional value scaled to be within a range from 0 to 1 in some embodiments. In this context, n[p] refers to the p-th order bit of an r-bit number n, where the least significant bit is n[0]. The notation n[p:q] refers to a vector of bits extending from bit position p down to bit position q.

[0388] In various embodiments, the circuit receives an r-bit input X[(r−1):0] and generates a corrected r-bit output Y[(r−1):0]. A first portion of the circuit generates the upper four output bits Y[(r−1):(r−4)]. The corresponding upper four input bits X[(r−1):(r−4)] may be provided directly to a multiplexer and also to a subtractor configured to generate X[(r−1):(r−4)]−1. Selection logic, implemented using gates such as AND, OR, NOT, decode, or XOR gates, controls the multiplexer.

[0389] In one embodiment, the upper-field correction is performed according to:if X[(r−1):(r−3)]=111 or X[(r−1):(r−3)]=000,Y[(r−1):(r−4)]=X[(r−1):(r−4)]and otherwise:Y[(r−1):(r−4)]=X[(r−1):(r−4)]−1.Thus, when the three most significant bits indicate one of the endpoint regions, the mux selects the unmodified upper four input bits. When the three most significant bits indicate an intermediate region, the mux selects the decremented upper four-bit value. In some embodiments, the first selection condition may be optimized using binary logic, including an XOR-based implementation or other reduced gate implementation.A second portion of the circuit generates the lower output field Y[(r−5):0]. In one embodiment, the lower field is generated according to:if X[(r−1):(r−4)]=0001,Y[(r−5):0]=0and otherwise:Y[(r−5):0]=X[(r−5):0].Accordingly, gates or decode logic may detect the upper-four-bit value 0001. A lower-field mux, masking circuit, or equivalent gate structure may then either force the lower output bits to zero or pass the lower input bits unchanged. Some inputs to the logic that generates Y[(r−5):0] may come from within the subtractor / multiplexer block, allowing intermediate signals to be reused.FIG. 34 is illustrative. The subtractor, multiplexer, and selection logic may be merged and co-optimized into a single combinational circuit. Such optimizations may reduce area, routing complexity, switching activity, latency, and power consumption while preserving the generalized piecewise approximation behavior for arbitrary mantissa bit widths.In this description, the term “engine” refers to computational logic for providing the specified functionality. An engine can be implemented in hardware, firmware, and / or software. Where the engines described herein are implemented as software, the engine can be implemented as a standalone program, but can also be implemented through other means, for example, as part of a larger program, as any number of separate programs, or as one or more statically or dynamically linked libraries. It will be understood that the named engines described herein represent one embodiment, and other embodiments may include other engines. In addition, other embodiments may lack engines described herein and / or distribute the described functionality among the engines in a different manner. Additionally, the functionalities attributed to more than one engine can be incorporated into a single engine. In an embodiment where the engines are implemented by software, they are stored on a computer readable persistent storage device (e.g., hard disk), loaded into the memory, and executed by one or more processors as described above in connection with FIG. 22. Alternatively, hardware or software engines may be stored elsewhere within a computing system.As referenced herein, a computer or computing system includes hardware elements used for the operations described here, regardless of specific reference in FIG. 22 to such elements, including, for example, one or more processors, high-speed memory, hard disk storage and backup, network interfaces and protocols, input devices for data entry, and output devices for display, printing, or other presentations of data. Numerous variations from the system architecture specified herein are possible. The entities of such systems and their respective functionalities can be combined or redistributed.

Claims

1. A system comprising:an integrated circuit configured to perform logarithmic-domain arithmetic operations on one or more binary values represented in a floating-point logarithmic number system (FPLNS) format, the integrated circuit configured to:generate an input logarithmic-domain value corresponding to a logarithm of a quantity including one plus at least a portion of a mantissa value;determine a region associated with the input logarithmic-domain value based on one or more selected bits of the input logarithmic-domain value;selectively apply a correction operation to at least a portion of the input logarithmic-domain value based on the determined region to generate a corrected logarithmic-domain value, wherein different regions are associated with different correction behaviors; andutilize the corrected logarithmic-domain value in a multiplication operation in order to reduce arithmetic complexity, hardware resource utilization, switching activity, latency, and power consumption.

2. The system of claim 1, wherein the logarithmic-domain value approximates:log2(1+x)where x corresponds to at least a portion of the mantissa value.

3. The system of claim 1, wherein the correction operation comprises a partial correction operation applied to fewer than all possible regions of the input logarithmic-domain value.

4. The system of claim 3, wherein the integrated circuit selectively applies the correction operation only when selected bits of the input logarithmic-domain value satisfy a condition associated with elevated approximation error.

5. The system of claim 4, wherein the selected bits comprise upper-order bits of the input logarithmic-domain value.

6. The system of claim 1, wherein the correction operation comprises a piecewise approximation operation in which different regions of the input logarithmic-domain value are associated with different translation operations.

7. The system of claim 6, wherein the different translation operations comprise one or more of subtraction of a correction value, addition of a correction value, preservation of one or more bit fields, forcing one or more output bits to a predetermined value, decrementing one or more bit fields, masking operations, or substitution operations.

8. The system of claim 1, wherein the integrated circuit is configured to perform a logarithmic multiplication operation according to a Mitchell-style logarithmic multiplication approximation.

9. The system of claim 1, wherein the input logarithmic-domain value comprises an 8-bit mantissa-domain value.

10. The system of claim 1, wherein the input logarithmic-domain value comprises a 16-bit mantissa-domain value.

11. The system of claim 1, wherein the integrated circuit includes:a subtractor configured to generate a corrected candidate value;a multiplexer configured to select between the corrected candidate value and an uncorrected value; andselection logic configured to control the multiplexer based on one or more selected bits of the input logarithmic-domain value.

12. The system of claim 15, wherein the selection logic includes one or more XOR gates.

13. The system of claim 15, wherein the subtractor, the multiplexer, and the selection logic are merged into a co-optimized combinational logic circuit.

14. The system of claim 1, wherein the integrated circuit includes a range detector configured to divide the input logarithmic-domain value into a plurality of regions.

15. The system of claim 18, wherein multiple regions share a common translation function.

16. The system of claim 1, wherein the correction operation is implemented without a lookup table and without polynomial interpolation circuitry.

17. The system of claim 1, wherein the integrated circuit is incorporated into one or more of a machine-learning accelerator, a systolic array, a tensor processor, an FPGA arithmetic unit, an approximate multiply-accumulate array, or an edge inference processor.

18. The system of claim 1, wherein the integrated circuit is configured such that the correction operation reduces approximation error while reducing arithmetic complexity relative to subtraction of a multibit correction quantity across an entire approximation domain.

19. The system of claim 1, wherein utilization the corrected logarithmic-domain value in the multiplication operation in order to reduce arithmetic complexity, hardware resource utilization, switching activity, latency, and power consumption is relative to multibit correction architectures while maintaining scalable operation across multiple mantissa bit widths.

20. The system of claim 1, wherein utilization the corrected logarithmic-domain value in the multiplication operation is further in order to improve scalability across multiple mantissa bit widths and reduce combinational logic complexity, switching activity, and power consumption relative to logarithmic correction architectures utilizing multibit correction arithmetic across an approximation domain.

21. A method comprising:generating, using an integrated circuit configured to perform logarithmic-domain arithmetic operations on one or more binary values represented in a floating-point logarithmic number system (FPLNS) format, an input logarithmic-domain value corresponding to a logarithm of a quantity including one plus at least a portion of a mantissa value;determining, using the integrated circuit, a region associated with the input logarithmic-domain value based on one or more selected bits of the input logarithmic-domain value;selectively applying, using the integrated circuit, a correction operation to at least a portion of the input logarithmic-domain value based on the determined region to generate a corrected logarithmic-domain value, wherein different regions are associated with different correction behaviors; andutilizing, using the integrated circuit, the corrected logarithmic-domain value in a multiplication operation in order to reduce arithmetic complexity, hardware resource utilization, switching activity, latency, and power consumption.