SINPRE

Convert a Double Precision File to a Single Precision File

Order Number: DEC-12-UW4A-D

This document describes SINPRE, a program for the Digital Equipment Corporation (DEC) PDP-12B computer with a 4K core, operating with a LAP6-DIAL (DIAL) tape system. The program's core function is to convert LINCtape-based double precision data files, such as those generated by the Signal Averager program (DEC-12-UZ1A-D), into LINCtape-based single precision data files.

The conversion process involves the user defining both the input double precision file and the output single precision file by specifying their first and last tape block numbers and the respective tape unit numbers. SINPRE scales the double precision values to fit within ±8 bits, primarily for display on a scope. It achieves this by finding the maximum absolute value in the input file, then shifting all values right until this maximum is within the desired limits, and recording the number of shifts applied. Each double precision value is then shifted this same number of times and stored as a single precision number in the output file. Any remaining space in the last output data block is filled with zeros. The program allows for the conversion of multiple files sequentially.

SINPRE operates through a "setup mode" where it displays interactive messages on a scope, prompting the user for input via the keyboard. It includes robust error handling for conditions like "NO DATA" (input file contains only zeros), "OUTPUT OVERFLOW" (output file exceeds tape capacity), and "DATA OVERFLOW" (output would overwrite the input file). A critical feature is its preventative measure to ensure that the single precision output file does not overwrite the original double precision input file if they are on the same tape unit.

Appendix A details how to modify the SINPRE program using the PATCH utility, allowing for changes to the double precision word order convention (high/low instead of low/high) or adjusting the scaling to ±11 bits instead of ±8 bits.

DEC-12-UW4A-D
December 1970
48 pages
Quality

Original
3.8MB
DEC-12-UW4A-D
2000
48 pages
Quality

Original
2.3MB

Site structure and layout ©2025 Majenko Technologies