/**
 * This function calculates the luminosity of a star given its apparent magnitude and distance.
 *
 * @param magnitude The apparent magnitude of the star.
 * @param distance The distance to the star in parsecs.
 * @return The luminosity of the star in solar luminosities.
 */
import kotlin.math.log10
import kotlin.math.pow


fun calculateLuminosity(magnitude: Double, distance: Double): Double {

    val absoluteMagnitude = magnitude - 5 * (log10(distance) - 1)
    val luminosity = 10.0.pow((4.83 - absoluteMagnitude) / 2.5)
    return luminosity
}
import kotlin.math.log10
import kotlin.math.pow

/**
 * This function calculates the luminosity of a star given its apparent magnitude and distance.
 *
 * @param magnitude The apparent magnitude of the star.
 * @param distance The distance to the star in parsecs.
 * @return The luminosity of the star in solar luminosities.
 */
fun calculateLuminosity(magnitude: Double, distance: Double): Double {
import kotlin.math.log10
import kotlin.math.pow

/**
 * This function calculates the luminosity of a star given its apparent magnitude and distance.
 *
 * @param magnitude The apparent magnitude of the star.
 * @param distance The distance to the star in parsecs.
 * @return The luminosity of the star in solar luminosities.
 */
fun calculateLuminosity(magnitude: Double, distance: Double): Double {

    val absoluteMagnitude = magnitude - 5 * (log10(distance) - 1)
    val luminosity = 10.0.pow((4.83 - absoluteMagnitude) / 2.5)
    return luminosity
}