Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

TYPE F

Former Member
0 Likes
928

Q]] The correct length of bytes , which a type F field can have is 8 , --this is also the valiud length. Then how is it possible for these fields to hold values as large as

[ (10)*(-307) TO (10)* 308]

Q]],Why is it that the syntax

NUMBER TYPE RF VALUE ‘4.3’

Gives an output

4.30000000000000 E +00

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
901

hi

good

Floating point numbers - type F

The value range of type F numbers is 1x10*-307 to 1x10*308 for positive and negative numbers, including 0 (zero). The accuracy range is approximately 15 decimals, depending on the floating point arithmetic of the hardware platform. Since type F data is internally converted to a binary system, rounding errors can occur. Although the ABAP processor tries to minimize these effects, you should not use type F data if high accuracy is required. Instead, use type P data.

You use type F fields when you need to cope with very large value ranges and rounding errors are not critical.

Using I and F fields for calculations is quicker than using P fields. Arithmetic operations using I and F fields are very similar to the actual machine code operations, while P fields require more support from the software. Nevertheless, you have to use type P data to meet accuracy or value range requirements.

thanks

mrutyun^

Q]] The correct length of bytes , which a type F field can have is 8 , --this is also the valiud length. Then how is it possible for these fields to hold values as large as

[ (10)*(-307) TO (10)* 308]

Q]],Why is it that the syntax

NUMBER TYPE RF VALUE ‘4.3’

Gives an output

4.30000000000000 E +00

4 REPLIES 4
Read only

kiran_k8
Active Contributor
0 Likes
901

Hi,

Type in SDN Search column as 'Ankita Patel Type F' you will be able to get the thread which was answered well by SDN experts.

K.Kiran.

Read only

Former Member
0 Likes
901

not getting kiran

Read only

0 Likes
901

Hi ..

Type F field will use 8 bytes . But is is not a Character field which takes one byte per character.

Type F fields will store the Value in Exponent and Mantissa Format. So that it can accommodate a large range of Values.

Hope u got it.

<b>reward if Helpful.</b>

Read only

Former Member
0 Likes
902

hi

good

Floating point numbers - type F

The value range of type F numbers is 1x10*-307 to 1x10*308 for positive and negative numbers, including 0 (zero). The accuracy range is approximately 15 decimals, depending on the floating point arithmetic of the hardware platform. Since type F data is internally converted to a binary system, rounding errors can occur. Although the ABAP processor tries to minimize these effects, you should not use type F data if high accuracy is required. Instead, use type P data.

You use type F fields when you need to cope with very large value ranges and rounding errors are not critical.

Using I and F fields for calculations is quicker than using P fields. Arithmetic operations using I and F fields are very similar to the actual machine code operations, while P fields require more support from the software. Nevertheless, you have to use type P data to meet accuracy or value range requirements.

thanks

mrutyun^