/**
 * This function calculates the modulus of a complex number.
 *
 * @param real1 The real part of the complex number.
 * @param imag1 The imaginary part of the complex number.
 * @return The modulus of the complex number.
 * @throws IllegalArgumentException If the input arguments are not of type Float.
 */
fun modulusComplexNumbers(real1: Float, imag1: Float): Float {

    if (real1 !is Float || imag1 !is Float) {
        throw IllegalArgumentException("Input arguments must be of type Float")
    }

    val modulus = kotlin.math.sqrt(real1 * real1 + imag1 * imag1)
    return modulus.toFloat()
}
/**
 * This function calculates the modulus of a complex number.
 *
 * @param real1 The real part of the complex number.
 * @param imag1 The imaginary part of the complex number.
 * @return The modulus of the complex number.
 * @throws IllegalArgumentException If the input arguments are not of type Float.
 */
fun modulusComplexNumbers(real1: Float, imag1: Float): Float {
/**
 * This function calculates the modulus of a complex number.
 *
 * @param real1 The real part of the complex number.
 * @param imag1 The imaginary part of the complex number.
 * @return The modulus of the complex number.
 * @throws IllegalArgumentException If the input arguments are not of type Float.
 */
fun modulusComplexNumbers(real1: Float, imag1: Float): Float {

    if (real1 !is Float || imag1 !is Float) {
        throw IllegalArgumentException("Input arguments must be of type Float")
    }

    val modulus = kotlin.math.sqrt(real1 * real1 + imag1 * imag1)
    return modulus.toFloat()
}