Hi,
I want to get a negative value of a decimal field.
MY input is 1112223334567822.22
I want output as - 1112223334567822.22
For this i gave output as -1*input
but i am getting output as -1112223334567822.24 instead of -1112223334567822.22
When i am using NEG function i am facing same problem
Please help me
Thanks for ur help
Regards
Swathi S
Getting negative value of decimal field
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 48
- Joined: Fri Feb 29, 2008 1:09 am
- Location: Bangalore
Getting negative value of decimal field
Thanks&Regards
S.Swathi
S.Swathi
-
- Participant
- Posts: 47
- Joined: Mon May 07, 2007 10:35 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What is the data type of the input field and of the output field? Search DSXchange for discussion of how/why floating point numbers can not be stored to full accuracy in computers.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.