Automatic identification of the internal precision required for any function call that depends on the global target precision of any program.

JP2026529727APending Publication Date: 2026-09-01MITSUBISHI ELECTRIC R&D CENTRE EUROPE BV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2026536640
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-10-11
Filing Date
2024-05-21
Publication Date
2026-09-01

AI Technical Summary

Benefits of technology

【0034】 第4の態様によれば、本開示は、コンピュータプログラムの目標グローバル精度に達するためにコンピュータプログラムで実施される関数の必要な内部精度を決定するためのシステムに関し、前記システムは、少なくとも1つのプロセッサと少なくとも1つのメモリとを備え、少なくとも1つのプロセッサは、本開示の実施形態のいずれか1つによる方法を実行するように構成される。 本発明は、決して限定するものではない例として与えられかつ以下を示す図を参照して行われる以下の説明を読むとよりよく理解されるであろう。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026529727000001_ABST
    Figure 2026529727000001_ABST
Patent Text Reader

Abstract

The present invention relates to a computer implementation method (10) for determining the internal precision of at least one function necessary to achieve a target global precision (TGA) in a computer program, comprising the following steps: - A step (S01) to reduce the precision of the base implementation of the function in order to obtain a custom implementation. - Step (S02) to obtain the error caused by the degradation of precision (S01) between the custom implementation and the reference implementation. -Step (S03) to obtain multiple acceptable combinations of custom implementations that satisfy the target global accuracy (TGA) according to the error, The method (10) comprises at least one iteration of the step of evaluating the execution efficiency of acceptable combinations according to at least one resource consumption criterion (S04) and providing the required internal precision of the function when the at least one resource consumption criterion is met.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to computer program development, and more specifically to a method and system for identifying the internal precision required for mathematical functions of a computer program that achieves a target global precision. The target global precision corresponds to an upper bound of the total error that depends on approximation of mathematical functions and floating-point rounding errors. The present disclosure also relates to a method for evaluating the time and resource efficiency of computer program execution for the identified internal precision. Priority is claimed to European Patent Application No. EP23306766.9 filed on October 11, 2023, the content of which is incorporated herein by reference. [Background Art]

[0002] Numerical computation is widely used in various industrial fields including signal and image processing, or in embedded systems such as for automobile or nuclear power plant control.

[0003] However, such computation is subject to inherent computational errors due to the finite precision of computer operations. In fact, computer programs use floating-point approximations that introduce rounding errors instead of ideal real numbers. For example, approximate exponential functions exacerbate errors in their inputs, while logarithmic functions generally smooth results, so rounding errors can be reduced.

[0004] Such approximations typically accumulate during execution of a computer program implementing loops, and in such cases errors become large.

[0005] Furthermore, the implementation of mathematical functions may be influenced by the physical model / system they describe, such as trigonometric functions, and cosine or sine functions can be approximated by polynomial functions with errors. In addition, numerical simulations are always based on simplified models of physical phenomena. For example, a physical system can be modeled using differential equations, which are solved by mathematical solvers (e.g., the Runge-Kutta method) to provide an approximation of the actual solution.

[0006] These two sources of error, namely floating-point rounding error and mathematical function approximation, constitute the total error. The total error depends on the internal numerical precision of the mathematical function implementation within the computer program. However, it is difficult to predict the required internal precision from the program's global precision, and therefore difficult to guarantee that the total error remains below the program's desired precision target.

[0007] Previous techniques have proposed verifying the numerical precision of computer programs by using empirical / probabilistic techniques or based on formal verification methods. However, while these techniques can rely on knowledge of the precision of basic operations such as addition, subtraction, multiplication, and division (managed by the IEEE-754 standard), the implementation of mathematical functions such as exponential, cosine, and sine functions is generally hardware-dependent, dependent on the libraries used, and the corresponding source code is not always accessible. Therefore, the resulting implementations are often unique and their precision cannot be statically verified. Consequently, existing methods fail to provide a readily available, systematic, and universal solution.

[0008] One possible way to circumvent this problem is to rely on known / owned implementations whose precision is known and guaranteed. Function composition techniques, combined with formal techniques, are one possibility and have been the subject of a previous patent (European Patent No. 4235397). Nevertheless, before composing function implementations with a given required precision, it is necessary to identify these required internal precisions from the target precision of the numerical program under consideration.

