KR20080018692A - Method, programming structure and recordable medium for performing fast floating point operation for various precisions - Google Patents

Method, programming structure and recordable medium for performing fast floating point operation for various precisions Download PDF

Info

Publication number
KR20080018692A
KR20080018692A KR1020060081218A KR20060081218A KR20080018692A KR 20080018692 A KR20080018692 A KR 20080018692A KR 1020060081218 A KR1020060081218 A KR 1020060081218A KR 20060081218 A KR20060081218 A KR 20060081218A KR 20080018692 A KR20080018692 A KR 20080018692A
Authority
KR
South Korea
Prior art keywords
floating point
precision
operator
arithmetic
operator object
Prior art date
Application number
KR1020060081218A
Other languages
Korean (ko)
Other versions
KR100887327B1 (en
Inventor
임성빈
Original Assignee
엠텍비젼 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엠텍비젼 주식회사 filed Critical 엠텍비젼 주식회사
Priority to KR1020060081218A priority Critical patent/KR100887327B1/en
Publication of KR20080018692A publication Critical patent/KR20080018692A/en
Application granted granted Critical
Publication of KR100887327B1 publication Critical patent/KR100887327B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/483Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/499Denomination or exception handling, e.g. rounding or overflow
    • G06F7/49942Significance control
    • G06F7/49947Rounding
    • G06F7/49957Implementation of IEEE-754 Standard

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Nonlinear Science (AREA)
  • Complex Calculations (AREA)

Abstract

A method, a programming structure and a recordable medium for performing fast floating point operation about various precisions are provided to create an operator object of each combination automatically by making a single precision operator object of the IEEE standard into a template based on the size of an exponent part and a mantissa part. A first precision is determined based on an exponent part and a mantissa part of a floating point. An execution program is created, which includes a first floating point operator object converted into a template. A second precision of a second floating point operator object is determined. And a floating point operation is performed by the first floating point operator object within the execution program which includes at least one operation of association between the first and the second floating point operator objects. Thus, the floating point operation of various precisions is able to be performed rapidly by the first floating point operator object by simply coding an object oriented software program.

Description

다양한 정밀도에 대한 고속 부동 소수점 연산을 수행하는 방법, 프로그래밍 구조 및 기록 매체{Method, Programming Structure and Recordable Medium for Performing Fast Floating Point Operation for Various Precisions}Method, Programming Structure and Recordable Medium for Performing Fast Floating Point Operation for Various Precisions}

도 1은 종래의 하드웨어 부동 소수점 연산기를 설명하기 위한 도면이다.1 is a view for explaining a conventional hardware floating-point operator.

도 2는 본 발명의 일실시예에 따른 부동 소수점 연산기에 대한 객체 다이어그램이다.2 is an object diagram for a floating point operator in accordance with one embodiment of the present invention.

도 3은 IEEE 부동 소수점 포맷을 설명하기 위한 도면이다.3 is a diagram for explaining an IEEE floating point format.

도 4는 도 2의 객체 다이어그램을 설명하기 위한 흐름도이다.4 is a flowchart illustrating an object diagram of FIG. 2.

도 5는 다양한 정밀도에 대하여 적용할 수 있는 객체 상수의 선언을 설명하기 위한 도면이다.5 is a diagram for describing a declaration of an object constant applicable to various precisions.

<도면의 주요 부분에 대한 부호의 설명> <Explanation of symbols for the main parts of the drawings>

PITFloatIEEE: IEEE 표준의 단정도(Single Precision) 연산기 템플릿 객체PITFloatIEEE: IEEE Standard Single Precision Operator Template Object

PITFloat: 단순한 연산기 템플릿 객체PITFloat: Simple Operator Template Object

PITSingle: 상속하는 IEEE 표준의 32비트 부동 소수점 연산기 객체PITSingle: the inheriting IEEE standard 32-bit floating point operator object

PITFloat32: 상속하는 단순한 32비트 부동 소수점 연산기 객체PITFloat32: A simple 32-bit floating point operator object that inherits

본 발명은 고속 부동 소수점 연산 방법에 관한 것으로서, 더욱 상세하게는 다양한 정밀도에 대한 고속 부동 소수점 연산을 수행하는 방법, 프로그래밍 구조 및 기록 매체에 관한 것이다. TECHNICAL FIELD The present invention relates to a method for fast floating point operation, and more particularly, to a method, a programming structure, and a recording medium for performing a fast floating point operation for various precisions.

과학 기술 분야에서 연산의 정밀도 보장을 위하여 부동 소수점 연산기의 사용이 불기피하다. 현재 비디오 또는 오디오 등의 멀티미디어 디지털 데이터를 처리하는 대부분의 프로세서는 IEEE 호환 부동 소수점 연산기를 이용하여 부동 소수점 연산을 수행한다. IEEE 호환 부동 소수점 연산기는 32비트의 단정도(single precision) 부동 소수점 연산 또는 64 비트의 배정도(double precision) 부동 소수점 연산을 지원한다. 그러나, 특정 분야에서 디지털 데이터를 처리하기 위한 응용 프로세서의 경우에 IEEE 호환 부동 소수점 연산의 모든 정밀도를 필요로 하지 않는 경우가 있다. 또는, 특정 응용 프로세서에서는 다양한 정밀도의 연산을 지원할 수 있는 여러 가지의 부동 소수점 연산기들이 요구되는 경우도 있다. In order to guarantee the accuracy of operations in the scientific and technical fields, the use of floating point operators is unavoidable. Most processors currently processing multimedia digital data such as video or audio perform floating point operations using IEEE compatible floating point operators. IEEE compliant floating point operators support 32-bit single precision floating point operations or 64-bit double precision floating point operations. However, there are cases where application processors for processing digital data in certain fields do not require all the precision of IEEE compatible floating point operations. Alternatively, a particular application processor may require several floating-point operators that can support various precision operations.

도 1은 종래의 하드웨어 부동 소수점 연산기(10)를 설명하기 위한 도면이다. 도 1을 참조하면, 레지스터들(11, 12, 13, 14)로 입력되는 데이터들 중 두 개(A, B)가 먹스(multiplexer)들(15, 16)를 통하여 ALU(Arithmetic Logic Unit)(17)로 입력된다. 예를 들어, 레지스터들(11, 12, 13, 14)로 입력되는 데이터들은 단정도 부동 소수점 표현과 배정도 부동 소수점 표현과 같이 정밀도가 다른 두 데이터 일수 있다. 상기 ALU(17)에서는 프리시전(precision) 정보에 따라 선택적으로 단정도 연산 또는 배정도 연산을 수행하여 단정도 부동 소수점 표현 또는 배정도 부동 소수 점 표현의 출력 데이터를 생성한다. 상기 ALU(17)의 출력 데이터는 레지스터들(13, 14)로 피드백될 수 있고, 이에 따라 레지스터들(11, 12, 13, 14)에 입력된 데이터들 중 두 개(A, B)가 다시 선택되어 프리시전 정보에 따라 상기 ALU(17)가 해당 연산을 수행할 수 있도록 한다. 1 is a view for explaining a conventional hardware floating-point operator 10. Referring to FIG. 1, two of the data (A, B) input to the registers 11, 12, 13, and 14 pass through an Arithmetic Logic Unit (ALU) through the multiplexers 15 and 16. 17). For example, the data input into the registers 11, 12, 13, 14 may be two data of different precision, such as a single-precision floating point representation and a double precision floating point representation. The ALU 17 selectively outputs a single-precision floating point representation or a double-precision floating point representation by performing a single precision operation or a double precision operation according to the precision information. The output data of the ALU 17 can be fed back to the registers 13, 14, whereby two of the data A, B input to the registers 11, 12, 13, 14 are again returned. It is selected to enable the ALU 17 to perform the operation according to the precision information.

