File:Nearest integer.svg

Summary

 
This diagram was created with SageMath.
Category:Created with SageMath#Nearest%20integer.svg
Description
English: The nearest integer (round) function, which rounds to the nearest even integer. It was generated by the following Sage code:
(plot(round, -3.5, 3.5, exclude=[a - 0.5 for a in range(-3, 5)], ymax=3, zorder=3, axes_labels=['$x$', r'$\mathrm{nint}(x)$'], fontsize=14, thickness=1.5) +
point((-2.5, -2), rgbcolor='blue', pointsize=45, zorder=4) + point((-1.5, -2), rgbcolor='blue', pointsize=45, zorder=4) +
point((-0.5, 0), rgbcolor='blue', pointsize=45, zorder=4) + point((0.5, 0), rgbcolor='blue', pointsize=45, zorder=4) +
point((1.5, 2), rgbcolor='blue', pointsize=45, zorder=4) + point((2.5, 2), rgbcolor='blue', pointsize=45, zorder=4) +
point((-3.5, -3), pointsize=45, zorder=4) + point((-2.5, -3), pointsize=45, zorder=4) +
point((-1.5, -1), pointsize=45, zorder=4) + point((-0.5, -1), pointsize=45, zorder=4) +
point((0.5, 1), pointsize=45, zorder=4) + point((1.5, 1), pointsize=45, zorder=4) +
point((2.5, 3), pointsize=45, zorder=4) + point((3.5, 3), pointsize=45, zorder=4) +
point((-3.5, -3), rgbcolor='white', pointsize=20, zorder=5) +
point((-2.5, -3), rgbcolor='white', pointsize=20, zorder=5) +
point((-1.5, -1), rgbcolor='white', pointsize=20, zorder=5) +
point((-0.5, -1), rgbcolor='white', pointsize=20, zorder=5) +
point((0.5, 1), rgbcolor='white', pointsize=20, zorder=5) +
point((1.5, 1), rgbcolor='white', pointsize=20, zorder=5) +
point((2.5, 3), rgbcolor='white', pointsize=20, zorder=5) +
point((3.5, 3), rgbcolor='white', pointsize=20, zorder=5))
Date
Source Own work
Author Eviatar Bach

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Nearest%20integer.svg
Category:Self-published work Category:Step functions Category:Images with Sage source code Category:Files by User:InverseHypercube
Category:CC-Zero Category:Created with SageMath Category:Files by User:InverseHypercube Category:Images with Sage source code Category:Pages using deprecated source tags Category:Self-published work Category:Step functions