Performing simple data type conversion

There are two ways to convert a value from one data type to another. The obvious choice is to construct a new object from an existing value. For example, we can construct a Float64 object from a rational number as follows:

Another way is to use the convert function:

Either way works fine. There is an advantage from using the convert function when considering performance optimization, as we will explain later in this section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.121.214