두개의 정밀도를 가지는 부동 소수점 데이터가 혼재될 경우에 도 1과 같은 방법으로 ALU(17)에서 처리되도록 할 수 있지만, 특정 정밀도를 가지는 부동 소수점 연산기가 요구될 때마다 도 1과 같이 정밀도 변환을 위한 모듈이 사용되어야 한다. 따라서, 특정 응용 프로세서에서 위와 같은 변환 모듈이 여러 부분에서 요구되는 경우에 그 만큼의 하드웨어 자원으로 구현되어야 하므로 회로가 복잡하고 회로 사이즈가 커지며 전력 소모가 많아지는 단점이 있다.In the case where two precision floating point data are mixed, the ALU 17 may be processed in the same manner as in FIG. 1, but whenever a floating point operator having a specific precision is required, The module must be used. Therefore, when the above-described conversion module is required in various parts in a specific application processor, it is necessary to implement the hardware resource as much as there is a disadvantage that the circuit is complicated, the circuit size is large, and the power consumption is increased.

따라서, 도 1과 같은 단일 연산기를 사용한 다양한 정밀도의 부동 소수점 연산기 구조는 응용 프로세서에 적합하지 않으며, 하드웨어로 구현하는 것도 현실적으로 불가능하다. Therefore, the floating point operator structure of various precision using a single operator as shown in FIG. 1 is not suitable for an application processor, and it is practically impossible to implement in hardware.

이에 따라, 임의의 정밀도의 부동 소수점 연산을 위하여 소프트웨어 연산기를 사용하려는 많은 시도가 이루어지고 있다. 그러나, 소프트웨어 연산기를 사용하는 경우에도, 각 부동 소수점의 정밀도에 따라 기하급수적으로 많은 연산기를 작성하여야 하고, 사용 측면에서도 요구되는 정밀도에 알맞도록 일일이 코드, 예를 들어, C++ 코드를 수정하고 컴파일하는 등 실행 파일을 완성하기 위하여 많은 까다롭고 정밀한 작업을 해주어야 하는 불편함이 있다. Accordingly, many attempts have been made to use software operators for floating point operations of arbitrary precision. However, even when using software operators, many operators must be created exponentially according to the precision of each floating point, and the code, for example, C ++ code, can be modified and compiled to meet the required precision in terms of usage. It is inconvenient to do a lot of tricky and precise work to complete the executable file.

또한, 소프트웨어에 의한 부동 소수점 연산에 사용될 부동 소수점의 정밀도 를 실행시간(run-time) 중에 추출하여 이에 맞도록 후속 연산 처리를 하는 경우에 연산 속도가 저하되는 문제점이 있다. 따라서, 서로 다른 정밀도의 부동 소수점 연산을 위하여 이들의 조합에 따른 각각의 연산기를 코딩하여야만 고속의 연산 성능을 얻을 수 있다. 그러나, 이와 같이 각 조합의 연산기를 코딩하는 경우에, 알고리즘 등이 변경되면 모든 작성된 연산기에 적용되는 함수들의 수정이 불가피하게 되므로 유지 보수가 매우 어려워지는 문제점이 있다. In addition, when the precision of the floating point to be used for floating point calculation by the software is extracted during run-time and subsequent processing is performed accordingly, there is a problem that the operation speed decreases. Therefore, in order to achieve high-speed computational performance, the respective operators according to the combination of the two must be coded for floating-point operations with different precisions. However, in the case of coding each combination of operators as described above, there is a problem in that maintenance becomes very difficult because modification of functions applied to all the created operators is inevitable when the algorithm and the like are changed.

따라서, 하드웨어의 제약성, 소프트웨어 구현과 유지 보수의 용이성, 및 정밀도에 독립적으로 다양한 정밀도를 지원하는 고속의 소프트웨어 부동 소수점 연산기가 요구되는 실정이다. Accordingly, there is a need for a high speed software floating point operator that supports various precisions independently of hardware constraints, ease of software implementation and maintenance, and precision.

따라서, 본 발명은 상술한 문제점을 해결하기 위한 것으로서, 본 발명의 목적은, 다양한 정밀도에 대한 고속 부동 소수점 연산을 위하여, IEEE 표준의 단정도(Single Precision) 연산기 객체와 IEEE 표준의 연산 특성 중 일부를 배제한 단순한 연산기 객체를 템플릿화하고(template), 하드웨어를 이용한 고속 처리도 가능하게 하는 객체 상속과 함께 템플릿화된 객체들이 선택적으로 이용되도록 하는 고속 부동 소수점 연산을 수행하는 방법을 제공하는 데 있다. Accordingly, an object of the present invention is to solve the above-described problem, and an object of the present invention is to provide a single precision arithmetic object of the IEEE standard and some of the computational characteristics of the IEEE standard for high-speed floating-point operation for various precisions. The present invention provides a method of performing a fast floating-point operation that allows templated objects to be selectively used together with object inheritance that allows for simple processing using a template and a simple operation object excluding the above.

본 발명의 다른 목적은, 위와 같은 고속 부동 소수점 연산 방법을 실행하기 위한 프로그래밍 구조 및 프로그램이 기록된 기록 매체를 제공하는 데 있다.Another object of the present invention is to provide a recording medium in which a programming structure and a program for executing the above fast floating point arithmetic method are recorded.

상기와 같은 본 발명의 목적을 달성하기 위한 본 발명의 일면에 따른 부동 소수점 연산 방법은, 부동 소수점의 지수 부분과 가수 부분의 크기를 기준으로 정해진 제1 정밀도에 따라 템플릿화된 제1 부동 소수점 연산기 객체를 포함하는 실행 파일을 생성하는 단계; 및 상기 실행 파일을 이용하여 부동 소수점 연산을 수행하는 단계를 포함하고, 상기 제1 부동 소수점 연산기 객체는 제2 정밀도가 정해진 제2 부동 소수점 연산기 객체와 어소시에이션 관계에 있는 적어도 하나의 오퍼레이션을 포함하는 것을 특징으로 한다.According to an aspect of the present invention, a floating point arithmetic method includes a first floating point operator templated according to a first precision determined based on sizes of an exponent part and a mantissa part of a floating point. Generating an executable file including the object; And performing a floating point operation using the executable file, wherein the first floating point operator object includes at least one operation that is in association with a second floating point operator object having a second precision. It features.

상기 실행 파일의 생성을 위한 소스 코드의 컴파일시에 상기 제1 부동 소수점 연산기 객체와 상기 제2 부동 소수점 연산기 객체 간의 조합에 따른 상기 적어도 하나의 오퍼레이션에 대한 연산 객체가 생성된다.When compiling the source code for generating the executable file, an operation object is generated for the at least one operation according to a combination between the first floating point operator object and the second floating point operator object.

