Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.4K+ articles
Python
19.6K+ articles
Experiences
15.8K+ articles
Interview Experiences
14.5K+ articles
School Learning
11.1K+ articles
Java
9.4K+ articles
Java-Functions
4.2K+ articles
java-guava
153+ articles
Guava-Functions
71+ articles
Guava-LongMath
14 posts
Recent Articles
Java Guava | LongMath.checkedPow(long b, int k) method with Examples
Last Updated: 11 July 2025
checkedPow(long b, long k) is a method of Guava's LongMath Class which accepts two parameters b and k and is used to find the k-th power of b. Syntax:public static long ch...
read more
Java
java-guava
Guava-Functions
Guava-LongMath
Java Guava | LongMath.divide(long, long, RoundingMode) method with Examples
Last Updated: 11 July 2025
The divide(long p, long q, RoundingMode mode) method of Guava's LongMath Class accepts three parameters and calculates the result of dividing first parameter by second par...
read more
Java
java-guava
Guava-Functions
Guava-LongMath
Java Guava | LongMath.checkedMultiply(int a, int b) method with Examples
Last Updated: 11 July 2025
The checkedMultiply(long a, long b) is a method of Guava's LongMath Class which accepts two parameters a and b, and returns their product.Syntax:public static long checked...
read more
Java
java-guava
Guava-Functions
Guava-LongMath
Java Guava | LongMath.checkedAdd(long a, long b) method with Examples
Last Updated: 11 July 2025
The checkedAdd(long a, long b) is a method of Guava's LongMath Class which accepts two parameters a and b, and returns their sum.Syntax:public static long checkedAdd(long ...
read more
Java
java-guava
Guava-Functions
Guava-LongMath
Java Guava | LongMath log10(long x, RoundingMode mode) method with Examples
Last Updated: 11 July 2025
The method log10(long x, RoundingMode mode) of Guava’s LongMath Class accepts two parameters and calculates the base-10 logarithmic value of the first parameter rounded ac...
read more
Java
Java-Functions
java-guava
Guava-LongMath
Java Guava | mod(long x, long m) of LongMath Class with Examples
Last Updated: 11 July 2025
The mod(long x, long m) method of Guava's LongMath Class accepts two parameters x and m, and used to calculate the value of x modulus under m.Syntax:public static long mod...
read more
Java
Java-Functions
java-guava
Guava-LongMath
Java Guava | sqrt(long x, RoundingMode mode) of LongMath Class with Examples
Last Updated: 11 July 2025
The method sqrt(long x, RoundingMode mode) of Guava's LongMath Class accepts two parameters and calculates the square root of the first parameter rounded according to the ...
read more
Java
Java-Functions
java-guava
Guava-LongMath
Java Guava | mean(long x, long y) of LongMath Class with Examples
Last Updated: 11 July 2025
The mean(long x, long y) method of Guava's LongMath Class accepts two parameters x and y and calculates arithmetic mean of them rounded towards negative infinity. This met...
read more
Java
Java-Functions
java-guava
Guava-LongMath
Java Guava | gcd(long a, long b) of LongMath Class with Examples
Last Updated: 11 July 2025
The method gcd(long a, long b) of Guava's LongMath Class returns the greatest common divisor of two parameters a and b.Syntax:public static long gcd(long a, long b)Paramet...
read more
Java
Java-Functions
java-guava
Guava-LongMath
Java Guava | isPowerOfTwo(long x) of LongMath Class with Examples
Last Updated: 11 July 2025
The method isPowerOfTwo(long x) of Guava's LongMath Class is used to check if a number is power of two or not. It accepts the number to be checked as a parameter and retur...
read more
Java
Java-Functions
java-guava
Guava-LongMath
Java Guava | pow(long b, int k) of LongMath Class with Examples
Last Updated: 11 July 2025
The method pow(long b, int k) of Guava's LongMath Class returns b to the kth power. Even if the result overflows, it will be equal to BigInteger.valueOf(b).pow(k).longValu...
read more
Java
Java-Functions
java-guava
Guava-LongMath
Java Guava | log2(long x, RoundingMode mode) of LongMath Class with Examples
Last Updated: 11 July 2025
The method log2(long x, RoundingMode mode) of Guava's LongMath Class accepts two parameters and calculates the base-2 logarithmic value of the first parameter rounded acco...
read more
Java
Java-Functions
java-guava
Guava-LongMath
Java Guava | binomial(int n, int k) of LongMath Class with Examples
Last Updated: 11 July 2025
The binomial(int n, int k) method of Guava's LongMath Class accepts two parameters n and k and calculate the value of the binomial coefficient {n}\choose{k}. If the calcul...
read more
Java
Java-Functions
java-guava
Guava-LongMath
Java Guava | factorial(int n) method of IntMath Class with Examples
Last Updated: 11 July 2025
The factorial(int n) method of Guava's IntMath Class returns the product of the first n positive integers, which is n!.Syntax:public static int factorial(int n)Parameter: ...
read more
Java
Java-Functions
java-guava
Guava-LongMath