C# has a built-in Math class which provides useful mathematical functions and operations. The class has the BitDecrement() function, which is used to compute the next smallest number less than a specified number.
public static double BitDecrement (double value);
Double type and represents the input value for which we have to find BitDecrement(). Its range is all double numbers.value.NaN as an input of value.NegativeInfinity as an input of value.using System;class Educative{static void Main(){Double result = Math.BitDecrement(10.1);System.Console.WriteLine("BitDecrement(10.1) = "+ result);Double result1 = Math.BitDecrement(Double.NaN);System.Console.WriteLine("BitDecrement(NaN) = "+ result1);Double result2 = Math.BitDecrement(Double.PositiveInfinity);System.Console.WriteLine("BitDecrement(∞) = "+ result2);}}