Supercharge Your Innovation With Domain-Expert AI Agents!

Floating-point number processing method, apparatus and device, and computer readable storage medium

A processing method and floating-point number technology, applied in the computer field, can solve problems such as error-prone, time-consuming, and low-efficiency, and achieve the effect of improving accuracy and efficiency

Inactive Publication Date: 2019-11-08
龙芯中科(合肥)技术有限公司
View PDF3 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The present invention provides a floating-point number processing method, device, equipment, and computer-readable storage medium, which are used to solve the problem of obtaining floating-point decimal data in the prior art. It needs to be manually or programmed by technicians, starting from the binary format of floating-point numbers. Extract the values ​​of the sign bit, exponent field, and mantissa field from the data, and then complete the above-mentioned complex calculation process, which is very error-prone, takes a long time, and is very inefficient.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Floating-point number processing method, apparatus and device, and computer readable storage medium
  • Floating-point number processing method, apparatus and device, and computer readable storage medium
  • Floating-point number processing method, apparatus and device, and computer readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0036] figure 2 It is a flow chart of the floating-point number processing method provided by Embodiment 1 of the present invention. The embodiment of the present invention is aimed at the method for obtaining floating-point decimal data in the prior art. It is necessary for a technician to extract the values ​​of the sign bit, the exponent field and the mantissa field from the binary data of the floating-point number manually or through programming, and then complete the above-mentioned For the more complex calculation process, which is very error-prone, time-consuming, and inefficient, a floating-point number processing method is provided.

[0037] The method in this embodiment is applied to a central processing unit, which may be a microprocessor or the like.

[0038] like figure 2 As shown, the specific steps of the method are as follows:

[0039] Step S101 , according to the floating-point type of the floating-point number, determine a community variable correspondin...

Embodiment 2

[0061] image 3 It is a flow chart of the floating-point number processing method provided by Embodiment 2 of the present invention. On the basis of the first embodiment above, in this embodiment, community variables corresponding to each floating-point type may be created in advance. like image 3 As shown, the specific steps of the method are as follows:

[0062] Step S201, creating community variables corresponding to each floating point type.

[0063] Floating-point numbers can be a single-precision floating-point number type, a double-precision floating-point number type, or a floating-point vector type. Among them, the floating-point vector is a sequence of N single-precision floating-point numbers, where N is a positive integer, and N is greater than or equal to 2.

[0064] In this embodiment, community variables corresponding to each floating-point type can be created in advance. The community variable includes a floating-point member variable and an integer member...

Embodiment 3

[0107] Figure 4 It is a schematic structural diagram of a floating-point number processing device provided by Embodiment 3 of the present invention. The floating-point number processing device provided in the embodiment of the present invention can execute the processing flow provided in the embodiment of the floating-point number processing method. like Figure 4 As shown, the floating-point number processing device 30 includes: a community processing module 301 , an assignment module 302 and a printing module 303 .

[0108] Specifically, the community processing module 301 is configured to determine a community variable corresponding to the floating-point type according to the floating-point type of the floating-point number, and the community variable includes a floating-point member variable and an integer member variable.

[0109] Assignment module 302, configured to assign the binary data of the floating point number to the integer member variable of the community var...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a floating-point number processing method, apparatus and device, and a computer readable storage medium. The floating-point number processing method comprises the following steps: assigning binary data of a floating-point number to an integer type member variable of a common variable; due to the fact that a plurality of member variables in the common variables share the memory address space, after the binary data of the floating-point number is assigned to the integer type member variables of the common variables, storing the binary data of the floating-point number in the memory address space pointed by the floating-point type member variables of the common variables; and obtaining decimal data of the floating-point number by printing the floating-point type membervariable of the community variable. The technicians do not need to express formats according to a binary scientific counting method of floating-point numbers specified by the IEEE754 standard. The complex process of analyzing the binary data of the floating-point number into the corresponding decimal data is achieved through manual calculation or programming, and the accuracy and efficiency of obtaining the decimal data corresponding to the binary data of the floating-point number are improved.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a floating-point number processing method, device, equipment and computer-readable storage medium. Background technique [0002] At present, on microprocessors with different architectures, all types of data are stored in binary data in memory and registers, that is, they are all represented as a sequence of 0 and 1. According to different data types, the computer adopts the analysis method corresponding to the data type to analyze the binary data to obtain the corresponding decimal representation. [0003] The IEEE Binary Floating-Point Arithmetic Standard (Institute of Electrical and Electronics Engineers 754, referred to as the IEEE754 standard) stipulates that for a single-precision floating-point number, the memory corresponding to the single-precision floating-point number is divided into a sign bit, an exponent field, and a mantissa field to store binary numbers....

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F7/57G06F7/483
CPCG06F7/483G06F7/57
Inventor 程洋洋张利霞乔鹏程
Owner 龙芯中科(合肥)技术有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More