[0009] Furthermore, in numerical computation, the precision of floating-point values ​​directly impacts the efficiency and speed of computer program execution. Indeed, while the nominal implementations of functions in computer programs—those available in system libraries—are generally very accurate, their calculations are often too costly and therefore too slow. In most cases, especially if a program contains many function calls, a lower-precision function implementation is sufficient and can result in much better program performance. Therefore, establishing the right balance between precision and computational cost in computer programs is another important aspect to consider.

[0010] Current solutions, while sometimes allowing for the determination of total error and required internal precision, do not verify whether the identified internal precision is appropriate for the overall efficiency and resource consumption of the computer program. [Overview of the project] [Problems that the invention aims to solve]

[0011] This disclosure aims to improve the situation. In particular, this disclosure aims to overcome at least some of the limitations of the prior art described above by proposing a method for automatically and efficiently determining the required internal precision of a mathematical function of a computer program with respect to a global target precision. Also, in at least some embodiments, this disclosure aims to propose a method for evaluating the optimal efficiency of a computer program, both in terms of high precision and low computational cost, with respect to an identified internal precision. Accordingly, the proposed methodology relies on a probabilistic technique that simulates the effect of several combinations of precision degradations on the global precision of a program in order to identify the lowest acceptable precision while ensuring the optimal execution of the program. The target global precision corresponds to the minimum acceptable precision of the computer program, i.e., the upper limit of the acceptable total error. [Means for solving the problem]

[0012] For this purpose, according to a first aspect, the present disclosure relates to a computer implementation method for determining the required internal precision of at least one function implemented in a computer program in order to achieve a target global precision of the computer program. Accordingly, the computer implementation method comprises the following steps, namely: - A step of degrading the precision of at least one baseline implementation of at least one function in order to obtain a custom implementation of at least one function, - A step to obtain the error caused by the loss of precision between the custom implementation and the reference implementation, depending on the common input value. - A step of obtaining multiple acceptable combinations of custom implementations that enable the computer program to meet its target global accuracy, depending on the error. - A step of evaluating the execution efficiency of at least one of the acceptable combinations in accordance with at least one resource consumption criterion, wherein the execution efficiency evaluation provides the required internal precision of the at least one function when the at least one resource consumption criterion is met, comprising at least one iteration of the step.

[0013] Therefore, the computer implementation method ensures that it identifies different combinations of mathematical function precisions for a computer program that satisfy the global target precision (during the first three steps) while optimizing a given set of criteria (e.g., worst-case execution time, resource usage, etc., between the last steps).

[0014] To this end, a first aspect of the computer implementation method comprises the step of evaluating the impact of reducing the precision of different mathematical functions in the computer program on the global target precision. For this purpose, in the first step, the computer program is implemented to run with a custom precision function, i.e., a reduced internal precision function. This custom execution of the computer program yields a custom output. Next, in the second step, the error of the custom output is evaluated, and in the third step, the internal precision is identified based on the said error to achieve the target global efficiency. In other words, these internal precisions are set lower beforehand than the nominal precision, but the error in the program result is kept negligible.

[0015] A second aspect of the computer implementation method is to evaluate during the fourth step whether these identified reduced internal precisions also reduce the time and resource costs of executing the computer program. Therefore, during the fourth step, it is required to find at least one best combination solution among the internal precisions identified in the third step that satisfies at least one resource consumption criterion. Thus, the best combination solution constitutes the required internal precision of the computer program.

[0016] The computer implementation method may further include a preliminary step for determining the reference error by using common input values ​​to compare the reference output of the at least one reference implementation with the corresponding ideal output of an ideal run of the at least one function.

[0017] The reference output is obtained from the nominal execution of a function in a computer program, with precision nominal as defined in the program, e.g., single-precision or double-precision floating-point format, and uses the reference implementation, i.e., one available in the system library of mathematical functions. The ideal output is assumed to have infinite precision and arises from the ideal execution of the function corresponding to the actual mathematical result. Since infinite precision is unattainable, the ideal output corresponds to a higher-precision execution of the computer program, such as double precision instead of single precision, and is computationally expensive.

[0018] In certain embodiments, the first step of precision degradation further includes introducing random noise into values ​​provided to or by at least one reference implementation in order to obtain a custom implementation having a custom output.

[0019] In a particular embodiment, the error determination in the second step is performed according to the custom output and according to the reference output.

number

number