상기 제1 부동 소수점 연산기 객체는 상기 제1 정밀도의 하드웨어 연산기를 호출하는 제3 부동 소수점 연산기 객체에 의하여 상속되고, 상기 제2 부동 소수점 연산기 객체는 상기 제2 정밀도의 하드웨어 연산기를 호출하는 제4 부동 소수점 연산기 객체에 의하여 상속된다. The first floating point arithmetic object is inherited by a third floating point arithmetic object that invokes the hardware operator of the first precision, and the second floating point arithmetic object is a fourth float calling the hardware operator of the second precision. Inherited by the decimal operator object.

상기 제1 부동 소수점 연산기 객체의 템플릿화에서 상기 지수 부분 및 상기 가수 부분의 크기와 관련된 적어도 하나의 객체 상수가 선언된다.In the template of the first floating point operator object, at least one object constant associated with the size of the exponent portion and the mantissa portion is declared.

상기와 같은 본 발명의 목적을 달성하기 위한 본 발명의 다른 일면에 따른 부동 소수점 연산 방법은, 부동 소수점의 지수 부분과 가수 부분의 크기를 기준으로 제1 정밀도가 정해져서 템플릿화된 제1 부동 소수점 연산기 객체 및 제2 정밀도가 정해진 제2 부동 소수점 연산기 객체를 포함하는 실행 파일을 생성하는 단계; 및 사용자의 선택에 따라 선택적으로 상기 제1 부동 소수점 연산기 객체에 의한 상 기 제1 정밀도의 부동 소수점 연산을 수행하거나 상기 제2 부동 소수점 연산기 객체에 의한 상기 제2 정밀도의 부동 소수점 연산을 수행하는 단계를 포함하는 것을 특징으로 한다.In accordance with another aspect of the present invention for achieving the above object of the present invention, a floating point arithmetic method is a first floating point arithmetic template is a first precision is determined based on the size of the exponent portion and mantissa portion of the floating point Generating an executable file comprising an object and a second floating point arithmetic object having a second precision determined; And optionally performing floating point operations of the first precision by the first floating point operator object or performing floating point operations of the second precision by the second floating point operator object. Characterized in that it comprises a.

상기 제1 부동 소수점 연산기 객체는 상기 제2 부동 소수점 연산기 객체와 어소시에이션 관계에 있는 적어도 하나의 오퍼레이션을 이용하여 상기 부동 소수점 연산을 수행한다.The first floating point operator object performs the floating point operation using at least one operation that is in association with the second floating point operator object.

상기 제1 부동 소수점 연산기 객체는 상기 제2 부동 소수점 연산기 객체 보다 낮은 정밀도의 연산을 수행한다.The first floating point operator object performs a lower precision operation than the second floating point operator object.

상기 제2 부동 소수점 연산기 객체는 IEEE 표준의 단정도(Single Precision) 연산기 객체이고, 상기 제1 부동 소수점 연산기 객체는 상기 IEEE 표준의 단정도 연산기 객체의 연산 특성 중 일부를 배제한 연산기 객체이다. The second floating point arithmetic object is a single precision arithmetic object of the IEEE standard, and the first floating point arithmetic object is an arithmetic object excluding some of the computational characteristics of the IEEE precision arithmetic arithmetic object.

상기 실행 파일의 생성을 위한 소스 코드의 컴파일시에 상기 제1 부동 소수점 연산기 객체와 상기 제2 부동 소수점 연산기 객체 간의 조합에 따른 적어도 하나의 오퍼레이션에 대한 연산 객체가 생성된다. When compiling the source code for generating the executable file, an operation object is generated for at least one operation according to a combination between the first floating point operator object and the second floating point operator object.

상기 제1 부동 소수점 연산기 객체는 상기 제1 정밀도의 하드웨어 연산기를 호출하는 제3 부동 소수점 연산기 객체에 의하여 상속되고, 상기 제2 부동 소수점 연산기 객체는 상기 제2 정밀도의 하드웨어 연산기를 호출하는 제4 부동 소수점 연산기 객체에 의하여 상속된다. The first floating point arithmetic object is inherited by a third floating point arithmetic object that invokes the hardware operator of the first precision, and the second floating point arithmetic object is a fourth float calling the hardware operator of the second precision. Inherited by the decimal operator object.

상기 제1 부동 소수점 연산기 객체의 템플릿화에서 상기 지수 부분 및 상기 가수 부분의 크기와 관련된 적어도 하나의 객체 상수가 선언된다. In the template of the first floating point operator object, at least one object constant associated with the size of the exponent portion and the mantissa portion is declared.

상기와 같은 본 발명의 목적을 달성하기 위한 본 발명의 또 다른 일면에 따른 부동 소수점 연산을 위한 객체 지향성 프로그래밍 구조에 있어서, 부동 소수점의 지수 부분과 가수 부분의 크기를 기준으로 제1 정밀도가 정해져서 템플릿화된 제1 부동 소수점 연산기 객체; 및 제2 정밀도가 정해진 제2 부동 소수점 연산기 객체를 포함하고, 상기 제1 부동 소수점 연산기 객체 및 상기 제2 부동 소수점 연산기 객체를 포함하는 실행 파일에서 사용자의 선택에 따라 선택적으로 상기 제1 부동 소수점 연산기 객체에 의한 상기 제1 정밀도의 부동 소수점 연산을 수행하거나 상기 제2 부동 소수점 연산기 객체에 의한 상기 제2 정밀도의 부동 소수점 연산을 수행하는 것을 특징으로 한다. In the object-oriented programming structure for floating-point operation according to another aspect of the present invention for achieving the object of the present invention as described above, the first precision is determined based on the size of the exponent part and the mantissa part of the floating point template Digitized first floating point operator object; And a second floating point operator object having a second precision, wherein the first floating point operator is optionally selected by a user in an executable file including the first floating point operator object and the second floating point operator object. And performing the first precision floating point operation by the object or the second precision floating point operation by the second floating point operator object.

이하 첨부 도면들 및 첨부 도면들에 기재된 내용들을 참조하여 본 발명의 바람직한 실시예를 상세하게 설명하지만, 본 발명이 실시예들에 의해 제한되거나 한정되는 것은 아니다. 각 도면에 제시된 동일한 참조부호는 동일한 부재를 나타낸다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings and the contents described in the accompanying drawings, but the present invention is not limited or limited to the embodiments. Like reference numerals in the drawings denote like elements.

도 2는 본 발명의 일실시예에 따른 소프트웨어 부동 소수점 연산기(20)에 대한 객체 다이어그램이다. 상기 부동 소수점 연산기(20)는 객체 지향성 프로그래밍(object oriented programming) 언어에 의하여 도 2와 같은 구조로 실현될 수 있다. 즉, 상기 부동 소수점 연산기(20)는 C++, 또는 JABA 등과 같이 유지 보수가 용이한 고급 언어에 의한 소스 코드로 구현될 수 있다. 2 is an object diagram for a software floating point operator 20 in accordance with one embodiment of the present invention. The floating point operator 20 may be realized in a structure as shown in FIG. 2 by an object oriented programming language. That is, the floating point operator 20 may be implemented as source code by a high-level language that is easy to maintain, such as C ++ or JABA.

