Open In App

Getting complex conjugate of a complex number in Julia – conj() Method

Last Updated : 01 Apr, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

The conj() is an inbuilt function in julia which is used to compute the complex conjugate of a specified complex number z.

Syntax: conj(z)

Parameters:

  • z: Specified complex number.

Returns: It returns the complex conjugate of a specified complex number z.

Example 1:




# Julia program to illustrate 
# the use of conj() method
   
# Getting the complex conjugate of 
# a specified complex number z.
println(conj(0))
println(conj(1))
println(conj(1 + im))
println(conj(2 - im))


Output:

Example 2:




# Julia program to illustrate 
# the use of conj() method
   
# Getting the complex conjugate of 
# a specified complex number z.
println(conj(5 + 7im))
println(conj(3 - 8im))
println(conj(2 * 4im))
println(conj(3 / 2im))


Output:


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads