Computer Science, asked by Halima0005, 9 months ago

write down the syntax for the following function in java to find the natural log of q​

Answers

Answered by singhudishapratap
2

Answer:

// Java program to demonstrate working

// of java.lang.Math.log() method

import java.lang.Math;

class Gfg {

// driver code

public static void main(String args[])

{

double a = -2.55;

double b = 1.0 / 0;

double c = 0, d = 145.256;

// negative integer as argument, output NAN

System.out.println(Math.log(a));

// positive infinity as argument, output Infinity

System.out.println(Math.log(b));

// positive zero as argument, output -Infinity

System.out.println(Math.log(c));

// positive double as argument

System.out.println(Math.log(d));

Answered by SnehaKesharwani
4

Answer:

hope it will help you....thank u

Attachments:
Similar questions