Perl | Math::BigInt->binf() method Last Updated : 03 Oct, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report Math::BigInt module in Perl provides objects that represent integers with arbitrary precision and overloaded arithmetical operators. binf() method of Math::BigInt module is used to create a new object with value infinity and if used on an existing object, it sets it to infinity. Syntax: Math::BigInt->binf() Parameter: plus or minus: to set the sign of infinity as '+' or '-' Returns: object with value inf Example 1: perl #!/usr/bin/perl # Import Math::BigInt module use Math::BigInt; # Create a BigInt object $x = Math::BigInt->binf(); # Object created with binf() print("$x\n"); # Create a BigInt object $x = Math::BigInt->binf('-'); # Object created with binf() print("$x"); Output: inf -inf Example 2: perl #!/usr/bin/perl # Import Math::BigInt module use Math::BigInt; # Specify number $num = 78215936043546; # Create BigInt object $x = Math::BigInt->new($num); # Object before function call print("Before function call: $x\n"); # Calling the function $x->binf(); # Object after function call print("After function call: $x"); Output: Before function call: 78215936043546 After function call: inf Example 3: perl #!/usr/bin/perl # Import Math::BigInt module use Math::BigInt; # Specify number $num = 78215936043546; # Create BigInt object $x = Math::BigInt->new($num); # Object before function call print("Before function call: $x\n"); # Calling the function with '-' sign $x->binf('-'); # Object after function call print("After function call: $x"); Output: Before function call: 78215936043546 After function call: -inf Comment More infoAdvertise with us Next Article Perl | Math::BigInt->brsft() method C Code_Mech Follow Improve Article Tags : Perl Perl-method Perl-Math-Functions Similar Reads Perl | Math::BigInt->from_bin() method Math::BigInt module in Perl provides objects that represent integers with arbitrary precision and overloaded arithmetical operators.from_bin() method of Math::BigInt module is used to convert the binary number passed as input to its corresponding decimal number. Syntax: Math::BigInt->from_bin()Pa 1 min read Perl | Math::BigInt->bneg() method Math::BigInt module in Perl provides objects that represent integers with arbitrary precision and overloaded arithmetical operators. bneg() method of Math::BigInt module is used to change the value of input to its negative value and does nothing for zero or NAN values Syntax: Math::BigInt->bneg() 1 min read Perl | Math::BigInt->bone() method Math::BigInt module in Perl provides objects that represent integers with arbitrary precision and overloaded arithmetical operators. bone() method of Math::BigInt module is used to create a new object with value one and if used on an existing object, it sets it to one. Syntax: Math::BigInt->bone( 2 min read Perl | Math::BigInt->bnan() method Math::BigInt module in Perl provides objects that represent integers with arbitrary precision and overloaded arithmetical operators. bnan() method of Math::BigInt module is used to create a new object with value NAN and if used on an existing object, it converts it to NAN. Syntax: Math::BigInt->b 1 min read Perl | Math::BigInt->brsft() method Math::BigInt module in Perl provides objects that represent integers with arbitrary precision and overloaded arithmetical operators.brsft() method of Math::BigInt module is used to right shift the given value by a base given as parameter. Syntax: Math::BigInt->brsft()Parameter: $y- number of time 1 min read Perl | Math::BigInt->config() method Math::BigInt module in Perl provides objects that represent integers with arbitrary precision and overloaded arithmetical operators. config() method of Math::BigInt module is used to get the information about the configuration of the Perl module. Syntax: Math::BigInt->config() Parameter: None Ret 1 min read Like