RoundToIntegralValue sets d to integral value of x. Inexact and Rounded flags are ignored and removed.
(d, x *Decimal)
| 1235 | // RoundToIntegralValue sets d to integral value of x. Inexact and Rounded flags |
| 1236 | // are ignored and removed. |
| 1237 | func (c *Context) RoundToIntegralValue(d, x *Decimal) (Condition, error) { |
| 1238 | if set, res, err := c.toIntegralSpecials(d, x); set { |
| 1239 | return res, err |
| 1240 | } |
| 1241 | res := c.toIntegral(d, x) |
| 1242 | res &= ^(Inexact | Rounded) |
| 1243 | return c.goError(res) |
| 1244 | } |
| 1245 | |
| 1246 | // RoundToIntegralExact sets d to integral value of x. |
| 1247 | func (c *Context) RoundToIntegralExact(d, x *Decimal) (Condition, error) { |