主权项 |
1. An encoding apparatus comprising:
a data value storage unit configured to store a data value, the data value being a floating-point value represented using an exponent value and a mantissa value, and being a value intended to be encoded; a data related value storage unit configured to store a data related value, the data related value being a floating-point value used for encoding the data value stored in the data value storage unit; an adjusted mantissa value generating unit configured to generate an adjusted mantissa value by adjusting a mantissa value of the data related value based on a difference between an exponent value of the data related value stored in the data related value storage unit and the exponent value of the data value stored in the data value storage unit; an encoding target value generating unit configured to generate a specific exponent value based on the exponent value of the data value stored in the data value storage unit, generate a specific mantissa value based on the mantissa value of the data value and the adjusted mantissa value generated by the adjusted mantissa value generating unit, and generate an encoding target value based on the specific exponent value and the specific mantissa value, the encoding target value being a floating-point value and being a value to be encoded; and a data encoded value generating unit configured to generate a data encoded value by encoding the encoding target value generated by the encoding target value generating unit, wherein the adjusted mantissa value generating unit is configured to add additional digits as most significant digits to a mantissa part that represents the mantissa value of the data related value by one or more digits, and in a case where the exponent value of the data related value is less than or equal to the exponent value of the data value, the adjusted mantissa value generating unit is configured to shift the mantissa value of the data related value to a least significant side by a number of digits corresponding to an exponent value difference between the exponent value of the data related value and the exponent value of the data value, and in a case where the exponent value of the data related value is greater than the exponent value of the data value and where the exponent value difference is less than or equal to a number of the additional digits, the adjusted mantissa value generating unit is configured to shift the mantissa value of the data related value to a most significant side by the number of digits corresponding to the exponent value difference, and in a case where the exponent value of the data related value is greater than the exponent value of the data value and where the exponent value difference is greater than the number of the additional digits, the adjusted mantissa value generating unit is configured to set a dummy value in the mantissa part of the data related value. |