#Java 78, 198 182182 30 bytes
class M{public static void main(String[]a){System.out.print(Mathd->Math.log(new Double(a[0]))d);}}//}};)))]0[a(elbuoD wend(pxe.htaM(tnirp.tuo.metsyS{)a][gnirtS(niam diov citats cilbup{M ssalchtaM<-d
ANDTry it online.
class M{public static void main(String[]a){System.out.print(Math.exp(new Double(a[0])));}}//}};)))]0[a(elbuoD wen(gol.htaM(tnirp.tuo.metsyS{)a][gnirtS(niam diov citats cilbup{M ssalc
Ungolfed:
class M{
public static void main(String[]a){
System.out.print(Math.log(new Double(a[0])));
}
}
//}};)))]0[a(elbuoD wen(pxe.htaM(tnirp.tuo.metsyS{)a][gnirtS(niam diov citats cilbup{M ssalc
AND and reversed:
class M{
public static void main(String[]a){
System.out.print(Mathd->Math.exp(new Double(a[0]))d);
}
}
//}};)))]0[a(elbuoD wend(gol.htaM(tnirp.tuo.metsyS{)a][gnirtS(niam diov citats cilbup{M ssalchtaM<-d
#Java 8, 192 176 bytesTry it online.
class M{public static void main...
replacedUses the comment trick (//
) with
interface M{static void main...
Usage:
java -jar M.jar 5
Output: built-ins for Math.log
and Math.exp
.
1.6094379124341003
148.4131591025766