상기 부동 소수점 연산기(20)는 여러 응용 분야에서 다양한 정밀도로 부동 소수점 연산이 가능하도록 하기 위한 소프트웨어 연산기이다. 상기 부동 소수점 연 산기(20)는 소프트웨어적인 부동 소수점 연산을 통하여 다양한 정밀도의 부동 소수점 연산이 고속으로 처리되도록 하고 유지 보수도 용이하도록 제안되었다. 본 발명의 일실시예에 따른 상기 부동 소수점 연산기(20)는 특정 응용 프로세서의 하드웨어 부동 소수점 연산기를 설계나 검증하기 위하여 이용될 수도 있다. The floating point operator 20 is a software operator for enabling floating point operations with varying precision in various applications. The floating-point operator 20 has been proposed to allow high-precision floating-point operations to be processed at high speed through software floating-point operations and to facilitate maintenance. The floating point operator 20 according to an embodiment of the present invention may be used to design or verify a hardware floating point operator of a specific application processor.

상기 부동 소수점 연산기(20)는 IEEE 부동 소수점 포맷의 형태로 구성할 수 있는 32 비트 이내의 모든 부동 소수점 연산을 처리할 수 있는 단일 객체들이 생성되도록 구성된다. 상기 부동 소수점 연산기(20)는 최소한 64 비트 정수 연산기를 가지고 있는 32 비트 프로세서에서 동작하는 것을 기본으로 한다. 즉, 상기 부동 소수점 연산기(20)는 32비트 이내에서 임의의 크기로 구성할 수 있는 모든 부동 소수점 연산을 수행할 수 있도록 구성된다. 도 3에 도시된 바와 같이, IEEE 부동 소수점 포맷은 1 비트의 부호(S), e 비트의 지수(E), 및 m비트의 비부호 가수(unsigned significand)(M)로 이루어져 있다. IEEE 표준의 단정도(Single Precision) 연산에서는 부동 소수점이 1 비트의 부호(S), 8비트의 지수(E) 및 23비트의 가수(M)으로 표현된다. IEEE 표준의 배정도(Double Precision) 연산에서는 부동 소수점이 1 비트의 부호(S), 16비트의 지수(E) 및 46비트의 가수(M)으로 표현된다. The floating point operator 20 is configured to generate single objects capable of handling all floating point operations within 32 bits that can be configured in the form of an IEEE floating point format. The floating point operator 20 is based on operating on a 32 bit processor having at least a 64 bit integer operator. That is, the floating point operator 20 is configured to perform all floating point operations that can be configured to any size within 32 bits. As shown in FIG. 3, the IEEE floating point format consists of a 1-bit sign S, an e-bit exponent E, and an m-bit unsigned significand M. In the Single Precision operation of the IEEE standard, a floating point is represented by a 1-bit sign S, an 8-bit exponent E, and a 23-bit mantissa M. In the double precision operation of the IEEE standard, a floating point is represented by a 1-bit sign S, a 16-bit exponent E, and a 46-bit mantissa M.

여기서, 상기 부동 소수점 연산기(20)가 32비트 이내의 부동 소수점 연산을 대상으로 하는 것으로 가정하였으나, 이에 한정되는 것은 아니고 본 발명의 일실시예에 따른 상기 부동 소수점 연산기(20)에 대한 개념의 확장을 통하여 이 분야에서 통상의 지식을 가진 자라면 64비트, 128비트 등 확대된 정밀도에서 다양한 정밀도 로 연산을 수행하도록 구성될 수 있다는 것은 자명하다. Here, although it is assumed that the floating point operator 20 targets a floating point operation within 32 bits, the present invention is not limited thereto and the concept of the floating point operator 20 according to an embodiment of the present invention is extended. It will be apparent to those skilled in the art that the present invention can be configured to perform operations with various precisions at expanded precisions such as 64 bits and 128 bits.

상기 부동 소수점 연산기(20)는 IEEE 표준의 단정도 부동 소수점 연산기 객체 PITFloatIEEE 및 상기 IEEE 표준의 단정도 연산기 객체의 연산 특성 중 일부를 배제한 부동 소수점 연산기 객체 PITFloat를 포함한다. 상기 객체 PITFloatIEEE는 IEEE 표준에서 정하는 단정도 부동 소수점의 모든 연산과 연산기 특성을 지원하는 객체이다. 상기 객체 PITFloat는 상기 IEEE 표준의 단정도 연산기 객체의 연산 특성 중 일부, 예를 들어, 무한대 지원, NaN(Not a Number) 지원, 4가지 반올림 지원, 비정규 부동 소수점 지원 등을 배제하여 상기 객체 PITFloatIEEE보다 낮은 정도의 정밀도로 연산을 수행하는 객체이다. The floating point arithmetic operator 20 includes a single precision floating point arithmetic object PITFloatIEEE of the IEEE standard and a floating point arithmetic object PITFloat excluding some of the operational characteristics of the single precision arithmetic object of the IEEE standard. The object PITFloatIEEE is an object that supports all the operations and operator characteristics of single precision floating point defined by the IEEE standard. The object PITFloat is more than the object PITFloatIEEE by excluding some of the arithmetic characteristics of the IEEE standard single-precision arithmetic object, for example, infinity support, Not a Number (NaN) support, four rounding support, and irregular floating point support. An object that performs operations with low precision.

이와 같이 상기 객체들 PITFloatIEEE 및 PITFloat가 템플릿화(template)되어 실행 파일로 만들어지는 경우에, 사용자의 선택에 따라 선택적으로 상기 객체 PITFloat에 의한 부동 소수점 연산을 수행하거나 상기 객체 PITFloatIEEE에 의한 부동 소수점 연산을 수행할 수 있게 된다. 상기 객체 PITFloatIEEE는 IEEE 표준에서 정하는 모든 연산 특성의 정밀도를 지원하지만, 상기 객체 PITFloat는 템플릿화시에 부동 소수점의 지수 부분과 가수 부분의 크기가 정해짐에 따라 상기 객체 PITFloatIEEE의 정밀도 보다 낮은 해당 정밀도를 지원한다. As such, when the objects PITFloatIEEE and PITFloat are templated into an executable file, a floating point operation by the object PITFloat is selectively performed or a floating point operation by the object PITFloatIEEE is selectively performed according to a user's selection. It can be done. The object PITFloatIEEE supports the precision of all computational characteristics specified in the IEEE standard, but the object PITFloat has a corresponding precision lower than the precision of the object PITFloatIEEE as the size of the exponent part and the mantissa part of the floating point is determined at the time of template formatting. Support.

상기 부동 소수점 연산기(20) 구조의 구체적인 설명을 위하여 도 4의 흐름도가 참조된다.For a detailed description of the structure of the floating point operator 20, reference is made to the flowchart of FIG.

