--- title: "Rounding Numbers" id: 81022 type: "computer_media" slug: "rounding-numbers" url: "http://localhost/computer_media/rounding-numbers/" markdown_url: "http://localhost/computer_media/rounding-numbers.md" published_at: "2026-11-26T21:58:26+00:00" modified_at: "2026-11-26T21:58:26+00:00" featured_image: url: "http://localhost/wp-content/uploads/2026/11/rounding-numbers-1.png" excerpt: "Rounds numbers to a chosen number of places, decimal points in line, for the TS2068." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Dick Wagner" slug: "dick-wagner" taxonomy: "indiv" url: "http://localhost/indiv/dick-wagner/" genre: - name: "Mathematics" slug: "mathematics" taxonomy: "genre" url: "http://localhost/type/mathematics/" media_type: "Program" programmers: - name: "Dick Wagner" slug: "dick-wagner" taxonomy: "indiv" url: "http://localhost/indiv/dick-wagner/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Rounding%20Numbers%20%281993%29%28Wagner%2C%20Dick%29%28TS2068%29%28US%29%28Program%29.zip" tsrun_member: "Rounding Numbers (1993)(Wagner, Dick)(TS2068)(US)(Program)/Rounding Numbers (1993)(Wagner, Dick)(TS2068)(US)(Program).tap" mediadate: "1993" images: - url: "http://localhost/wp-content/uploads/2026/11/rounding-numbers-1.png" - url: "http://localhost/wp-content/uploads/2026/11/rounding-numbers-2.png" - url: "http://localhost/wp-content/uploads/2026/11/rounding-numbers-3.png" article_media: - id: 21200 title: "Rounding Numbers" type: "article" url: "http://localhost/article/rounding-numbers/" media_type_tags: "Mathematics" license: false --- # Rounding Numbers Rounds numbers to the number of decimal places you choose and lists them in two columns: the number as typed, and the rounded number placed so that the decimal points line up (whole numbers end in the column before the point). Give the number of places once, then type numbers one after another; the program keeps asking until you stop it. Corrected: line 220 was printed LET A=N+5.5*10^-(DP+1), which adds 5.5 in the first dropped place and so rounded up numbers such as 1.0047 (to two places, 1.01). It now adds 5, the usual rounding; the article’s sample output is unchanged. Published in The Plotter September 1993 ([Rounding Numbers](https://timexsinclair.com/article/rounding-numbers/)). ## Source Code ``` 10 PRINT " ******************" 20 PRINT " *ROUNDING NUMBERS*" 30 PRINT " ******************" 40 REM DICK WAGNER 7/93 100 REM N=NUMBER TO BE ROUNDED 110 REM DP=DIGITS TO THE RIGHT OF DECIMAL POINT 120 REM R=VALUE ROUNDED 200 PRINT ;"HOW MANY PLACES TO RIGHT OF DECIMAL POINT FOR ROUNDING? ";: INPUT DP: CLS 205 PRINT "INPUT NUMBER TO BE ROUNDED": PRINT 210 INPUT N; 220 LET A=N+5*10^-(DP+1) 230 LET R=INT (A*10^DP)/10^DP 300 LET N$=STR$ R 310 FOR L=1 TO LEN N$ 320 IF N$(L)="." THEN GO TO 350 325 NEXT L 330 PRINT N;: PRINT TAB (20-LEN N$);N$: GO TO 210 350 PRINT N;: PRINT TAB (21-L);N$: GO TO 210 ```