[0020] In certain embodiments, the third step further includes comparing multiple error combinations with respect to a target global accuracy. - If the combination of errors achieves the target global accuracy, the corresponding combination in the custom implementation is an acceptable combination for the custom implementation. - If the error combination does not achieve the target global accuracy, the corresponding combination in the custom implementation will be rejected.

[0021] Accordingly, the combination of acceptable tolerances, and the corresponding combination of custom implementations identified in the third step, constitute the required internal precision of the program. These internal precisions are not necessarily optimal for efficient execution of a computer program, and may therefore be further analyzed in the fourth step of the method detailed hereinafter.

[0022] The computer-implemented method comprises repeating the following steps until a target global precision is achieved by at least one combination of errors of at least one combination of custom implementations, that is: - obtaining an additional combination of custom implementations, - determining an additional error based on said additional combination of custom implementations, - comparing said additional error with the target global precision, may further comprise the step of repeating.

[0023] In a specific embodiment, the at least one resource consumption criterion is - worst-case execution time, - average execution time, - resource usage threshold, - combinations thereof, belongs to the group including.

[0024] The resource consumption criteria defined in the preliminary steps as inputs to the method include termination conditions corresponding to thresholds where the program's efficiency is considered sufficient. Resource consumption criteria are arbitrary and can encompass one or more criteria, such as a worst-case execution time (WCET) criterion corresponding to the maximum time a program can take to run on a given fixed hardware platform. In other words, performing a WCET analysis of a program means measuring the upper limit of execution time for the worst-case combination of input values. Resource consumption criteria can also be a mean execution time (AET) criterion, which considers a standard combination of input values ​​and corresponds to a standard execution on typical hardware under typical conditions. Criteria can also be defined as program resource usage thresholds corresponding to, for example, maximum allowable memory usage, network, single / multiple CPU / GPU hardware, etc.

[0025] In certain embodiments, the fourth step further includes exploring a space of acceptable combinations of a custom implementation using a combinatorial search algorithm that includes a fitness function, the fitness function configured to identify the acceptable combinations that satisfy at least one resource consumption criterion.

[0026] The combinatorial search algorithm is used to efficiently explore the space of possible and acceptable precision combinations that achieve the global target precision identified in the third step. To guide the search, a fitness function is implemented in the combinatorial search algorithm, configured to assign scores to candidate solutions for the problem to be solved. In this disclosure, the fitness function is constructed from a pre-calculated database of costs for various versions of the function implementation, further depending on the function precision, from at least one resource consumption criterion. More precisely, in this disclosure, the fitness function therefore evaluates the relevance of the identified internal precision of the function (or custom implementation) to the computational resources and time of the computer program.

[0027] In certain embodiments, the combinatorial search algorithm is a genetic algorithm that includes gene mutation and crossover for searching for at least some of the custom implementation combinations.

[0028] The concept of a genetic algorithm is to model natural selection through gene mutation and crossover over many generations. A genetic algorithm includes a fitness function, which, during the first generation (first iteration), selects the best custom output combination according to its fitness function score. The identified combinations are then mixed together by combining their "genes" during the crossover and mutation stages to create additional candidates for the next generation.

[0029] In certain embodiments, the fitness function allows for the comparison of acceptable combinations of custom implementations against at least one resource consumption criterion. -If any acceptable combination of custom implementations satisfies at least one resource consumption criterion, then the acceptable combination of custom implementations constitutes the required internal precision of at least one function. - If any acceptable combination of custom implementations does not meet at least one resource consumption criterion, the said acceptable combination of custom implementations will be rejected.

[0030] The computer implementation method follows the steps below until at least one resource consumption criterion is met by one acceptable combination of custom implementations, i.e. - Steps to obtain additional custom implementations, - Repeat the second and third steps until the additional error combinations achieve the target global accuracy, providing additional acceptable combinations of custom implementations. -The step may further include repeating the step of evaluating the execution efficiency of the additional acceptable combinations of the custom implementation according to at least one resource consumption criterion.

[0031] When one or more acceptable combinations of custom implementations satisfy at least one resource consumption criterion, i.e., when a termination condition is met, these correspond to the required internal precision of a computer program with the necessary resource efficiency. These combinations then constitute the output of the process.

[0032] According to a second aspect, the disclosure relates to a computer program product which, when executed by at least one processor, includes instructions that configure the at least one processor to perform a method according to any one embodiment of the disclosure.