먼저, 상기 부동 소수점 연산기(20)를 C++, JABA등과 같은 객체 지향성 언어로 프로그래밍할 때, 부동 소수점의 지수 부분(도 5의 uiExpsize 참조)과 가수 부 분(도 5의 uiSigsize 참조)의 크기를 기준으로 상기 객체 PITFloat이 템플릿화된다(S41). 상기 지수 부분과 가수 부분의 크기에 따라 상기 객체 PITFloat는 32 비트 이내의 크기에서 임의의 정밀도를 가지는 부동 소수점 연산을 지원할 수 있다. 상기 객체 PITFloatIEEE는 IEEE 표준에서 정하는 모든 연산 특성의 정밀도를 지원하도록 미리 정의되어 있는 객체이므로, 다른 응용 소스로부터 카피되어 상기 객체 PITFloat의 템플릿화와 유사하게 템플릿화됨으로써 사용될 수 있다. 도 2와 같이, 상기 객체 PITFloat의 한 예로써, 부호 1비트, 지수 8비트, 가수 23비트를 포함한 32비트 부동 소수점 연산을 위한 PITFloat<8,23>가 생성될 수 있다. 또한, 상기 객체 PITFloatIEEE의 한 예로써 32비트 부동 소수점 연산을 위한 PITFloatIEEE<8,23>가 생성될 수 있다.First, when programming the floating point operator 20 in an object-oriented language such as C ++, JABA, etc., the size of the floating point exponent part (see uiExpsize in FIG. 5) and the mantissa part (see uiSigsize in FIG. 5) is referred to. The object PITFloat is then templated (S41). According to the size of the exponent part and the mantissa part, the object PITFloat may support floating point operations having arbitrary precision in a size within 32 bits. Since the object PITFloatIEEE is an object predefined to support the precision of all computational characteristics defined in the IEEE standard, it can be used by being copied from another application source and templated similarly to the template of the object PITFloat. As shown in FIG. 2, as an example of the object PITFloat, PITFloat <8,23> for a 32-bit floating point operation including a sign 1 bit, an exponent 8 bits, and a mantissa 23 bit may be generated. In addition, as an example of the object PITFloatIEEE, PITFloatIEEE <8,23> for 32-bit floating point operation may be generated.

또한, 정밀도가 다른 부동 소수점 간의 연산을 지원하기 위하여 상기 객체 PITFloatIEEE와 상기 객체 PITFloat 사이에 어소시에이션(association) 관계에 있는 오퍼레이션들(operations), 예를 들어, 덧셈을 위한Add()(), 뺄셈을 위한 Sub()(), 곱셈을 위한 Mul()(), 나눗셈을 위한 Div()(), 표현 변환을 위한 Conv()() 등에 대한 어소시에이션 관계가 정의된다(S42). 즉, 상기 객체 PITFloatIEEE에 의한 높은 정밀도의 결과값과 상기 객체 PITFloat에서 생성되는 결과값이, 상기 객체 PITFloat에서 어소시에이션으로 정의된 오퍼레이션에 따라 상기 객체 PITFloatIEEE에서 보다는 낮은 상기 객체 PITFloat의 정밀도에 맞는 연산이 수행될 수 있도록 한다. Also, operations in association with the object PITFloatIEEE and the object PITFloat, for example, Add () () for addition, subtraction, to support operations between floating-points with different precisions An association relationship for Sub () (), Mul () () for multiplication, Div () () for division, Conv () () for expression conversion, etc. is defined (S42). That is, an operation that conforms to the precision of the object PITFloat lower than that of the object PITFloatIEEE is performed according to an operation defined by the object PITFloat with a high precision result value and the result value generated by the object PITFloat as an association in the object PITFloat. To be possible.

다양한 정밀도를 지원하고 정밀도가 다른 부동 소수점 간의 상호 연산을 수 행하기 위해서는 각 정밀도의 조합만큼 각 오퍼레이션들을 위한 연산기들이 요구된다. 소프트웨어로 구현될 때, 각 정밀도의 조합만큼 각 오퍼레이션들을 위한 연산기들을 위한 코드들을 개별적으로 작성하는 것이 불가능하지는 않지만, 향후 알고리즘의 개선 시에 모든 연산기들에 대한 코드의 수정 작업을 한다는 것은 쉽지 않은 일이며 소프트웨어의 신뢰성을 떨어뜨릴 수 있다. 따라서, 본 발명에서는 위와 같이 상기 지수 부분과 가수 부분의 크기를 기준으로 상기 객체 PITFloat를 템플릿화하고 상기 객체 PITFloatIEEE와의 어소시에이션 관계를 정의함으로써 각 정밀도의 조합에 따른 연산기들에 대한 객체가 컴파일시에 자동으로 생성되도록 함으로써 다양한 정밀도의 부동 소수점 연산이 고속으로 처리되도록 하고 유지 보수도 용이하도록 하였다(S43). In order to support various precisions and to perform mutual operations between floating points with different precisions, operators for each operation are required for each combination of precisions. When implemented in software, it is not impossible to write the code for the operators for each operation individually by each combination of precisions, but it is not easy to modify the code for all the operators in future algorithmic improvements. This can reduce the reliability of the software. Therefore, in the present invention, the object PITFloat is templated based on the size of the exponent part and the mantissa part as described above, and the association relationship with the object PITFloatIEEE is defined so that the objects for the operators according to the combination of precision are automatically compiled at compile time. By making it to be generated as a floating point operation of various precision to be processed at high speed and easy to maintain (S43).

이와 같은 프로그래밍 구조를 가지는 상기 부동 소수점 연산기(20)에 대한 소스 코드가 컴파일(compile)된 후 실행 파일이 생성될 때, 상기 실행 파일 내의 상기 객체 PITFloat는 위와 같이 정의된 오퍼레이션에 따라 다양한 정밀도의 부동 소수점 연산을 수행할 수 있게 된다. When the executable file is generated after the source code for the floating point operator 20 having such a programming structure is compiled, the object PITFloat in the executable file is floating with various precisions according to the operation defined above. Decimal operation can be performed.

위에서 기술한 바와 같이, 상기 부동 소수점 연산기(20)는 32비트 프로세서를 가지고 있는 시스템에서 동작하도록 설계될 수 있는데, 대부분의 32비트 프로세서를 가지고 있는 시스템은 32비트 부동 소수점 연산기를 하드웨어로 가지고 있다. 따라서, 특정 응용 분야에서 32 비트 부동 소수점 연산을 위하여 본 발명의 일실시예에 따른 상기 PITFloat<8,23> 또는 상기 PITFloatIEEE<8,23>가 이용될 수 있다. 그러나, 32비트 부동 소수점 연산기를 하드웨어로 가지고 있는 시스템에서 상기 부 동 소수점 연산기(20)를 동작 시킬 때에는, 도 2와 같이 객체 상속을 통하여 하드웨어의 고속 처리에 의한 성능 향상이 이루어지도록 하였다(S44). 즉, 상기 PITFloatIEEE<8,23>는 IEEE 표준에 따른 정밀도의 32비트 하드웨어 부동 소수점 연산기를 호출하는 객체 PITSingle에 의하여 상속되고, 상기 PITFloat<8,23>는 상기 하드웨어 연산기 PITSingle보다 정밀도가 낮은 일반적인 32비트 하드웨어 부동 소수점 연산기를 호출하는 객체 PITFloat에 의하여 상속될 수 있다. As described above, the floating point operator 20 can be designed to operate in a system having a 32 bit processor, most systems having a 32 bit processor have a 32 bit floating point operator in hardware. Accordingly, the PITFloat <8,23> or the PITFloatIEEE <8,23> according to an embodiment of the present invention may be used for a 32-bit floating point operation in a specific application. However, when operating the floating-point operator 20 in a system having a 32-bit floating-point operator as hardware, as shown in FIG. 2, the performance is improved by high-speed processing of hardware through object inheritance (S44). . That is, the PITFloatIEEE <8,23> is inherited by an object PITSingle that calls a 32-bit hardware floating-point operator with precision according to the IEEE standard, and the PITFloat <8,23> is a general 32 with lower precision than the hardware operator PITSingle. It can be inherited by the object PITFloat, which invokes a bit hardware floating-point operator.

