Question: Input
 when A, B, C are this:
 A = 27.629999
 B = 29.709202
 C = -0.070

```
 Then output need to be:
 **it should not print anything as 27(=A) matches with {B+ (B*C)} =27 or 
(val2+ val3)= 27

```

below is the code I've use abs to take the integer value before decimal but it's taking full integer like 27.8978 instead of 27

```
#!/tools/xgs/perl/5.8.5/bin/perl -w
#!/usr/bin/perl

    use strict;
    use warnings;

          my $val1 = abs($A) ;
          my $val2 = $B ;
          my $val3 = $val2 * ($C) ;
          my $val4 = abs ($val2 + $val3) ;

          if ($val1 ne $val4)
   {
        print " $val1 not equal to $val4\n";
    }

******************************
 Input
 when A, B, C are this:
 A = 27.629999
 B =  29.709202
 C = -0.070

 Then output need to be:
 **it should not print anything as 27(=A) matches with {B+ (B*C)} =27 or 
(val2+ val3)= 27

 Mean to say while comparing it should consider the integer before decimal.

 when A,B,C are this:
 A= 27.56
 B= 25.678
 C= 0

 output in this case:
 A (27) is not matching with {B+(B*C)} = 25+(25*0) =25

```

Answer: 
You are using the wrong function `abs()` doesn't do what you think it does. `abs()` converts a negative number to a positive one. you need `int()` to remove the part of the number after the decimal point.
You have been using [`abs()`](https://perldoc.pl/functions/abs).

> 
> **abs VALUE**
> 
> 
> **abs**
> 
> 
> Returns the absolute value of its argument. If VALUE is omitted, uses `$_`.
> 
> 
> 

`abs()` basically removes the minus sign from a number. Pass it -27.8978 and it will return 27.8978. Pass it 27.8978 and it will give you the same value back. It does nothing to change the size of the number.

It sounds like you want [`int()`](https://perldoc.pl/functions/int).

> 
> **int EXPR**
> 
> 
> **int**
> 
> 
> Returns the integer portion of EXPR. If EXPR is omitted, uses $\_
> 
> 
> 

I think you're confused by definitions. You say:

> 
> I've use abs to take the integer value before decimal but it's taking full integer like 27.8978 instead of 27
> 
> 
> 

An integer is a *whole number*. It is *just* the portion of the number that comes before the decimal point. 27.8978 is *not* a "full integer", it is a floating point number (also known as a real number).