[0033] According to a third aspect, the disclosure relates to a computer-readable storage medium that, when executed by at least one processor, includes instructions that constitute the at least one processor to perform a method according to any one embodiment of the disclosure.

[0034] According to a fourth aspect, the disclosure relates to a system for determining the required internal precision of a function performed by a computer program in order to achieve a target global precision of the computer program, the system comprising at least one processor and at least one memory, the at least one processor being configured to perform a method according to any one embodiment of the disclosure. The present invention will be better understood by reading the following description, which is given as an example and not in any way limiting, and is made with reference to the following figures. [Brief explanation of the drawing]

[0035] [Figure 1] This figure illustrates the main steps of an exemplary embodiment of a computer implementation method for determining the required internal precision of a computer program. [Figure 2] This diagram illustrates the preliminary steps of a computer implementation method. [Figure 3] This is a diagram showing a computer system that implements a computer implementation method. [Modes for carrying out the invention]

[0036] In these figures, the same reference numerals from one figure to another indicate the same or similar elements. For clarity, the elements shown are not to scale unless otherwise specified.

[0037] Furthermore, the order of steps shown in these diagrams is provided for illustrative purposes only and is not intended to limit the disclosure, which may apply to the same steps performed in a different order.

[0038] Figure 1 schematically illustrates the 10 main steps of a computer implementation method for determining the required internal precision of a computer program.

[0039] The computer implementation method 10 is executed by a computer system (shown in Figure 3). In a preferred embodiment, the computer system comprises one or more processors Px (which may belong to the same computer or different computers) and one or more storage memories St (magnetic hard disk, optical disk, electronic memory, or any computer-readable storage medium) in which a computer program product is stored in the form of a set of program code instructions executed to carry out all or part of the steps of the computer implementation method 10. The computer program product is loaded into execution memory Mem, which enables the processor Px to execute the computer implementation method 10. These components are connected to each other via a bus Bs.

[0040] Alternatively, or in combination thereof, the computer system may include one or more programmable logic circuits (FPGA, PLD, etc.) and / or one or more dedicated integrated circuits (ASICs, etc.) adapted to perform all or part of the steps of the computer implementation method 10. In other words, the computer system includes a set of means configured by software (a specific computer program product) and / or hardware (a processor, FPGA, PLD, ASIC, etc.) to perform the steps of method 10.

[0041] The computer program under investigation is its source code, which may be written in any computer language, such as C, C++, Fortran, Java, or Python. For example, the computer program is intended to run on an embedded system to perform tasks related to signal or image processing, automatic control, etc. The computer program includes assignments, control structures (conditional branching, switches, loops, etc.), mathematical operations (addition, multiplication, etc.), and mathematical functions.

number

number

number

number

[0042] The object of the present invention is to determine which implementation of a mathematical function (among several possible implementations) best suits the requirements of a computer program in terms of computational precision. To achieve this result, Method 10 is performed. Essentially, this method aims to determine a suitable combination of implementations of several mathematical functions to achieve a target global precision TGA of a computer program. This method uses, in particular, an algorithm that enables the identification of combinations of custom implementations of a function (e.g., a combinatorial search algorithm) and an error comparison algorithm that enables the determination of whether a given combination satisfies the target global precision TGA. An example of an implementation of Method 10 is described in detail below. Once one or more combinations of custom implementations of a function are determined, these combinations of custom implementations are used to determine whether several efficiency criteria (e.g., in terms of execution time, or in terms of memory allowed for program execution, etc.) are met.

[0043] In this example of implementation, as shown in Figure 1, the computer implementation method 10 includes an optional pre-configuration step S00 for receiving several inputs, which are shown in Figure 2 and described in more detail below. In summary, the pre-configuration step S00 is a reference implementation

number

number

number

number

number

number

number