또한, 본 발명의 또 다른 특징은, 고속의 소프트웨어 부동 소수점 연산을 위한 실행 시간에 다른 동작 부분이 최소화되도록 하기 위하여 컴파일시에 필요한 모든 부분들이 생성될 수 있도록 한다. 대표적인 것이 부동 소수점 연산에 이용되는 각종 상수들인데, 특히 상기 지수 부분과 상기 가수 부분의 크기와 관련된 상수들이 컴파일시에 모두 생성될 수 있도록 하였다. 즉, 도 5와 같이, 상기 객체 PITFloat를 템플릿화 할 때, 상기 지수 부분 및 상기 가수 부분의 크기와 관련된 객체 상수들, 예를 들어, 지수 바이어스(ExponentBias), 지수 마스크(ExponentMask), 지수 최소값(ExponentMin), 지수 최대값(ExponentMax), 바이어스된 지수 최대값(BiasedExponentMax), 특수 지수(SpecialExponent) 등을 선언함으로써, 컴파일시에 해당 상수 목록이 자동적으로 구성되도록 하였다. 예를 들어, 32비트 부동 소수점 연산의 경우에, 도 5에서 지수 크기 uiExpSize는 8비트일 수 있고, 이때, 상기 지수 바이어스(ExponentBias)는 127, 상기 지수 마스크(ExponentMask)는 255, 지수 최소값(ExponentMin)는 -126, 상기 지수 최대값(ExponentMax) 127, 상기 바이어스된 지수 최대값(BiasedExponentMax)은 254, 상 기 특수 지수(SpecialExponent)는 255이다. 이와 같은 객체 상수들은 IEEE 표준에 따라 부동 소수점의 연산을 위하여 필요한 상수들이다. In addition, another feature of the present invention is that all parts necessary at compile time can be generated to minimize other operating parts at run time for fast software floating-point operations. Typical examples are various constants used for floating point operations, in particular constants related to the magnitude of the exponent portion and the mantissa portion can be generated at compile time. That is, as shown in FIG. 5, when the object PITFloat is templated, object constants related to the size of the exponent part and the mantissa part, for example, an exponent bias, an exponent mask, and an exponent minimum value ( ExponentMin), ExponentMax, BiasedExponentMax, and SpecialExponent are declared so that the list of constants is automatically constructed at compile time. For example, in the case of a 32-bit floating point operation, the exponent size uiExpSize in FIG. 5 may be 8 bits, wherein the exponent bias is 127, the exponent mask is 255, and the exponent minimum is ExponentMin. ) Is -126, the exponent maximum (ExponentMax) 127, the biased exponent maximum (BiasedExponentMax) is 254, the special exponent (SpecialExponent) is 255. These object constants are constants necessary for the operation of floating point according to the IEEE standard.

도 5에서는 상기 지수 부분과 관련된 일부 객체 상수들을 예로 들어 설명하였으나, 상기 가수 부분과 관련된 객체 상수들도 같은 방법으로 선언될 수 있다. In FIG. 5, some object constants related to the exponent part have been described as an example, but object constants related to the mantissa part may be declared in the same manner.

이와 같은 객체 상수들은 각 부동 소수점 간의 정밀도에 따라 별도로 계산을 수행하여 미리 소정 데이터베이스에 저장해 놓아야 하지만, 모든 구성을 고려하여 해당 값들을 저장해 놓는 것은 비효율적이다. 따라서, 본 발명에서는 위와 같이 상기 객체 PITFloat의 템플릿화시에 각종 객체 상수들이 선언되도록 함으로써, 정밀도가 바뀌더라도 사용자는 상기 지수 크기의 속성값, 예를 들어, 도 5에서 uiExpSize 및 상기 가수 크기의 속성값, 예를 들어, 도 5에서 uiSigSize 만 변경함으로써 관련 상수들이 자동 생성되도록 하였다. Such object constants must be separately stored in a predetermined database by performing calculation separately according to the precision between each floating point, but it is inefficient to store the corresponding values in consideration of all configurations. Accordingly, in the present invention, the various object constants are declared at the time of template of the object PITFloat as described above, so that even if the precision is changed, the user may specify the attribute value of the exponent size, for example, the attribute of uiExpSize and the mantissa size in FIG. 5. By changing only the value, for example, uiSigSize in FIG. 5, related constants are automatically generated.

상기 부동 소수점 연산기(20)를 동작시키는 시스템에서, 상기 부동 소수점 연산기(20)에 대한 해당 실행 파일의 동작에 따라, 사용자는 연산기 설계 및 검증 등 목적에 맞게 템플릿화된 상기 객체 PITFloatIEEE와 상기 객체 PITFloat 중 어느 하나를 선택하여 사용할 수 있다(S45). 이와 같은 선택은 해당 선택을 위한 코드를 작성함으로써 용이하게 구현될 수 있다. In the system for operating the floating point operator 20, according to the operation of a corresponding executable file for the floating point operator 20, a user may template the object PITFloatIEEE and the object PITFloat which are templated for the purpose of designing and verifying an operator. Any one can be selected and used (S45). Such a selection can be easily implemented by writing code for that selection.

본 명세서에서 개시된 방법 및 장치에서 사용되는 기능은 컴퓨터로 읽을 수 있는 기록 매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록 매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록 매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광데이터 저장장치 등이 있으며 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한, 컴퓨터가 읽을 수 있는 기록 매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The functions used in the methods and apparatus disclosed herein can be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like, and may also be implemented in the form of a carrier wave (for example, transmission over the Internet). do. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. 그러므로, 본 발명의 범위는 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.As described above, although the present invention has been described with reference to limited embodiments and drawings, the present invention is not limited to the above embodiments, and those skilled in the art to which the present invention pertains various modifications and variations from such descriptions. This is possible. Therefore, the scope of the present invention should not be limited to the described embodiments, but should be determined not only by the claims below but also by the equivalents of the claims.

상술한 바와 같이 본 발명에 따른 고속 부동 소수점 연산 방법에서는, IEEE 표준의 단정도(Single Precision) 연산기 객체와 단순한 연산기 객체가 지수 부분과 가수 부분의 크기를 기준으로 템플릿화되어 컴파일시 각 조합의 연산기 객체가 자동으로 생성되도록 소프트웨어적으로 구현되므로, 다양한 정밀도의 부동 소수점 연산을 고속으로 처리할 수 있게 하고, 유지 보수가 용이하다. As described above, in the fast floating-point arithmetic method according to the present invention, a single precision arithmetic object object and a simple arithmetic object object of the IEEE standard are templated based on the size of the exponent part and the mantissa part. The software is implemented so that objects are created automatically, which enables fast processing of various precision floating point operations and ease of maintenance.

