# US 2019/0171419 A1 · Arithmetic processing device and control method of arithmetic processing device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0171419 A1
- Document ID: US20190171419A1
- Status: Published application
- Kind: A1
- Application number: 16/190,478
- Filed: 2018-11-14
- Published: 2019-06-06
- Earliest claimed: 2017-12-06
- Assignees: Fujitsu Limited
- Applicants: Fujitsu Limited
- Inventors: Ryo TAKATA; Takeshi Osonoi; HIROYUKI WADA
- Web page: https://patentgrep.com/patent/US20190171419A1

## CPC

- G06F 7/556: Logarithmic or exponential functions
- G06F 5/01: for shifting, e.g. justifying, scaling, normalising {(digital stores in which the information is moved stepwise, e.g. shift-registers G11C19/00; digital stores in which the information circulates G11C21/00)}
- G06F 7/544: for evaluating functions by calculation {(G06F7/4824 takes precedence)}
- G06F 7/5446: {using crossaddition algorithms, e.g. CORDIC}
- G06N 3/045: Combinations of networks
- G06N 3/048: Activation functions
- G06N 3/063: using electronic means
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

An arithmetic processing device includes a processor that calculates a constant multiplication value by multiplying a constant value obtained by dividing a first value by a natural logarithm of 2 and a data value, separates the constant multiplication value into an integer portion and a fractional portion, calculates a fractional power value corresponding to a value of the fractional portion, calculates an integer power value corresponding to a value obtained by multiplying a value of the integer portion by a second value, calculates a power addition value by adding the fractional power value and the integer power value, calculate a power subtraction value by subtracting the integer power value from the fractional power value, and calculate a division value by dividing the power subtraction value by the power addition value as a result of an execution of an arithmetic operation of a hyperbolic tangent function with the data value.

## Claims

### Claim 1

An arithmetic processing device comprising:
a memory; and
a processor coupled to the memory and the processor configured to:
calculate a constant multiplication value by multiplying a constant value obtained by dividing a first value by a natural logarithm of 2 and a data value stored in the memory;
separate the constant multiplication value into an integer portion and a fractional portion;
calculate a fractional power value expressed as a power of 2 having a value of the fractional portion of the constant multiplication value as an exponent;
calculate an integer power value expressed as a power of 2 having a value obtained by multiplying a value of the integer portion of the constant multiplication value by a second value as an exponent;
calculate a power addition value by adding the fractional power value and the integer power value;
calculate a power subtraction value by subtracting the integer power value from the fractional power value; and
calculate a division value by dividing the power subtraction value by the power addition value as a result of an execution of an arithmetic operation of a hyperbolic tangent function with the data value.

### Claim 2 (depends on 1)

The arithmetic processing device according to claim 1, wherein the first value is “2”.

### Claim 3 (depends on 1)

The arithmetic processing device according to claim 1, wherein the second value is “−1”.

### Claim 4 (depends on 1)

The arithmetic processing device according to claim 1, wherein the processor is further configured to:
set an absolute value of the data value to the data value that is multiplied by the constant value;
reflect a sign of the data value in the result of the execution of the arithmetic operation of the hyperbolic tangent function with the absolute value; and
output a reflection result as the result of the execution of the arithmetic operation of the hyperbolic tangent function with the data value to the memory.

### Claim 5 (depends on 4)

The arithmetic processing device according to claim 4, wherein the processor is further configured to:
set the result of the execution of the arithmetic operation of the hyperbolic tangent function with the absolute value to a third value when the absolute value is equal to or greater than a predetermined value; and
set the result of the execution of the arithmetic operation of the hyperbolic tangent function with the absolute value to the division value when the absolute value is less than the predetermined value.

### Claim 6 (depends on 5)

The arithmetic processing device according to claim 5, wherein the third value is “1”.

### Claim 7 (depends on 1)

The arithmetic processing device according to claim 1, wherein the processor is further configured to:
shift and normalize the power addition value which is expressed by a predetermined number of bits;
divide the power subtraction value by a normalized power addition value; and
calculate the division value by correcting a result of the division based on a shift amount by the normalization.

### Claim 8 (depends on 7)

The arithmetic processing device according to claim 7, wherein the processor is configured to shift the power addition value by the shift amount that keeps a divisor of the division within a predetermined range.

### Claim 9 (depends on 1)

The arithmetic processing device according to claim 1, wherein the processor is further configured to select either the second value or a third value according to a sign of the data value regardless of the division value as the result of the execution of the arithmetic operation of the hyperbolic tangent function with the data value when an absolute value of the data value is equal to or greater than a predetermined value.

### Claim 10 (depends on 9)

The arithmetic processing device according to claim 9, wherein the second value is “−1” and the third value is “1”.

### Claim 11

A control method of an arithmetic processing device comprising:
calculating, by a computer, a constant multiplication value by multiplying a constant value obtained by dividing a first value by a natural logarithm of 2 and a data value stored in a memory;
separating the constant multiplication value into an integer portion and a fractional portion;
calculating a fractional power value expressed as a power of 2 having a value of the fractional portion of the constant multiplication value as an exponent;
calculating an integer power value expressed as a power of 2 having a value obtained by multiplying a value of the integer portion of the constant multiplication value by a second value as an exponent;
calculating a power addition value by adding the fractional power value and the integer power value;
calculating a power subtraction value by subtracting the integer power value from the fractional power value; and
calculating a division value by dividing the power subtraction value by the power addition value as a result of an execution of an arithmetic operation of a hyperbolic tangent function with the data value.

### Claim 12 (depends on 11)

The control method according to claim 11, wherein the first value is “2”.

### Claim 13 (depends on 11)

The control method according to claim 11, wherein the second value is “−1”.

### Claim 14 (depends on 11)

The control method according to claim 11, wherein further comprising:
setting an absolute value of the data value to the data value that is multiplied by the constant value;
reflecting a sign of the data value in the result of the execution of the arithmetic operation of the hyperbolic tangent function with the absolute value; and
outputting a reflection result as the result of the execution of the arithmetic operation of the hyperbolic tangent function with the data value to the memory.

### Claim 15 (depends on 14)

The control method according to claim 14, wherein further comprising:
setting the result of the execution of the arithmetic operation of the hyperbolic tangent function with the absolute value to a third value when the absolute value is equal to or greater than a predetermined value; and
setting the result of the execution of the arithmetic operation of the hyperbolic tangent function with the absolute value to the division value when the absolute value is less than the predetermined value.

### Claim 16 (depends on 15)

The control method according to claim 15, wherein the third value is “1”.

### Claim 17 (depends on 11)

The control method according to claim 11, further comprising:
shifting and normalizing the power addition value which is expressed by a predetermined number of bits;
dividing the power subtraction value by a normalized power addition value; and
calculating the division value by correcting a result of the division based on a shift amount by the normalization.

### Claim 18 (depends on 17)

The control method according to claim 17, wherein the power addition value is shifted by the shift amount that keeps a divisor of the division within a predetermined range.

### Claim 19 (depends on 11)

The control method according to claim 11, further comprising:
selecting either the second value or a third value according to a sign of the data value regardless of the division value as the result of the execution of the arithmetic operation of the hyperbolic tangent function with the data value when an absolute value of the data value is equal to or greater than a predetermined value.

### Claim 20 (depends on 19)

The control method according to claim 19, wherein the second value is “−1” and the third value is “1”.