[0044] Computer implementation method 10 consists of the following steps, namely: - At least one function (

number

number

number

number

number

number

number

number

number

number

number

number

[0045] In the first step S01 of the precision reduction simulation, whenever the computer program CPx encounters an arithmetic / function call, a probabilistic reduction is performed on the internal precision of these arithmetic / functions. Thus, the computer program CPx here has functions with custom reduced internal precision.

number

number

number

[0046] Such custom implementations

number

[0047] For illustrative purposes, consider a custom implementation of a cosine function with 20 bits of internal precision, nominally referenced as 53 bits (corresponding to the precision of the mantissa). Each time the cosine function is encountered during a custom execution of the computer program CPx, the resulting output is downgraded by random noise from the 21st bit of the 53-bit reference. Then, with each subsequent call to the cosine function in the computer program CPx, the 21-bit downgrading accumulates and is applied to the previously degraded cosine function output. In other words, this methodology allows for the simulation of using a less precise implementation (compared to the reference implementation) while the computer program CPx is running.

[0048] Other methods for effectively reducing precision and efficiently analyzing the effects of the reduced precision may be implemented for custom executions of the program. For example, trimming bits beyond a given index (from the 21st to the 53rd bit) can be used by replacing the values ​​of these bits with 0. Another method may be to directly use one or more downgraded implementations of certain functions, if such downgraded implementations are available. Other classic tools can also be used for this purpose.

[0049] Furthermore, the first iteration of the S01 step is a custom implementation.

number

[0050] From Figure 1, the second step S02 is performed to evaluate the total error, i.e., to accommodate both mathematical function approximation and floating-point rounding approximation (resulting in degradation). The total error is the nominal run baseline output (pre-calculated, for example, in preliminary step S00).

number

number

number

[0051] Here, the value

number

number

number

number

number

[0052] Otherwise,

number

[0053] Next, the resulting total error coefficient

number

number

number

number

number

number

number

number

[0054] Next, these obtained error coefficients are compared with TGA in the third step S03. Thus, the value that achieves TGA is the custom output provided in the precision reduction step S01.

number

number

[0055] Custom Output

number

[0056] In the case of rejected combinations, the combinatorial search algorithm produces a custom output with reduced internal accuracy, as shown in Figure 1.

number

number

[0057] Custom Output

number

[0058] In a preferred embodiment, a genetic algorithm is used. In this case, additional mutation combinations of the custom output are generated, for example, by gene mutations and / or crossovers over many generations (repetition after repetition).

[0059] Given an example where the initial precision combination of the cosine / sine function was arbitrarily 30 / 10 bits, a combinatorial search algorithm could, for example, generate additional precision test combinations for the next generation, such as 20 / 40 bits, 30 / 15 bits, or 10 / 30 bits.

[0060] The additional combinations of custom outputs are carried out by going back to the process in steps S02 and S03. Thus, steps S01, S02, and S03 are executed until an acceptable combination of custom outputs that achieves the TGA is identified.

[0061] Next, as shown in Figure 1, Method 10 includes an efficiency analysis in step S04 to evaluate whether the identified internal precision also guarantees efficient computer program execution with respect to resources, time, and other criteria. This analysis is performed for all identified combinations that achieve TGA using a fitness function for the input resource consumption criterion. The fitness function is configured to associate the score in each combination with the selected resource consumption criterion, depending on its fitness. Furthermore, achieving the resource consumption criterion means that the evaluation of this criterion by the fitness function satisfies the stopping condition.

[0062] The fitness function, resource consumption criteria, and stop conditions are determined in advance and implemented in preliminary step S00.

[0063] Therefore, the combination of custom implementations identified by the fitness function to also achieve the resource consumption criteria corresponds to the internal precision required to optimize the efficiency of the computer program CPx, and constitutes the final output of Method 10.

[0064] Method 10 is configured to stop after the first combination of internal precisions required to achieve the resource consumption criterion has been identified. For this purpose, the stopping condition, e.g., the maximum number of combinations included in the resource consumption criterion, corresponds to a threshold in which efficiency is considered sufficient.

[0065] However, a custom output for identified combinations with the required internal accuracy from step S04 is generated by the combinatorial search algorithm.

number

[0066] As mentioned above, custom output

number

[0067] The selected algorithm can be configured to test several configurations of additional combinations with lower precision in each iteration in order to identify the most efficient combination (in terms of resource consumption) in terms of internal precision after step S04.

[0068] Otherwise, in step S04, custom implementation combinations that do not meet the resource consumption criteria are rejected. The selected combinatorial search algorithm then iterates through additional combinations with internal accuracy to produce additional custom outputs.

number

[0069] In one embodiment, the combinatorial search algorithm is configured to generate additional combinations for the best identified combination that achieves TGA in step S03. For example, if the 30 / 10-bit cosine / sine precision combination is identified as more efficient than the 5 / 45-bit combination by the fitness function in step S04 according to their respective scores, the combinatorial search algorithm tests additional precision combinations, for example, 10 / 30 bits. The additional combinations may also be selected as low as possible, preferably, to better optimize the computer program efficiency, in this case, for example, 25 / 5 bits.

[0070] Method 10 is iterated from step S01 to step S04 until at least one combination of custom implementations is identified by the fitness function to ultimately achieve the resource consumption criterion, i.e., until the stopping condition is met.

[0071] Furthermore, we must consider cases where no feasible solution can be found. For example, if the process reaches a very large number of iterations (which may be defined by the S00 preliminary step), it may be impossible to find a combination of solutions that allows the TGA and / or the termination condition to be reached. This may be the case, for example, if the TGA and / or resource consumption criteria are not theoretically achievable for hardware other than that recommended, or if there are too many cost criteria involved. In this case, it may be possible to use automated and / or user-authorized methods to modify the TGA / criteria values, indicate to this computer program CPx that the input is unachievable, or even suggest the closest internal-precision solution that has been identified but does not satisfy the TGA and / or criteria.

[0072] The computer implementation method 10 may also include several other relevant information outputs, such as a data log of the memory used, the computation time for each combination, and VPREC (or similar / used tool) output from the depreciation step S03.

[0073] As shown in Figure 2, the preliminary step S00 includes receiving method inputs such as the computer program to be evaluated, the desired TGA, and resource consumption criteria with associated termination conditions. The desired TGA and resource consumption criteria are arbitrary and application domain dependent. For example, the TGA can be defined as the minimum number of bits to be reached, in which case the TGA corresponds to the percentage of error to the result and depends on the size of the input and output data. Combinatorial algorithms / genetic algorithms and fitness function definitions are also pre-calculated and implemented within the computer method 10 at this stage.

[0074] The preliminary step S00 further includes a preliminary analysis of the computer program CPx. Thus, a first over-approximation calculation of the domain of floating-point values ​​in each statement of the analyzed program is performed, in particular at the location of mathematical function calls. This calculation results in a random sampling of values ​​across the domain. This can be done, for example, using an abstract interpretation tool for floating-point arithmetic, which is an automated form of method used to automatically verify simple characteristics of a program.

[0075] If the program under consideration is part of a larger development, domain evaluation can be used to determine the domain of values ​​that the program's input variables can take. If the program is independent, this information may be unknown (and therefore the domain is the entire range of floating-point values) or it may be asserted by the developer.

[0076] Next, the methodological step may consist of incorporating a measurement mechanism into the program to run the program with different combinations of randomly sampled values. For this purpose, parameters are initialized, the computer program is run under nominal execution conditions, and optionally under ideal execution conditions.

[0077] In nominal execution, a computer program is executed in a nominal floating-point format provided for the program, for example, in single-precision or double-precision format with pre-calculated random sampling of an over-approximated domain of floating-point values.

number

[0078] In ideal execution, a computer program runs using infinite or ideal (higher precision) floating-point format, for example, with any very large precision of 100 bits if the nominal precision is double precision, or with double precision if the nominal precision is single precision. This is the ideal output for different values ​​of random sampling.

number

[0079] Next, the maximum error between the nominal performance baseline output and the ideal performance ideal output is estimated as follows:

number

[0080] Here, the value

number

number

number

number

number

[0081] Otherwise,

number

[0082] Next, the output obtained as a result of the preliminary step S00

number

Claims

1. A computer program that implements at least one function necessary to achieve the target global accuracy (TGA) of the computer program. [Math 1] A computer implementation method (10) for determining the internal accuracy of ), wherein the method comprises the following steps, namely, - The at least one function ( [Math 2] Custom implementation of ( [Math 3] In order to obtain the above at least one function ( [Math 4] ) at least one standard implementation ( [Math 5] A step (S01) that reduces the accuracy of ) - Custom implementation ( [Math 6] ) and standard implementation ( [Number 7] Error induced by the decrease in accuracy between (S01) and ( [Number 8] Step (S02) to obtain the common input value, - The aforementioned error ( [Number 9] ) Custom implementations that enable the computer program to meet the target global accuracy (TGA) in accordance with the above. [Number 10] Step (S03) to obtain multiple acceptable combinations of ) - A step (S04) of evaluating the execution efficiency of at least one of the acceptable combinations according to at least one resource consumption criterion, wherein the execution efficiency evaluation is performed by determining the required internal precision of the at least one function when the at least one resource consumption criterion is met ( [Math 11] A computer implementation method (10) comprising at least one iteration of step, which provides ).

2. Using the aforementioned common input value, the at least one reference implementation ( [Math 12] ) Reference output ( [Number 13] ) to the above at least one function ( [Number 14] ) Ideal execution corresponding ideal output ( [Number 15] By comparing it with the standard error ( [Number 16] The method according to claim 1 (10), further comprising a preliminary step for determining ).

3. The aforementioned precision reduction step (S01) is a custom output ( [Number 17] The custom implementation having ( [Number 18] In order to obtain the above, at least one standard implementation ( [Number 19] The method according to claim 1 (10), comprising introducing random noise into values ​​provided to or provided by at least one reference implementation.

4. The error determination step (S02) is the custom output ( [Number 20] ) and reference output [Math 21] Depending on the error [Number 22] and [Number 23] The method according to claim 3 (10), comprising the step of calculating.

5. The above step (S03) involves a combination of multiple errors with respect to the target global accuracy (TGA). [Number 24] This further includes the step of comparing ) - If the error combination achieves the target global accuracy (TGA), the corresponding combination in the custom implementation is an acceptable combination for the custom implementation. [Number 25] ) and - If the error combination does not achieve the target global accuracy (TGA), the corresponding combination in the custom implementation ( [Number 26] The method according to claim 4 (10) is rejected.

6. The method (10) is at least one combination of custom implementations ( [Number 27] The following steps, namely, are taken until the target global accuracy (TGA) is achieved by at least one combination of the errors of ) - Custom implementation ( [Number 28] Step (S01) to obtain additional combinations of ) - The aforementioned additional combination of custom implementations ( [Number 29] ) based on additional error ( [Number 30] Step (S02) to determine - The aforementioned additional error ( [Number 31] The method according to claim 1 (10), further comprising the step of repeating the step of comparing (S03) with the target global accuracy (TGA).

7. The aforementioned at least one resource consumption criterion is: - Worst-case execution time (WCET), - Average execution time (AET), - Resource usage threshold, - The method according to claim 1 (10), which belongs to the group including combinations thereof.

8. The above step (S04) is a custom implementation of a combinatorial search algorithm that includes a fitness function. [Number 32] The method according to any one of claims 1 to 7 (10), further comprising the step of exploring the space of acceptable combinations of ), wherein the fitness function is configured to identify the acceptable combinations that satisfy the at least one resource consumption criterion.

9. The aforementioned combinatorial search algorithm is a custom implementation ( [Number 33] The method according to claim 8 (10), which is a genetic algorithm comprising gene mutation and crossover for exploring at least some of the combinations of ).

10. The fitness function is a custom implementation for the at least one resource consumption criterion ( [Number 34] ) makes it possible to compare the aforementioned acceptable combinations, - The aforementioned acceptable combinations of custom implementations ( [Number 35] If ) satisfies at least one resource consumption criterion, the acceptable combination of custom implementations is the required internal precision of at least one function ( [Number 36] ) constitutes, - The aforementioned acceptable combinations of custom implementations ( [Number 37] If ) does not meet at least one resource consumption criterion, the acceptable combination of the custom implementation ( [Number 38] The method according to claim 8 (10) is rejected.

11. The method (10) is such that the at least one resource consumption criterion is an acceptable combination of the custom implementation ( [Number 39] The following steps are taken until the condition is met: - Additional custom implementations ( [Number 40] Step (S01) to obtain ) - Repeat steps (S02) and (S03) until the additional error combination achieves the target global accuracy (TGA), and the additional acceptable combination of custom implementations ( [Number 41] ) a step of providing - Depending on at least one resource consumption criterion, the additional acceptable combinations of the custom implementation ( [Number 42] The method according to claim 7 or 8 (10), further comprising the step of repeating the step of evaluating the execution efficiency of (S04).

12. A computer program product comprising instructions that, when executed by at least one processor, configure the at least one processor to perform the method according to any one of claims 1 to 11.

13. A computer-readable storage medium that, when executed by at least one processor, includes instructions that configure the at least one processor to perform the method according to any one of claims 1 to 11.

14. A system for determining the required internal precision of a function performed in a computer program in order to achieve a target global precision of the computer program, comprising at least one processor and at least one memory, wherein the at least one processor is configured to perform the method (10) according to any one of claims 1 to 11.