또한, 본 발명에 따른 고속 부동 소수점 연산 방법에서는, 템플릿화된 서로 다른 정밀도의 두 개의 객체가 객체 상속되어 고속 하드웨어적인 처리도 가능하게 하므로 부동 소수점 연산의 성능의 향상을 기대할 수 있다.In addition, in the fast floating point arithmetic method according to the present invention, two objects of different precision, which are templated, are inherited to enable high-speed hardware processing, and thus the performance of floating point arithmetic can be expected.

그리고, 본 발명에 따른 고속 부동 소수점 연산 방법에서는, 부동 소수점의 지수 부분과 가수 부분의 크기와 관련된 상수 목록이 정밀도마다 별도로 계산되어 저장되는 것이 아니라, 두 객체들의 템플릿화 시에 선언함으로써 컴파일시에 각 정밀도에 따른 해당 객체 상수들이 생성될 수 있게 하므로, 간편한 코딩 작업으로 다양한 정밀도에 대한 고속 부동 소수점 연산기를 실현할 수 있다. In the fast floating-point arithmetic method according to the present invention, a constant list related to the size of the exponent part and the mantissa part of the floating point is not calculated and stored separately for each precision, but is declared at the time of compilation of the two objects. Corresponding object constants can be generated for each precision, allowing for fast coding of floating point operators with varying precision.

Claims (16)

부동 소수점의 지수 부분과 가수 부분의 크기를 기준으로 정해진 제1 정밀도에 따라 템플릿화된 제1 부동 소수점 연산기 객체를 포함하는 실행 파일을 생성하는 단계; 및Generating an executable file comprising a first floating point operator object templated according to a first precision determined based on the size of the exponent portion and the mantissa portion of the floating point; And 상기 실행 파일을 이용하여 부동 소수점 연산을 수행하는 단계Performing a floating point operation using the executable file 를 포함하고,Including, 상기 제1 부동 소수점 연산기 객체는 제2 정밀도가 정해진 제2 부동 소수점 연산기 객체와 어소시에이션 관계에 있는 적어도 하나의 오퍼레이션을 포함하는 것The first floating point operator object including at least one operation that is in association with a second floating point operator object having a second precision. 을 특징으로 하는 부동 소수점 연산 방법. Floating point operation method characterized in that. 제1항에 있어서, The method of claim 1, 상기 실행 파일을 생성하는 단계는,Generating the executable file, 소스 코드의 컴파일시에 상기 적어도 하나의 오퍼레이션을 수행하는 연산 객체를 생성하는 것Creating an operation object that performs the at least one operation when compiling source code 을 특징으로 하는 부동 소수점 연산 방법.Floating point operation method characterized in that. 제1항에 있어서, The method of claim 1, 상기 제1 부동 소수점 연산기 객체는 상기 제1 정밀도의 하드웨어 연산기를 호출하는 제3 부동 소수점 연산기 객체에 의하여 상속되는 것The first floating point operator object being inherited by a third floating point operator object that invokes the first precision hardware operator. 을 특징으로 하는 부동 소수점 연산 방법.Floating point operation method characterized in that. 제1항에 있어서,The method of claim 1, 상기 제2 부동 소수점 연산기 객체는 상기 제2 정밀도의 하드웨어 연산기를 호출하는 제4 부동 소수점 연산기 객체에 의하여 상속되는 것The second floating point operator object is inherited by a fourth floating point operator object that invokes the second precision hardware operator. 을 특징으로 하는 부동 소수점 연산 방법.Floating point operation method characterized in that. 제1항에 있어서, The method of claim 1, 상기 제1 부동 소수점 연산기 객체는 상기 지수 부분 및 상기 가수 부분의 크기와 관련된 적어도 하나의 객체 상수에 대한 선언을 포함하는 것을 특징으로 하는 부동 소수점 연산 방법. And the first floating point arithmetic object includes a declaration for at least one object constant associated with the magnitude of the exponent portion and the mantissa portion. 부동 소수점 연산을 수행하는 방법에 있어서,In a method for performing floating point operations, 부동 소수점의 지수 부분과 가수 부분의 크기를 기준으로 정해진 제1 정밀도에 따라 템플릿화된 제1 부동 소수점 연산기 객체 및 제2 정밀도가 정해진 제2 부동 소수점 연산기 객체를 포함하는 실행 파일을 생성하는 단계; 및Generating an executable file including a first floating point operator object templated according to a first precision determined based on sizes of the exponent portion and the mantissa portion of the floating point, and a second floating point operator object having a second precision determined; And 사용자의 선택에 따라 선택적으로 상기 제1 부동 소수점 연산기 객체에 의한 상기 제1 정밀도의 부동 소수점 연산을 수행하거나 상기 제2 부동 소수점 연산기 객체에 의한 상기 제2 정밀도의 부동 소수점 연산을 수행하는 단계Selectively performing the first precision floating point operation by the first floating point operator object or the second precision floating point operation by the second floating point operator object according to a user's selection 를 포함하는 것을 특징으로 하는 부동 소수점 연산 방법.Floating point arithmetic method comprising a. 제6항에 있어서, The method of claim 6, 상기 제1 부동 소수점 연산기 객체는 상기 제2 부동 소수점 연산기 객체와 어소시에이션 관계에 있는 적어도 하나의 오퍼레이션을 포함하는 것The first floating point operator object comprises at least one operation that is in association with the second floating point operator object. 을 특징으로 하는 부동 소수점 연산 방법. Floating point operation method characterized in that. 제6항에 있어서, The method of claim 6, 상기 제1 정밀도는 상기 제2 정밀도보다 낮은 것을 특징으로 하는 부동 소수점 연산 방법.And said first precision is lower than said second precision. 제6항에 있어서, The method of claim 6, 상기 제2정밀도는 IEEE 표준의 단정도(Single Precision)이고, 상기 제1 정밀도는 상기 IEEE 표준의 단정도의 연산 특성 중 일부를 배제한 정밀도인 것The second precision is a single precision of the IEEE standard, and the first precision is a precision excluding some of the single-precision arithmetic characteristics of the IEEE standard. 을 특징으로 하는 부동 소수점 연산 방법.Floating point operation method characterized in that. 제6항에 있어서, The method of claim 6, 상기 실행 파일을 생성하는 단계는,Generating the executable file, 소스 코드의 컴파일시에 상기 제1 부동 소수점 연산기 객체와 상기 제2 부동 소수점 연산기 객체 간의 조합에 따른 적어도 하나의 오퍼레이션에 대한 연산 객체를 생성하는 것Generating a calculation object for at least one operation according to a combination between the first floating point operator object and the second floating point operator object at compile time of the source code. 을 특징으로 하는 부동 소수점 연산 방법.Floating point operation method characterized in that. 제6항에 있어서, The method of claim 6, 상기 제1 부동 소수점 연산기 객체는 상기 제1 정밀도의 하드웨어 연산기를 호출하는 제3 부동 소수점 연산기 객체에 의하여 상속되는 것The first floating point operator object being inherited by a third floating point operator object that invokes the first precision hardware operator. 을 특징으로 하는 부동 소수점 연산 방법.Floating point operation method characterized in that. 제6항에 있어서, The method of claim 6, 상기 제2 부동 소수점 연산기 객체는 상기 제2 정밀도의 하드웨어 연산기를 호출하는 제4 부동 소수점 연산기 객체에 의하여 상속되는 것The second floating point operator object is inherited by a fourth floating point operator object that invokes the second precision hardware operator. 을 특징으로 하는 부동 소수점 연산 방법.Floating point operation method characterized in that. 제6항에 있어서, The method of claim 6, 상기 제1 부동 소수점 연산기 객체는 상기 지수 부분 및 상기 가수 부분의 크기와 관련된 적어도 하나의 객체 상수에 대한 선언을 포함하는 것The first floating point operator object including a declaration for at least one object constant associated with the magnitude of the exponent portion and the mantissa portion 을 특징으로 하는 부동 소수점 연산 방법. Floating point operation method characterized in that. 제 1항 내지 제 13항 중 어느 한 항의 방법을 실행하기 위한 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터에서 판독 가능한 기록매체.A computer-readable recording medium in which a program for executing the method of any one of claims 1 to 13 is recorded. 부동 소수점 연산을 위한 객체 지향성 프로그래밍 구조에 있어서,In the object-oriented programming structure for floating point operations, 부동 소수점의 지수 부분과 가수 부분의 크기를 기준으로 제1 정밀도가 정해져서 템플릿화된 제1 부동 소수점 연산기 객체; 및A first floating point arithmetic object templated with a first precision determined based on sizes of the exponent part and the mantissa part of the floating point; And 제2 정밀도가 정해진 제2 부동 소수점 연산기 객체Second floating-point arithmetic object with second precision 를 포함하고,Including, 상기 제1 부동 소수점 연산기 객체 및 상기 제2 부동 소수점 연산기 객체를 포함하는 실행 파일에서 사용자의 선택에 따라 선택적으로 상기 제1 부동 소수점 연산기 객체에 의한 상기 제1 정밀도의 부동 소수점 연산을 수행하거나 상기 제2 부동 소수점 연산기 객체에 의한 상기 제2 정밀도의 부동 소수점 연산을 수행하는 것Selectively executing the first precision floating point operation by the first floating point operator object in the executable file including the first floating point operator object and the second floating point operator object, or Performing said second precision floating point operation by a floating point operator object 을 특징으로 하는 부동 소수점 연산을 위한 객체 지향성 프로그래밍 구조.An object-oriented programming architecture for floating point arithmetic. 제15항에 있어서, The method of claim 15, 상기 제2 부동 소수점 연산기 객체는 IEEE 표준의 단정도 연산기 객체이고, The second floating point operator object is a single precision operator object of the IEEE standard, 상기 제1 부동 소수점 연산기 객체는 상기 IEEE 표준의 단정도 연산기 객체의 연산 특성 중 일부를 배제한 연산기 객체인 것The first floating point arithmetic object is an arithmetic object excluding some of the arithmetic characteristics of the IEEE precision single precision arithmetic object. 을 특징으로 하는 부동 소수점 연산을 위한 객체 지향성 프로그래밍 구조.An object-oriented programming architecture for floating point arithmetic.
KR1020060081218A 2006-08-25 2006-08-25 Method, Programming Structure and Recordable Medium for Performing Fast Floating Point Operation for Various Precisions KR100887327B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060081218A KR100887327B1 (en) 2006-08-25 2006-08-25 Method, Programming Structure and Recordable Medium for Performing Fast Floating Point Operation for Various Precisions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060081218A KR100887327B1 (en) 2006-08-25 2006-08-25 Method, Programming Structure and Recordable Medium for Performing Fast Floating Point Operation for Various Precisions

