Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9155

Re: Limiting weight values to be transferred to target system

$
0
0

Assuming input will never have negative value, to differentiate between inputs 123,000 and 123, logic can be modified as:

if input > 1000.

     output = input / 1000.

     if frac( output ) eq 0.

          output = -1 * ( output + 0.001 ).

     endif.         

endif.

 

Reverse case can be:

if frac( output ) > 0 OR output < 0.

     input = ( -1 * output - 0.001 ) * 1000.

endif.


Viewing all articles
Browse latest Browse all 9155

Trending Articles