Rounding

Description

To round a value $x$ in Sage, we use the floor(x) or ceil(x) depending on if we want to round down or up.

Sage Cell

Rounding down

Code

x = sqrt(10)
floor(x)

Rounding up

Code

x = sqrt(10)
ceil(x)

Options

none

Tags

Primary Tags:

Secondary Tags:

A list of possible tags can be found at The WeBWorK Open Problem Library. For linear algebra tags see the Curated Courses Project.

Related Cells

Any related cells go here. Provide a link to the page containing the information about the cell.

Attribute

Permalink:

Author:

Date: 06 Mar 2019 00:28

Submitted by: Zane Corbiere

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License