Publications (2)

Publication Number Publication Date
KR20080018692A true KR20080018692A (en) 2008-02-28
KR100887327B1 KR100887327B1 (en) 2009-03-05

Family

ID=39385681

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060081218A KR100887327B1 (en) 2006-08-25 2006-08-25 Method, Programming Structure and Recordable Medium for Performing Fast Floating Point Operation for Various Precisions

Country Status (1)

Country Link
KR (1) KR100887327B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170002481A (en) * 2014-05-08 2017-01-06 마이크로 모우션, 인코포레이티드 Method for performing failsafe calculations
CN111666077A (en) * 2020-04-13 2020-09-15 北京百度网讯科技有限公司 Operator processing method and device, electronic equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102276910B1 (en) 2015-01-06 2021-07-13 삼성전자주식회사 Tessellation apparatus and tessellation method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5796644A (en) * 1996-11-18 1998-08-18 Samsung Electronics Company, Ltd. Floating-point multiply-and-accumulate unit with classes for alignment and normalization
JP4086459B2 (en) * 2000-11-13 2008-05-14 Necエレクトロニクス株式会社 Fixed-point data generation method and fixed-point data generation circuit
US6988119B2 (en) 2001-06-29 2006-01-17 Intel Corporation Fast single precision floating point accumulator using base 32 system
US7299170B2 (en) 2003-06-28 2007-11-20 Transitive Limited Method and apparatus for the emulation of high precision floating point instructions

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170002481A (en) * 2014-05-08 2017-01-06 마이크로 모우션, 인코포레이티드 Method for performing failsafe calculations
CN111666077A (en) * 2020-04-13 2020-09-15 北京百度网讯科技有限公司 Operator processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
KR100887327B1 (en) 2009-03-05

Similar Documents

Publication Publication Date Title
KR102447636B1 (en) Apparatus and method for performing arithmetic operations for accumulating floating point numbers
US9916130B2 (en) Apparatus and method for vector processing
Klatte et al. C-XSC: A C++ class library for extended scientific computing
US11347511B2 (en) Floating-point scaling operation
Whitehead et al. Precision & performance: Floating point and IEEE 754 compliance for NVIDIA GPUs
US7945607B2 (en) Data processing apparatus and method for converting a number between fixed-point and floating-point representations
US8799344B2 (en) Comparator unit for comparing values of floating point operands
US8745111B2 (en) Methods and apparatuses for converting floating point representations
US20150154011A1 (en) Transplantation Method and Source-to-Source Compiler
US5995991A (en) Floating point architecture with tagged operands
JP4157016B2 (en) Compiler apparatus and compiling method
US10095475B2 (en) Decimal and binary floating point rounding
US7395297B2 (en) Floating point system that represents status flag information within a floating point operand
JP2006154979A (en) Floating point number arithmetic circuit
Murillo et al. Comparing different decodings for posit arithmetic
KR100887327B1 (en) Method, Programming Structure and Recordable Medium for Performing Fast Floating Point Operation for Various Precisions
US10310809B2 (en) Apparatus and method for supporting a conversion instruction
Jeannerod et al. Simultaneous floating-point sine and cosine for VLIW integer processors
Bertin et al. A floating-point library for integer processors
US8185723B2 (en) Method and apparatus to extract integer and fractional components from floating-point data
Ray Fortran 2018 with parallel programming
Lefèvre SIPE: Small integer plus exponent
Egner et al. Cleaning up the tower: Numbers in Scheme
Kusswurm et al. Armv8-32 Floating-Point Architecture
Ertl Integer Division by Multiplying with the Double-Width Reciprocal

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130221

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20140203

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20150129

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20180129

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20200128

Year of fee payment: 12