From the course: Learning Julia

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Built-in functions

Built-in functions - Julia Tutorial

From the course: Learning Julia

Start my 1-month free trial

Built-in functions

- [Instructor] Just like some other popular languages, Julia has some built-in useful functions. So let's take a look at some of those in this example. Go ahead and open up the builtin_start file and let's begin by looking at some of the math functions. So you can use the round function to round numbers in a variety of ways so I'll go ahead and just use the round function to round this number and then we can print that out. I can also specify a rounding direction. So for example, I can write x = round and then same number but now I can specify a direction. So you can see I can choose round down, round from zero, so on. We'll go ahead and choose round up and then print that out. I can use the floor and ceiling functions to perform rounding operations as well. So if I have a value like this, I can print out the floor result of that, and I can also print out the ceiling of that, which will round up, and I can use a function like absolute value to print out the absolute value of the…

Contents