Skip to Content
Former Member
Aug 27, 2013 at 07:29 AM

MOD operation fail for large numbers


Hi ,

I have 2 large float numbers. I want to perform mathematical mod operation on these 2 numbers but i keep getting a blank value.

Is this because SAP Abap does not handle these large numbers? I used float data type because I figured this data type would be the best to handle large numbers.

data: lv_n type f,

lv_temp type f,

result type f.

lv_temp = 1.1417981541647679E+46.

lv_n = 2.7730000000000000E+03.

RESULT = lv_temp mod lv_n.

Value of variable RESULT should be 1278 or 1.2780000000000000E+03. I keep getting a blank on this statement. (this is the actual mathematical statement that I am trying to achieve via ABAP , 512^17 mod 2773).

Does anyone know why this is happening or if I am doing something wrong or just that SAP ABAP doesn't handle large numbers?