# Frequency-doubled Nd:YAG MOPA laser system with programmable rectangular
pulses up to 200 microseconds

Maximilian Beyer  1,2,6,* Jack C. Roth  1,3,6 Eustace Edwards  1,4 and David
DeMille 5,$\dagger$ 1Department of Physics, Yale University, New Haven, CT
06520, USA
2Currently: Department of Physics and Astronomy, Vrije Universiteit Amsterdam,
1081 HV Amsterdam, The Netherlands
3Currently: Department of Physics, University of California, Berkeley,
Berkeley, CA 94720, USA
4Currently: Raytheon Technologies, 235 Presidential Way, Woburn, MA 01801
5Department of Physics, University of Chicago, Chicago, IL 60637, USA
6 These authors contributed equally to this work<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

A compact frequency-doubled diode-pumped Nd:YAG master-oscillator power-
amplifier laser system with programmable microsecond pulse length has been
developed. Analog pulse shaping of the output from a single-frequency cw
Nd:YAG oscillator, and subsequent amplification, allowed the generation of
rectangular pulses with pulse lengths on the order of the Nd:YAG fluorescence
lifetime. Rectangular pulses of 1064 nm light with 520 mJ energy, 2.6 kW peak
power, and 200 $\mu$s duration, with linewidth below 10 kHz, were obtained at
a repetition rate of 2 Hz. Second harmonic generation in a LBO crystal yielded
pulses of 262 mJ and 1.3 kW peak power at 532 nm. The peak power can be
maintained within 2.9% over the duration of the laser pulse, and long-term
intensity stability of 1.1% was observed. The 532 nm beam is roughly Gaussian,
with $M^{2}=1.41$ during the second harmonic generation. This system has
potential as a pump source for titanium:sapphire, dye, or optical parametric
amplifiers to generate tunable high-power single-frequency radiation.

††journal: oe

##  1 Introduction

High-power tunable laser sources with long pulse duration and narrow linewidth
are desired for a wide range of applications. In atomic and molecular physics,
potential applications include laser slowing [1, 2] and precision measurements
requiring wavelengths only accessible via nonlinear processes [3, 4]. These
sources could also find application as Bragg diffraction lasers in matter-wave
interferometry [5]. However, to the best of our knowledge, lasers of this type
have not yet been developed. A plausible way to obtain these characteristics
would be to use a high power, long-pulse pump laser to amplify a lower power,
tunable narrow-linewidth laser.

With this motivation, we report here on a compact, frequency-doubled diode-
pumped Nd:YAG MOPA laser system with programmable $\sim$100 microsecond pulse
length, good beam quality, programmable temporal intensity profiles, and
narrow linewidth. This may enable the amplification of low power tunable
lasers in a gain medium like titanium:sapphire, or via optical parametric
processes. Compared to existing systems, we combine pulse shaping capabilities
[6, 7] with pulse durations on the order of 100 microseconds [8, 9, 10, 11,
12, 13], while avoiding spikes and ensuring a flat rectangular temporal
profile.

##  2 Experimental setup

Figure 1: Schematic diagram of the frequency-doubled Nd:YAG MOPA laser system.
The spatial flat-top beam profile is maintained throughout the laser system
using relay lenses (not shown) with the image planes indicated in green. VCO:
Voltage-controlled oscillator. VVA: Voltage-variable attenuator. AOM: Acousto-
optic modulator. OI: Optical isolator, PBS: Polarizing beam splitter.
$\lambda/4$: Quarter-wave plate. $\lambda/2$: Half-wave plate. LBO: nonlinear
crystal for second harmonic generation.

The optical layout of the laser system is illustrated in Fig. 1. The entire
system is compact (about 1m2). The master oscillator is a modified cw
nonplanar ring oscillator laser [14], providing up to 400 mW output power at
the fundamental frequency (FF) of 1064 nm with a specified linewidth below 5
kHz. The beam from this laser is passed through an amplitude-modulated
acousto-optic modulator (AOM), driven at frequency 80 MHz, to produce a seed
laser pulse. The RF drive is passed through two voltage-variable attenuators
(VVA) [15]. A fast VVA with a rise time of 8 ns and an extinction ratio of 28
dB is used for pulse shaping. To achieve a higher on/off extinction ratio, the
finely shaped RF pulse is gated using a second, slower VVA (rise time 14
$\mu$s, extinction ratio 40 dB). The first-order diffracted beam from the AOM
is coupled into a polarization maintaining single mode fiber and delivered to
the amplifier system, which consists of one pre-amplifier and one main-
amplifier Nd:YAG gain module [16]. A double-pass configuration is used for the
pre-amplifier. This employs a retroreflection with polarization rotated 90∘ to
avoid standing waves in the Nd:YAG module, and a polarizing plate beamsplitter
to separate the incoming and outgoing beams [17]. A quarter-waveplate was used
to rotate the polarization in the double-pass configuration, after making sure
that it showed the same performance as a Faraday rotator. We found no sign of
thermally induced birefringence on the beam profile or with regard to parastic
self-lasing of the amplifier.

Both gain modules are diode pumped at 808 nm and are operated at a maximum
current of 175 A. Diode drive current pulse lengths are 750 $\mu$s and 500
$\mu$s, for the pre-amplifier and main-amplifier, respectively (see Fig. 2).
The system operates at 2 Hz repetition rate, which is motivated by its future
application for laser cooling a cryogenic molecular beam. The lower repetition
rate also allows for longer diode pump lengths to enable a higher gain and the
generation of rectangular pulses with durations similar to the fluorescence
lifetime of the Nd:YAG crystal.

To increase the extraction efficiency from the amplifier modules, the seed
laser is converted to a spatially flat-top beam; this enables higher filling
of the gain medium. The flat-top profile is generated by expanding the seed
beam to 2 mm $1/e^{2}$ diameter and passing it through an aperture 1 mm in
diameter. It is then propagated through the amplifier system using a series of
relay lenses with the relay planes indicated in Fig. 1. The relay lenses are
also used to change the beam diameter to ensure a filling of 87% and 69% in
the pre- and main-amplifiers, respectively. The obtained output power did not
decrease when reducing the seed power by 30%.

To reduce parasitic self-lasing from back-reflections, optical isolators are
inserted after the fiber outcoupler that directs the seed beam to the pre-
amplifier, and between the pre-amplifier and the main-amplifier. Due to the
compact size of the amplifier system (1 m x 1 m) and the long pump diode
pulses, a fraction of the spontaneous emission fluorescence can easily be
amplified leading to self-lasing in the system. To prevent this effect,
additional apertures are placed at the focal points of the relay lenses to
reduce the amount of fluorescence propagating through the system.

To generate the second harmonic (SH) at 532 nm, the 1064 nm beam (FF) is
focused into a temperature-stabilized $l=50$ mm long LBO crystal with AR
coating for 1064 nm and 532 nm, held at 149.6 C for non-critical phase
matching. We use a beam waist of $\omega=70~{}\mu$m at the center of the
crystal medium and a focusing parameter [18] of $\xi=l\lambda/2\pi
n\omega^{2}=0.95$.

##  3 Results and discussion

Figure 2: Temporal pulse shapes and instantaneous power of the laser system
for an unshaped cw seed laser (left column), and for seed laser pulses shaped
to obtain rectangular second harmonic pulses with length 200 $\mu$s (middle
column) and 60 $\mu$s (right column). From the top to bottom row: time
profiles of the seed, the double-pass pre-amplifier output, the main-amplifier
output, and the second harmonic (SH) pulses. The pulse energies are given in
each panel. The blue lines in the second and third rows indicate the time
profile of the current driving the pre-amplifier and main-amplifier pump
diodes, respectively. The same drive currents are used for each pulse. Note
the change in time scales between columns.

Fig. 2 demonstrates the pulse shaping capabilities of the MOPA laser system.
The first row depicts the time profile of the amplifier seed, generated by
amplitude modulation of the master oscillator output using the AOM. The second
and third rows depict the pulse time profile after a double-pass through the
pre-amplifier module and single pass through the main-amplifier module,
respectively. The last row displays the time profile of the SH. To avoid self-
lasing caused by amplifying fluorescence from the pre-amplifier in the second
gain module, we reduce the pump length in the main-amplifier. The upper limit
for the pump length of the amplified 1064 nm pulse is related to the pulse
length of the pump diodes. The amplified pulse is shorter than the pump diode
current pulse because of the build up time of 100 $\mu$s, as can be seen in
the cw seed column of panels. After roughly 100 $\mu$s for the pre-amplifier
and 300 $\mu$s for the amplifier, a steady state is reached that leads to a
flat time profile. This indicates an equilibrium between populating the upper
level of the Nd:YAG gain medium using pump diodes and depleting it by
stimulated emission. Compared to the 1064 nm pulse, the shape of the 532 nm
pulse is further shortened in the nonlinear second harmonic generation
process.

We optimized our system to obtain a flat time profile in the SH pulse. To
accomplish this, the seed time profile must anticipate the time dependent gain
of the amplifier system and the non-linearity of the second harmonic
generation [7, 6]. The gain modules are driven using the same currents shown
in the cw panel, with a pump time much longer than the target pulse length.
This is done in order to maximize the population inversion in the gain medium,
and therefore to maximize the gain, whenever the seed pulse is on. The
population inversion $\Delta$ is maximal at the beginning of the seed pulse,
then is rapidly depleted as the pulse stimulates emission while propagating
through the gain medium. For pulse energies much smaller than the stored
energy of the amplifier, the gain $G$ is an exponential function of the
population inversion $G=\exp(\Delta\sigma L)$ where $\sigma$ is the absorption
cross section ($28\times 10^{-20}$ cm2 for Nd:YAG) and $L$ is the length of
the amplification medium (63 mm for the pre-amplifier and 146 mm for the main-
amplifier) [19]. For pulse energies larger than the stored energy of the
amplifier, the gain is proportional to the population inversion
$G\propto\Delta$ [20, 21]. In our case, for generating rectangular pulses we
operate in an intermediate regime, which cannot be described by a simple
expression. Therefore the intensity of the seed pulse must be carefully ramped
up as the gain drops in both amplifiers. As expected due to the exponential
relationship between the population inversion and gain, this effect is
particularly apparent in the pre-amplifier; this can be seen in the first two
rows of the 200 $\mu$s and 60 $\mu$s panels in Fig. 2. With proper seed pulse
shaping, any overshoot or spikes can be avoided to guarantee a flat
rectangular pulse.

The current set up was used to generate arbitrary pulse lengths between 4 and
200 $\mu$s. We were able to obtain higher peak power for shorter pulses. For
example, with a 60 $\mu$s pulse we obtained up to 4 kW in the FF and 2 kW in
the SH. (The data depicted in Fig. 2 was obtained for a lower amplifier drive
current to avoid optical damage of the LBO crystal under the described
focusing condition.)

Figure 3: Left: Beat-note signal arising from the superposition of the cw
output of the master laser with the pulsed infrared light. The oscillation
frequency of $\sim$80 MHz corresponds to the frequency of the accousto-optic
modulator used to generate a seed pulse from the cw output. Right: Beat-note
spectrum of the continuous wave seed (red) and amplified (black) laser pulse.
The beat-note spectrum of a synthetic pulse is shown in green.

To determine the effect of the amplification on the linewidth of the output
laser pulse, a beat-note measurement is performed by overlapping a fraction of
the master oscillator beam (taken from the undiffracted beam after the AOM)
with the amplified 1064 nm pulse on a fast photodiode. The resulting beat-note
signal (Fig. 3) shows the expected oscillation at the AOM drive frequency,
$\approx 80$ MHz. Fig. 3 also displays the beat-note spectrum of the
unamplified cw seed beam (red) and the amplified pulse (black). Because phase
noise on the cw seed beam cannot affect this beat-note signal, we attribute
the 4 kHz FWHM width of the cw beat-note to amplitude noise (either in the
seed beam or our detection electronics). We attribute the sidebands at $\pm
150$ kHz from the carrier to amplitude modulation of the seed laser. The beat-
note of the amplified beam shows a FWHM of $8$ kHz, indicating that the
amplification does not broaden the linewidth of the master oscillator
(specified to be less than 5 kHz) by more than a few kHz. Note that the
sidebands on the cw spectrum are essentially reproduced in the amplified pulse
spectrum. (Sidebands resulting from the particular temporal envelope of the
amplified pulse are estimated to appear at $\pm 70$ kHz and with an amplitude
$\sim$150 times smaller than the carrier frequency, as indicated by the green
trace in Fig. 3.)

The second harmonic generation conversion efficiency with 2.5 kW FF power is
predicted to be 52% by an mlSNLO [22] calculation for a 50 mm long LBO crystal
with a beam waist of 70 $\mu$m at the center. The observed energy-conversion
efficiencies for the cw-seeded, 200 $\mu$s, and 60 $\mu$s pulses are 46%, 50%,
and 53%, respectively–in good agreement with the prediction.

Figure 4: Pulse energy of the fundamental frequency (1064 nm) and second
harmonic (532 nm) versus time, over a 60 min interval. The insets show the
mean temporal profile of the laser pulses and its 1$\sigma$ range of variation
(in grey) over 60 min.

Fig. 4 shows the pulse energy for the fundamental frequency and the second
harmonic over a 60 minute time interval, indicating a long-term stability of
better than 0.5% and 1.1%, respectively. Also shown are the averaged temporal
profiles of the laser pulses and the 1$\sigma$ ranges of deviation from the
average over the same 60 minute interval. The individual pulse shapes are
preserved to better than 1.8% for the FF and 2.9% for the SH over 60 minutes.

Figure 5: Beam profiles of the FF seed beam (left), amplified FF (middle) and
SH (right). Units are in $\mu$m and all profiles are taken at relay planes.

Spatial profiles of the apertured seed, amplified FF, and SH beams are shown
in Fig. 5. The amplification process leads to a degradation of the flat-top
beam profile obtained using the aperture, as can be seen by comparing the
first two panels in Fig. 5. To reach high conversion efficiency in the SH
generation, nonlinear crystals with a length of several centimeters and a near
confocally-focused input beam must be employed. The focused flat-top beam
profile cannot be maintained under these conditions. With the beam focused at
the center of the crystal, we obtain a SH beam with a Gaussian profile, as is
apparent in Fig. 5. The M2 for the SH beam was determined to be 1.41(14).

##  4 Conclusion and Outlook

We have demonstrated efficient amplification of the output of a narrow-
bandwidth seed laser using a two-stage diode-pumped Nd:YAG amplification
setup, reaching 2.6 kW at 1064 nm and 1.3 kW at 532 nm for a pulse length of
200 $\mu$s. A flat-top seed beam profile and long diode-pumping pulses
resulted in a gain of 9600 and 16 in the double-passed pre-amplifier and main-
amplifier, respectively. In combination with an acousto-optic modulator for
pulse shaping of the cw master oscillator output, this enabled the generation
of rectangular time-profile pulses with widths on the timescale of the
fluorescence lifetime of the amplification medium. The single-frequency output
with $<10$ kHz linewidth, excellent beam quality in the second harmonic, and
stable, high peak powers realized here using a compact 2-stage amplification
setup compares favorably to other, previously demonstrated systems [7, 8, 9,
10, 11, 12, 13].

This laser system provides desirable characteristics for potential use as a
pump for tunable, high-power, narrow-linewidth long-pulse laser systems. Such
lasers could in principle be based on optical-parametric oscillators [23, 24,
25], or on amplification of weaker narrowband cw lasers using gain in media
such as titanium:sapphire [26, 27, 28], dye [29], or nonlinear crystals (via
optical parametric amplification). The complete absence of laser spiking in
the pump source will minimize the danger of optical damage and provide steady
conditions in the pumped medium so as to avoid transient thermal lenses [30,
31].

To illustrate the possible utility of such a tunable, high power, long-pulse
laser system, we focus on a particular application: laser slowing and cooling
of molecules. Laser slowing and cooling is typically accomplished via forces
from near-resonant photon scattering, which is associated with spontaneous
emission [32]. However, with sufficiently intense laser beams, stimulated
light forces can be used to dramatically increase slowing and cooling rates,
despite a lower scattering rate [33]. Such schemes are particularly attractive
[34, 35, 36, 37, 38] for laser slowing and cooling of molecules, which can
have optically accessible electronic transitions but suffer from optical
pumping to dark states each time a photon is scattered [39, 40]. Although
laser slowing, cooling, and trapping of molecules has been demonstrated using
photon scattering forces [41, 42, 43, 44, 45, 46, 47], the required long
slowing distance and very modest cooling rates deliver orders of magnitude
smaller fluxes of slow molecules than are typical in atomic experiments.

Promising experimental implementations of stimulated-force slowing and/or
cooling, using the particular approach of the so-called bichromatic force
(BCF) [48, 33], have been reported for atoms [33, 49, 50] and for molecules
[51, 38, 52]. In each of these experiments, the use of continuous wave laser
sources limited the attainable power; hence, the intensity required for strong
slowing and cooling forces could be applied only over a small fraction of the
area occupied by the atomic or molecular beam. High-energy pulsed laser
sources offer the possibility to apply substantial forces over a large area,
though over shorter times. This would be sufficient for experiments using
pulses of atoms and molecules, for example molecules produced in the ablation-
loaded cryogenic buffer gas beam sources [53] used in all molecular laser
cooling experiments to date. Here, a laser with intensity of $\sim$1 kW/cm2,
tuned near resonance, could in principle slow molecules with a typical
cryogenic beam velocity of $\sim$200 m/s, over an area of $\sim$1 cm2, to a
near standstill within a single pulse of $\sim 100~{}\mu$s (corresponding to a
molecular travel distance of $\sim$1 cm). This efficient process would enable
trapping and further cooling of much larger molecular samples; it could also
be applied to a very wide range of molecular species, due to the reduced
number of spontaneous emission events required during slowing. We anticipate
that the laser system described here will stimulate further work in this
direction.

## Acknowledgments

The authors thank Jai-Min Choi for technical support. This work was supported
by ARO DURIP grant W911NF-12-1-0475.

## Disclosures

The authors declare no conflicts of interest.

## References

  * [1] R. Fulton, A. I. Bishop, M. N. Shneider, and P. F. Barker, “Controlling the motion of cold molecules with deep periodic optical potentials,” Nature Physics 2, 465–468 (2006). Number: 7 Publisher: Nature Publishing Group.
  * [2] N. Coppendale, L. Wang, P. Douglas, and P. F. Barker, “A high-energy, chirped laser system for optical Stark deceleration,” Applied Physics B 104, 569 (2011).
  * [3] R. Seiler, T. Paul, M. Andrist, and F. Merkt, “Generation of programmable near-Fourier-transform-limited pulses of narrow-band laser radiation from the near infrared to the vacuum ultraviolet,” Rev. Sci. Instrum. 76, 103103 (2005).
  * [4] C. Haase, M. Beyer, C. Jungen, and F. Merkt, “The fundamental rotational interval of para-H${}_{2}^{+}$ by MQDT-assisted Rydberg spectroscopy of H2,” J. Chem. Phys. 142, 064310 (2015).
  * [5] H. Müller, S.-w. Chiow, Q. Long, S. Herrmann, and S. Chu, “Atom Interferometry with up to 24-Photon-Momentum-Transfer Beam Splitters,” Physical Review Letters 100, 180405 (2008). Publisher: American Physical Society.
  * [6] R. A. Meijer, A. S. Stodolna, K. S. E. Eikema, and S. Witte, “High-energy Nd:YAG laser system with arbitrary sub-nanosecond pulse shaping capability,” Opt. Lett. 42, 2758 (2017).
  * [7] M. J. Yarrow, J. W. Kim, and W. A. Clarkson, “High power, long pulse duration, single-frequency Nd:YVO4 master-oscillator power-amplifier,” Optics Communications 270, 361–367 (2007).
  * [8] X. Xu, G. Xie, Y. Lu, L. Zhang, and M. Wan, “Long-pulse, single-frequency 1064 nm laser and frequency doubling,” High Pow Laser Sci Eng 3, e24 (2015).
  * [9] Q. Bian, J.-W. Zuo, C. Guo, C. Xu, Y. Shen, N. Zong, Y. Bo, Q.-J. Peng, H.-B. Chen, D.-F. Cui, and Z.-Y. Xu, “Spiking suppression of high power QCW pulse 1319\hspace0.167emnm Nd:YAG laser with different intracavity doublers,” Laser Physics 26, 095005 (2016). Publisher: IOP Publishing.
  * [10] Q. Bian, Y. Bo, J.-w. Zuo, C. Guo, C. Xu, W. Tu, Y. Shen, N. Zong, L. Yuan, H.-w. Gao, Q.-j. Peng, H.-b. Chen, L. Feng, K. Jin, K. Wei, D.-f. Cui, S.-j. Xue, Y.-d. Zhang, and Z.-y. Xu, “High-power QCW microsecond-pulse solid-state sodium beacon laser with spiking suppression and D${}_{\textrm{2b}}$ re-pumping,” Optics Letters 41, 1732–1735 (2016). Publisher: Optical Society of America.
  * [11] C. Guo, Q. Bian, C. Xu, J. Zuo, Y. Bo, Z. Wang, Y. Shen, N. Zong, H. Gao, Y. Liu, D. Cui, Q. Peng, and Z. Xu, “High-Power High Beam Quality Narrow-Linewidth Quasicontinuous Wave Microsecond Pulse 1064-nm Nd:YAG Amplifier,” IEEE Photonics Journal 8, 1–8 (2016). Conference Name: IEEE Photonics Journal.
  * [12] Q.-s. Zong, Y. Bo, C. Guo, Q. Bian, J.-q. Chang, W.-j. Li, L.-j. He, P.-c. Di, J.-w. Zuo, Y. Shen, D.-f. Cui, Q.-j. Peng, and Z.-y. Xu, “High brightness narrow-linewidth microsecond pulse green laser by frequency doubling of a master oscillator power amplifier Nd:YAG laser,” Optics & Laser Technology 106, 294–298 (2018).
  * [13] Q. Zong, Q. Bian, Y. Yang, L. He, X. Wang, J. Zuo, Y. Bo, L. Yuan, Y. Kou, Y. Liu, D. Cui, Q. Peng, and Z. Xu, “Narrow linewidth high beam quality long pulse solid-state yellow laser at 589 nm by intra-cavity sum-frequency generation,” in _14th National Conference on Laser Technology and Optoelectronics (LTO 2019),_ vol. 11170 (International Society for Optics and Photonics, 2019), p. 111700M.
  * [14] The master oscillator laser was a Lumentum 126-1064-100.
  * [15] The fast VVA is an Analog Devices HMC346AMS8GE and the slow VVA is a Minicircuits MiniCircuits ZX73-2500-S+.
  * [16] Nd:YAG pre-amplifier (RBA20-1P200H) and main-amplifier (REA6308-2P200H) module from Northrop Grumman.
  * [17] J. Y. Lee, H. S. Kim, K. Y. Um, J. R. Park, and H. J. Kong, “Compensation of polarization distortion of a laser beam in a four-pass Nd:glass amplifier by using a Faraday rotator,” in _Advanced Solid State Lasers (1996), paper HP6,_ (Optical Society of America, 1996), p. HP6.
  * [18] G. D. Boyd and D. A. Kleinman, “Parametric Interaction of Focused Gaussian Light Beams,” Journal of Applied Physics 39, 3597–3639 (1968). Publisher: American Institute of Physics.
  * [19] W. Koechner, _Solid-State Laser Engineering_ , vol. 1 of _Springer Series in Optical Sciences_ (Springer New York, New York, NY, 2006).
  * [20] D. Park, J. Jeong, and T. J. Yu, “Optimization of the pulse width and injection time in a double-pass laser amplifier,” High Pow Laser Sci Eng 6, e60 (2018).
  * [21] J. Jeong, S. Cho, and T. J. Yu, “Numerical extension of Frantz–Nodvik equation for double-pass amplifiers with pulse overlap,” Opt. Express 25, 3946 (2017).
  * [22] A. V. Smith, “SNLO nonlinear optics code,” AS-Photonics, Albuquerque, NM (2004).
  * [23] K. Devi and M. Ebrahim-Zadeh, “Room-temperature, rapidly tunable, green-pumped continuous-wave optical parametric oscillator,” Optics Letters 42, 2635–2638 (2017). Publisher: Optical Society of America.
  * [24] G. Aoust, A. Godard, M. Raybaut, J.-B. Dherbecourt, G. Canat, and M. Lefebvre, “Pump duration optimization for optical parametric oscillators,” JOSA B 31, 3113–3122 (2014). Publisher: Optical Society of America.
  * [25] C. Couvin, C. Couvin, X. Délen, G. Aoust, M. Raybaut, J.-B. Dherbecourt, J.-M. Melkonian, G. Gorju, F. Balembois, P. Georges, and A. Godard, “Singly Resonant OPO Pumped by a Pulsewidth-Tunable Hybrid MOPA Source,” in _High-Brightness Sources and Light-Driven Interactions (2016), paper MS4C.6,_ (Optical Society of America, 2016), p. MS4C.6.
  * [26] D. Sprecher, M. Beyer, and F. Merkt, “Precision measurement of the ionisation energy of the 3d$\sigma$ GK state of H2,” Mol. Phys. 111, 2100–2107 (2013).
  * [27] C. Xu, C. Guo, H.-B. Yu, Z.-M. Wang, J.-W. Zuo, Y.-Q. Xia, Q. Bian, Y. Bo, H.-W. Gao, Y.-D. Guo, S. Zhang, D.-F. Cui, Q.-J. Peng, and Z.-Y. Xu, “High pulse energy, high beam quality microsecond-pulse Ti:sapphire laser at 819.7 nm,” Applied Physics B 123, 94 (2017).
  * [28] Q.-S. Zong, Q. Bian, C. Xu, J.-Q. Chang, L.-J. He, Y. Bo, J.-W. Zuo, Y.-T. Xu, D.-F. Cui, Q.-J. Peng, and Z.-Y. Xu, “High beam quality narrow linewidth microsecond pulse Ti:sapphire laser operating at 819.710 nm,” Optics & Laser Technology 113, 52–56 (2019).
  * [29] H. J. Baving, H. Muuss, and W. Skolaut, “CW dye laser operation at 200 W pump power,” Applied Physics B 29, 19–21 (1982).
  * [30] R. Lausten and P. Balling, “Thermal lensing in pulsed laser amplifiers: an analytical model,” JOSA B 20, 1479–1485 (2003). Publisher: Optical Society of America.
  * [31] T. A. Planchon, W. Amir, C. Childress, J. A. Squier, and C. G. Durfee, “Measurement of pump-induced transient lensing in a cryogenically-cooled high average power Ti:sapphire amplifier,” Optics Express 16, 18557–18564 (2008). Publisher: Optical Society of America.
  * [32] H. J. Metcalf and P. van der Straten, _Laser Cooling and Trapping_ , Graduate Texts in Contemporary Physics (Springer, New York, NY, 1999).
  * [33] J. Söding, R. Grimm, Y. B. Ovchinnikov, P. Bouyer, and C. Salomon, “Short-Distance Atomic Beam Deceleration with a Stimulated Light Force,” Physical Review Letters 78, 1420–1423 (1997). Publisher: American Physical Society.
  * [34] M. A. Chieda and E. E. Eyler, “Prospects for rapid deceleration of small molecules by optical bichromatic forces,” Physical Review A 84, 063401 (2011). Publisher: American Physical Society.
  * [35] L. Aldridge, S. E. Galica, and E. E. Eyler, “Simulations of the bichromatic force in multilevel systems,” Physical Review A 93, 013419 (2016). Publisher: American Physical Society.
  * [36] Y. Yin, S. Xu, M. Xia, Y. Xia, and J. Yin, “Optically stimulated slowing of polar heavy-atom molecules with a constant beat phase,” Physical Review A 97, 043403 (2018).
  * [37] X. Yang, C. Li, Y. Yin, S. Xu, X. Li, Y. Xia, and J. Yin, “Bichromatic slowing of mgf molecules in multilevel systems,” Journal of Physics B: Atomic, Molecular and Optical Physics 50, 015001 (2016).
  * [38] I. Kozyryev, L. Baum, L. Aldridge, P. Yu, E. E. Eyler, and J. M. Doyle, “Coherent Bichromatic Force Deflection of Molecules,” Phys. Rev. Lett. 120, 063205 (2018).
  * [39] M. D. Di Rosa, “Laser-cooling molecules,” The European Physical Journal D - Atomic, Molecular, Optical and Plasma Physics 31, 395–402 (2004).
  * [40] I. Kozyryev, L. Baum, K. Matsuda, B. L. Augenbraun, L. Anderegg, A. P. Sedlack, and J. M. Doyle, “Sisyphus Laser Cooling of a Polyatomic Molecule,” Physical Review Letters 118, 173201 (2017). Publisher: American Physical Society.
  * [41] E. S. Shuman, J. F. Barry, D. R. Glenn, and D. DeMille, “Radiative Force from Optical Cycling on a Diatomic Molecule,” Physical Review Letters 103, 223001 (2009). Publisher: American Physical Society.
  * [42] E. S. Shuman, J. F. Barry, and D. DeMille, “Laser cooling of a diatomic molecule,” Nature 467, 820–823 (2010). Number: 7317 Publisher: Nature Publishing Group.
  * [43] J. F. Barry, D. J. McCarron, E. B. Norrgard, M. H. Steinecker, and D. DeMille, “Magneto-optical trapping of a diatomic molecule,” Nature 512, 286–289 (2014). Number: 7514 Publisher: Nature Publishing Group.
  * [44] V. Zhelyazkova, A. Cournol, T. E. Wall, A. Matsushima, J. J. Hudson, E. Hinds, M. Tarbutt, and B. Sauer, “Laser cooling and slowing of caf molecules,” Physical Review A 89, 053416 (2014).
  * [45] B. Hemmerling, E. Chae, A. Ravi, L. Anderegg, G. K. Drayna, N. R. Hutzler, A. L. Collopy, J. Ye, W. Ketterle, and J. M. Doyle, “Laser slowing of caf molecules to near the capture velocity of a molecular mot,” Journal of Physics B: Atomic, Molecular and Optical Physics 49, 174001 (2016).
  * [46] M. T. Hummon, M. Yeo, B. K. Stuhl, A. L. Collopy, Y. Xia, and J. Ye, “2d magneto-optical trapping of diatomic molecules,” Physical Review Letters 110, 143001 (2013).
  * [47] L. Baum, N. B. Vilas, C. Hallas, B. L. Augenbraun, S. Raval, D. Mitra, and J. M. Doyle, “1d magneto-optical trap of polyatomic molecules,” Physical Review Letters 124, 133201 (2020).
  * [48] R. Grimm, J. Söding, and Y. B. Ovchinnikov, “Coherent beam splitter for atoms based on a bichromatic standing light wave,” Optics Letters 19, 658–660 (1994). Publisher: Optical Society of America.
  * [49] M. Partlow, X. Miao, J. Bochmann, M. Cashen, and H. Metcalf, “Bichromatic Slowing and Collimation to Make an Intense Helium Beam,” Physical Review Letters 93, 213004 (2004). Publisher: American Physical Society.
  * [50] M. A. Chieda and E. E. Eyler, “Bichromatic slowing of metastable helium,” Phys. Rev. A 86, 053415 (2012).
  * [51] S. E. Galica, L. Aldridge, D. J. McCarron, E. E. Eyler, and P. L. Gould, “Deflection of a molecular beam using the bichromatic stimulated force,” Physical Review A 98, 023408 (2018). Publisher: American Physical Society.
  * [52] K. Wenz, I. Kozyryev, R. L. McNally, L. Aldridge, and T. Zelevinsky, “Large molasses-like cooling forces for molecules using polychromatic optical fields: A theoretical description,” Physical Review Research 2, 043377 (2020). Publisher: American Physical Society.
  * [53] N. R. Hutzler, H.-I. Lu, and J. M. Doyle, “The Buffer Gas Beam: An Intense, Cold, and Slow Source for Atoms and Molecules,” Chemical Reviews 112, 4803–4827 (2012). Publisher: American Chemical Society.


# A Number Representation Systems Library Supporting New Representations Based
on Morris Tapered Floating-point with
Hidden Exponent Bit

Ștefan-Dan Ciocîrlan 1University Politehnica of Bucharest 12National
University of Singapore2 0000-0002-7929-1888
Dumitrel Loghin

22 0000-0002-8965-542X<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

The introduction of posit reopened the debate about the utility of IEEE754 in
specific domains. In this context, we propose a high-level language (Scala)
library that aims to reduce the effort of designing and testing new number
representation systems (NRSs). The library’s efficiency is tested with three
new NRSs derived from Morris Tapered Floating-Point by adding a hidden
exponent bit. We call these NRSs MorrisHEB, MorrisBiasHEB, and MorrisUnaryHEB,
respectively. We show that they offer a better dynamic range, better decimal
accuracy for unary operations, more exact results for addition (37.61% in the
case of MorrisUnaryHEB), and better average decimal accuracy for inexact
results on binary operations than posit and IEEE754. Going through existing
benchmarks in the literature, and favorable/unfavorable examples for
IEEE754/posit, we show that these new NRSs produce similar (less than one
decimal accuracy difference) or even better results than IEEE754 and posit.
Given the entire spectrum of results, there are arguments for MorrisBiasHEB to
be used as a replacement for IEEE754 in general computations. MorrisUnaryHEB
has a more populated “golden zone” (+13.6%) and a better dynamic range (149X)
than posit, making it a candidate for machine learning computations.

###### Keywords:

Number Representation System Tapered Floating Point IEEE754 Posit Computer
Arithmetic

##  1 Introduction

Computers are well-known for their ability to run complex mathematical
operations in a very fast way. To run such operations, the operands need to be
represented in practical ways using the finite resources of modern computers.
For example, numbers cannot be represented with infinite precision in
computers. Multiple number representation systems (NRSs) were created to
simulate the infinite world of mathematics. For the real number computations
(or rational numbers, to be more precise) the IEEE754 standard [1] is the norm
from its introduction in 1985. Only recently, Gustafson et al. [10, 9]
questioned its dominance by proposing new NRSs such as unum and posit.

The introduction of a new NRS, such as posit, produced multiple research work
on its effect on domains such as scientific computing [17, 22], artificial
intelligence [15, 2, 3, 18, 13, 12], digital signal processing [16], and
computer architecture [14, 19, 27, 7, 25]. Previously proposed NRSs such as
Morris Tapered Floating-Point [20] and universal real representation [11] were
revived and re-analyzed. This process of re-analysis and benchmarking is
resource and time-consuming every time a new NRS is introduced.

This article proposes a library with multiple NRS implementations, including
IEEE754, Floating-Point, Morris Tapered Floating-Point, Posit, Rational,
Fractional, and Fixed-Point. In addition, existing benchmarks from the
literature are implemented in this library. The main aim of our library is to
have an easy way for adding a new NRS and test it immediately on already
proposed and well-known benchmarks. This can make the analysis of a new NRS
more efficient and less time-consuming. A secondary aim is to make it easy to
add new benchmarks and make them compatible with all possible NRSs. In this
paper, the library’s efficiency and usage are tested by adding three new NRSs
derived from Morris Tapered Floating-point [20] by using the concept of hidden
exponent bit.

Currently, there are a few libraries that implement NRSs. Some of them support
only one NRS: posit (SoftPosit111https://gitlab.com/cerlane/SoftPosit, Posit
Mathematica Notebook [8], Posit
Octave222https://github.com/diegofgcoelho/positsoctave,
Julia333https://github.com/interplanetary-robot/SigmoidNumbers), high-
precision floating-point (The GNU Multiple Precision Arithmetic
Library444https://gmplib.org/, High Precision Arithmetic
Library555https://www.nongnu.org/hpalib/, Flexfloat [26]). FloPoCo [5] is a
library with floating-point and posits [21], but its scope is to generate
arithmetic cores for FPGAs. These libraries do not offer a high spectrum of
changeable attributes and NRSs. There is a need for a library that lets the
developer change attributes like size, exponent size, fraction size, size of
the exponent size, rounding method, rules for underflow and overflow. The
solution is found in Universal Numbers Library [24, 23] which has multiple
NRSs (minus Morris, plus unum type 1 and 2 and valids), a good set of
benchmarks, a better performance and ways of adding new NRSs. The differences
between our NRS library and Universal Numbers Library are the programming
language (Scala vs. C++) and scope (easy to add and test new NRSs vs.
performance for new NRSs). We believe these two libraries are complementary,
not competitors. Our NRS library can be used for designing and benchmarking
new NRSs. The filtered NRSs can then be implemented for performance in the
Universal Numbers Library.

To show the efficiency of our library, we design and evaluate three new NRSs
based on Morris Tapered Floating-point with a hidden exponent bit. These three
proposed NRSs are denoted by MorrisHEB(n, g, r), MorrisBiasHEB(n, g, r), and
MorrisUnaryHEB(n, r), where $n$ is the size (number of bits), $g$ is a
parameter that dictates the size of the exponent size, and $r$ is the rounding
rule. These NRSs were easily added by using the super-class
TaperedFloatingPoint(size) and then implementing their underflow, overflow,
exponent, and binary representation rules without any effort on mathematical
operations. They are evaluated under characteristics, unary operations, binary
operations, and literature benchmarks, with the following results:

  * •

Better dynamic range than posit and IEEE754.

  * •

MorrisUnaryHEB(16, r) has $13.6\%$ more unique values in the “golden zone”
than Posit(16, 2, r).

  * •

Increased number of unique values compared to the basic Morris tapered
floating-point [20].

  * •

Better decimal accuracy for unary operations.

  * •

More exact results for addition ($37.61\%$ more in the case of
MorrisUnaryHEB(12, RE)).

  * •

Better decimal accuracy for inexact values on binary operations.

To summarize, we make the following contributions in this paper. First, we
design and implement a Scala library that makes it easy to add, test, and
fine-tune number representation systems (NRSs). The library implements a
series of well-known benchmarks from the literature. Secondly, we introduce
three new NRSs based on Morris tapered floating-point, and thirdly, we analyze
these three proposed NRSs together with well-known NRSs such as IEEE 754
floating-point and posit.

The remainder of this paper is structured as follows. The second section
contains the motivation behind, the scope of, and the architecture of the
library. In the third section, a brief on NRSs implemented in the library can
be found together with some decisions taken throughout the development. The
new NRSs definitions can be found in the fourth section. In the fifth section,
we present the evaluation, before concluding in the sixth section.

##  2 Library

The main goal of our NRS library is to be an easy-to-use platform for adding
and testing new NRSs and benchmarks. Figure 1 offers an overview of our
library. In this library, an NRS is equipped with basic arithmetic operations
(addition, subtraction, multiplication, division, exact division, modulo,
power, negate, inverse), logic operations (less, equal, not equal, greater,
greater or equal, less or equal), advanced arithmetic operations (minimum,
maximum, absolute value, signum, $n^{th}$ root, exponential, natural
logarithm, logarithm), trigonometric functions (sin, cos, tan, cot, sec, csc),
inverse trigonometric functions (arcsin, arccos, arctan, arccot, arcsec,
arccsc), hyperbolic functions (sing, cosh, tanh, coth, sech, csch), inverse
hyperbolic functions (arcsinh, arccoh, arctanh, arccoth, arcsech, arccsh),
conversion functions to other NRSs, and viewing functions. All the above
operations are exposed by an NRS interface part of the library. This interface
is inherited by all the NRS implementations.

When adding a new NRS, a developer needs to inherit the NRS interface and
implement all the operations. Some of them have a generic implementation with
Taylor series. Once done, all the benchmarks already implemented by our
library can be run on this new NRS, without writing any additional code. If
the NRS is derived from floating-point or tapered floating-point, the
developer only needs to implement the rules for accepted exponent values,
underflow, overflow, binary representation, and rounding. For adding a new
benchmark, the developer needs to implement the algorithm using the generic
NRS interface and all the past and future NRS implementations will be able to
run it. The rational numbers NRS can be used as a reference, but in some
circumstances, the computation time might be too long given its infinite
precision. In such cases, the fractional numbers NRS is a good alternative.

The benchmark suite implemented in our library contains unary operations,
binary operations, density population of the NRS, and literature benchmarks
(as we shall see in Section 5.4). This makes the life of scientists and
developers much easier. The scientist will only focus on developing a new NRS,
knowing that many existing benchmarks will be able to test it without writing
additional code. Similarly, when adding a new benchmark, all the existing NRS
implementations will automatically work with it.

Developers of custom libraries can use the NRS interface to implement their
specific functions. There is an opportunity for developing libraries for
statistics, artificial intelligence, or digital signal processing. Currently,
there are some statistics and scientific methods implemented in the library.
For a digital signal processing library, the complex construction with all its
operations, FFT and IFFT are already implemented in the NRS Library. With
time, the NRS interface might support more operations, but the current ones
will always remain.

Figure 1: Architecture of the NRS Library

##  3 Number Representation Systems

The library implements the NRSs in Table 1. NaturalNumber influences all the
other NRSs. In the current version of the library, NaturalNumber takes
advantage of Scala.BigInt, improving performance and code readability.
FixedNaturalNumber(n, r) uses NaturalNumber to keep the value. Most of the
operations use NaturalNumber in background and the result is converted such
that it uses exactly $n$ bits. The results that need more bits are considered
Not Representable (NR). IntegerNumber uses NaturalNumber to keep the absolute
value and a boolean variable for the sign. For IntegerNumber, the euclidean
division was chosen because of its mathematical proprieties.
FixedIntegerNumber(n, r) uses IntegerNumber as the value keeper. If the value
is using more bits than the given size, the number becomes NR.

Table 1: NRSs implement by the library

NRS | Description
---|---
NaturalNumber |  infinite precision without rounding natural number system
FixedNaturalNumber(size, r) |  fixed precision with rounding natural number system, where $size$ is the bit-width and $r$ is the type of rounding
IntegerNumber |  infinite precision with no rounding sign-magnitude integer number system
FixedIntegerNumber(size, r) |  fixed precision with rounding integer number system, where $size$ is the bit-width and $r$ is the rounding
RationalNumber |  infinite precision with no rounding fractional system
FractionalNumber(n, m, r) |  fixed precision with rounding fractional system where $n$ is the size of the numerator, $m$ is the size of the denominator, and $r$ is the type of rounding used
FixedPoint($\infty$) |  infinite precision with no rounding fixed point system
FixedPoint(is, fs, r) |  fixed precision with rounding fixed point system, where $is$ represents the integer size, $fs$ is the binary point value (fraction size), and $r$ is the type of rounding used
FloatingPoint($\infty$) |  infinite precision with no rounding floating-point number system
FloatingPoint(fs) |  floating-point system with infinite precision exponent, no rounding, and with $fs+1$ (fraction size) bits of mantissa (most significant bit always set)
FixedFloatingPoint(es, fs, r) |  finite precision with rounding floating-point system, where $es$ is the exponent size (exponent in bias form), $fs$ is the fraction size, and $r$ is the type of rounding
IEEE754(es, fs, r) |  fixed precision with rounding IEEE754 system, where $es$ is the exponent size, $fs$ is the fraction size, and $r$ is the type of rounding
TaperedFloatingPoint(size) |  tapered floating-point system with infinite precision exponent, no rounding, and with $size$ bits of mantissa
Morris(size, g, r) |  fixed precision with rounding Morris tapered floating-point NRS, where $size$ is the bit-width, $g$ is the size of the exponent size, and $r$ is the type of rounding
Posit(size, es, r) |  fixed precision with rounding posit NRS, where $size$ is the bit-width, $es$ is the exponent size, and $r$ is the type of rounding

The problem with the fractional system is that it can overflow easy and there
are multiple ways to represent the same value. The advantage of the fractional
system is that it can represent the entire rational number set $\mathbb{Q}$ in
infinite precision. The overflow problem has a partial solution in doing the
greater common divisor of the numerator and denominator and dividing both by
its value. This solution does not solve the entire problem and adds
considerable computation time. An extension of FractionalNumber(n, m, r)
proposed to solve the overflow problem is to divide by two (shifting right by
one) both the numerator and denominator when one of them is out of the given
size. FractionalNumber(n, m, r) uses RationalNumber to keep its value.

Fixed point representation is similar to 2’s complement integer NRS, but it
has an attribute called binary point. In a simple way, the value given by the
2’s complement integer NRS is divided by two to the power of the value of the
binary point. This system has an overflow and underflow problem. Its range of
values is smaller than an integer NRS. FixedPoint($\infty$) keeps its value as
a RationalNumber. The only requirement for this NRS is that the denominator
needs to be a power of two. FixedPoint(is, fs, r) takes another approach by
keeping its value as an IntegerNumber.

In a floating-point system, a number is represented as $(-1)^{sign}\times
2^{exponent}\times 1.f$. In infinite precision, $1.f$ can be seen as a
FixedPoint($\infty$) with values inside the $[1,2)$ interval. The first bit
represents the sign of the number, the next $es$ (exponent size) bits
represent the exponent (usually as a bias integer NRS) and the remaining $fs$
(fraction size) bits represent the fraction bits (usually, there is a hidden
bit with the value $1$ which is the most significant bit). The value is given
by $(-1)^{sign}\times 2^{exponent}\times(1+\frac{f}{2^{fs}})$, where $f$
represents the value of the fraction bits without the hidden bit. A problem
with the floating-point system is that $0$ cannot be represented. A solution
to this is that when all bits except the sign bit are $0$, the number is $0$.
This creates the problem of having both $+0$ and $-0$. Given its infinite
precision, FloatingPoint($\infty$) does not have the concept of $\infty$.
FloatingPoint(fs) incorporates the concept of $+\infty$ and $-\infty$. Other
NRSs are derived from it, with different rules for the range of the exponent,
underflow, overflow, rounding, and binary representation. One of these NRSs is
FixedFloatingPoint(es, fs, r). FixedFloatingPoint(es, fs, r) rules are: (i) in
the case of underflow, the value is round to zero when the exponent is smaller
than the minimum exponent and the rounding rule does not change this, (ii) in
the case of overflow, the value goes to $\infty$ if the exponent value is
greater than the maximum exponent, (iii) the exponent is in bias form. To
represent $\infty$, all the bits except the sign bit are $1$.

The second floating-point system is the standard called IEEE754 [28]. This NRS
introduces special cases for the smallest and biggest exponent values. When
the exponent has the minimum value, the hidden bit is zero and the numbers are
called subnormals, except for $+0$ and $-0$. The value of subnormals is given
by $(-1)^{sign}\times 2^{\text{-bias}+1}\times(0+\frac{f}{2^{fs}})$, and the
process is called gradual underflow. For maximum exponent value, different bit
strings for fraction and sign bit can represent qNaN (quiet Not A Number –
where the first bit of the fraction is 1), sNaN (signal NaN – where the first
bit of the fraction is 0, but there is another bit in the fraction different
from 0), $+\infty$ (all fraction bits are 0), and $-\infty$ (the same as
$+\infty$, only that the sign is negative).

In our library, FloatingPoint(fs) does not have a binary representation, but
it is used for implementing other NRSs. It is a super-class NRS. It has a
boolean value for the sign, an IntegerNumber exponent, a NaturalNumber
mantissa, some bits used for rounding and the fraction size value. It
implements all the operations with the scope of having a mantissa in the range
$[1,2)$ by making sure that every operation produces at least $fs+1$ bits of
mantissa with the most significant one having the value $1$, except for the
case when the result is $+0$ or $-0$ and the mantissa is $0$. All the
additional bits produced by the operation are appended to a rest bits list.
This super-class is used further by FixedFloatingPoint(es, fs, r) and
IEEE754(es, fs, r). FixedFloatingPoint(es, fs, r) and IEEE754(es, fs, r) are
doing the operations using FloatingPoint(fs) and then verifying the results
with their rules for underflow, overflow, and binary representation.
Specifically, in the case of IEEE754(es, fs, r), if the exponent is smaller or
equal compared to the minimum exponent value the number might be a subnormal
number. This is tested by the difference between the subnormal exponent and
the exponent value. If it is not a subnormal number, it underflows to $0$.

Beside issues such as multiple representations for zero, subnormal numbers,
and too many bit representations for NaN, IEEE754 might have an oversized or
undersized exponent for a given problem. Morris observed this and introduced
tapered floating-point [20], adding an extra field representing the exponent
size. This means that the exponent size and the fraction size are dynamically
computed. A Morris floating-point system is determined by the bit-width and
the size of the exponent size denoted by $g$. The first $g$ bits represent the
$G$ value which is used to compute the exponent size as $es=G+1$. The next bit
is the exponent sign bit followed by $es$ bits that represent the absolute
value of the exponent. The next bit is the fraction sign, and the remaining
bits are considered the fraction bits. The hidden bit is always $1$. The final
value is computed as $2^{\textit{exponent}}\times(-1)^{\textit{fraction
sign}}\times(1+\frac{f}{2^{fs}})$, where
$\textit{exponent}=(-1)^{\textit{exponent
sign}}\times\textit{exponentBinaryValue}$ and exponentBinaryValue is a natural
number, not in bias form. Zero is represented by all bits $0$ and error cases
(NaN) are represented when all the bits are $1$. Small numbers have a better
precision because more fraction bits are allocated to represent them. In most
cases, the dynamic range of a Morris NRS is bigger compared to IEEE754 of the
same size, for the obvious reason that more bits can be used for the exponent.
However, these NRSs still have the issue of multiple representations for the
same value.

Similar to FloatingPoint(fs), we created TaperedFloatingPoint(size) in our
library to help with implementing all the operations for tapered floating-
point NRSs. In this case, the fraction size is not known so the system uses
the bit-width as the exact fraction size. The fraction is in the range $[1,2)$
and it has a hidden bit with value $1$. The TaperedFloatingPoint(size) NRS
does not contain $\infty$. Every NRS derived from it needs to add rules for
underflow, overflow, rounding, and binary representation.

In trying to solve the problems of current floating-point systems, Gustafson
proposed posit [10] (which is another type of TaperedFloatingPoint(size)). A
posit NRS is determined by its total size and exponent size ($es$). The first
bit in a posit s-layer representation is the sign bit. The concept for
negative numbers is similar to 2’s complement: all the bits are negated, and
one is added to the value. Next, it is the regime field which is dynamic and
uses unary arithmetic representation. If the regime starts with a bit $1$,
then it is a positive regime and the consecutive $1$s are counted until a $0$
is found or the end of the representation is reached. The value of the regime
is $\text{NoC1}-1$, where NoC1 is number of consecutive $1$s. Otherwise, if
the regime starts with a $0$, then it is a negative regime and the consecutive
$0$s are counted until the first bit of $1$ is found or the end of the
representation is reached. The regime value in this case is
$-1\times\textit{NoC0}$, where NoC0 is the number of consecutive $0$s. After
the regime bits, the next exponent size ($es$) bits represent the exponent
value in a base 2 natural number NRS, and the remaining bits are considered
fraction bits. The hidden bit is always $1$. The final value of a posit is
given by $(-1)^{\textit{sign}}\times 2^{\textit{regime}\times
2^{es}+\textit{exponentBinaryValue}}\times(1+\frac{f}{2^{fs}})$. There are two
special cases: for zero, when all the bits are $0$, and for $NaR$ (Not a Real
– positive infinity and negative infinity), when first bit is $1$ and the
others are $0$. Posit solves the problem of a value having multiple
representations. This is a strong propriety for an NRS. Like Morris tapered
floating-point system, posit has better precision for small number creating a
posit “golden zone” where all the operations have a better accuracy than other
NRSs. In our library, Posit(n, es, r) underflows to the minimum value that is
not $0$ and overflows to the maximum value but not $\infty$. In contrast,
Morris(n, g, r) underflows to $0$ and overflows to NR.

##  4 New NRS Based on Moris Tapered Floating-point

In this section, we introduce the three new representations based on Morris
tapered floating-point with a hidden exponent bit.

###  4.1 MorrisHEB(size, g, r)

The tapered floating-point introduced by Morris in [20] seems a good concept.
Its utilization was shown under the posit system proposed by Gustafson [10].
The major problem is the multiple ways of representing the same number. A
solution for this is in borrowing the concept of hidden bit from mantissa. The
$g$ field not only represents the $G$ value which dictates the exponent size
but also the position of the most significant bit set in the exponent. If the
value of the exponent size is kept as $G+1$, then the minimum absolute value
of the exponent is 2 when $G=0$. The exponent value is
$\textit{exponent}=\textit{exponent sign}\times((1\ll
es)+\textit{binaryExponent})$. There is a need for having zero as exponent
value. A solution for this is to change the formula for exponent size to
$es=G-1$. The exponent is now:

$\text{exponent}=\begin{cases}(-1)^{\text{exponent
sign}}\times(2^{es}+\text{binaryExponent}),&es\neq-1\\\ 0,&es=-1.\end{cases}$
(1)

This NRS is called MorrisHEB(size, g, r).

The next formula is used for computing the value of all the three new NRSs
binary representations presented in this section:

$\text{value}=\begin{cases}0,&\text{all bits 0}\\\ \text{NR},&\text{first bit
1 and the rest 0s}\\\ (-1)^{\text{sign}}\times
2^{\text{exponent}}\times(1+\frac{\text{f}}{2^{\text{fs}}}),&\text{otherwise}\\\
\end{cases}$ (2)

The differences are in the way $es$ and $exponent$ are computed.
MorrisHEB(size, g, r) underflows to $0$, overflows to NR, and uses
TaperedFloatingPoint(size) for implementing the operations.

The binary representation starts with the sign bit. The next $g$ bits
represent the $G$ value in natural base 2 format. The exponent sign bit
follows the $g$ field. The next $e$ bits ($es=G-1$) or the next remaining bits
(whichever is smaller) represent the binary exponent value in natural base 2
format. If $es$ is grater than the remaining bits, the remaining bits
represent the most significant bits of the binary exponent value. Te remaining
least significant bits of the binary exponent value will be considered $0$.
After taking the exponent bits, the remaining bits are fraction bits and their
count represents the fraction size. In summary, the binary format is:

${\color[rgb]{1,0,0}s_{f}}{\color[rgb]{0,0,1}G\textsubscript{g-1}G\textsubscript{g-2}...G\textsubscript{0}}{\color[rgb]{.75,.5,.25}s_{e}}{\color[rgb]{.75,.5,.25}e\textsubscript{es-1}e\textsubscript{es-2}...e\textsubscript{0}}{\color[rgb]{1,.5,0}f\textsubscript{fs-1}f\textsubscript{fs-2}...f\textsubscript{0}}$
(3)

###  4.2 MorrisBiasHEB(size, g, r)

One might argue that the problem of multiple representations is still not
solved because even the exponent may have multiple values (for $es=-1$ the
exponent sign does not matter). The problem stems from having a bit dedicated
to the exponent sign. This is already solved in IEEE754 by using a bias value.
A bias value $g$ is proposed. The exponent sign is the sign of $G$ and the
exponent size is $es=|G|-1$. Another issue with Morris and MorrisHEB
representations is that they do not have an order in binary form. A solution
for this is to have the bits of the exponent negated when $G$ is negative.
This makes it easy to implement a hardware compare unit. The NRS with these
features is called MorrisBiasHEB(size, g, r), where the exponent is:

$\text{exponent}=\begin{cases}\text{signum(G)}\times(2^{es}+\text{binaryExponent}),&es\neq-1\\\
0,&es=-1.\end{cases}$ (4)

MorrisBiasHEB(size, g, r) underflows to $0$, overflows to NR, and uses
TaperedFloatingPoint(size) for implementing the operations. The binary
representation starts with the sign bit. The next $g$ bits represent the $G$
value in bias format with $\textit{bias}=2^{g-1}-1$. This means that
$G=\textit{binary G}-\textit{bias}$. The next $es$ bits ($es=|G|-1$) or the
next remaining bits (whichever is smaller) represent the exponent in natural
base 2 format, if the signum(G) is $1$. Otherwise, they need to be negated an
the results is the binary exponent value. If $es$ is grater than the number of
the remaining bits, the remaining bits represent the most significant bits of
the binary exponent value. The remaining least significant bits of the binary
exponent value are considered $0$. After taking the exponent bits, the
remaining bits are fraction bits and their count is the fraction size. In
summary, the binary format is:

${\color[rgb]{1,0,0}s}{\color[rgb]{0,0,1}G\textsubscript{g-1}G\textsubscript{g-2}...G\textsubscript{0}}{\color[rgb]{.75,.5,.25}e\textsubscript{es-1}e\textsubscript{es-2}...e\textsubscript{0}}{\color[rgb]{1,.5,0}f\textsubscript{fs-1}f\textsubscript{fs-2}...f\textsubscript{0}}$
(5)

###  4.3 MorrisUnaryHEB(size, r)

Can MorrisBiasHEB(size, g, r) be further improved? From the last standard of
posit [10], we are inspired by the choice for fixing the exponent size to make
it dependent only on the size and making the conversion between different
sizes easier. This can be adapted using an unary representation for the $g$
value (similar to the regime in posit). There is also a need for the exponent
size value of $-1$, so the formula for the exponent size is:

$\text{exponent size}=\begin{cases}-k-1,&k<0\\\ k-1,&k\geq 0.\end{cases}$ (6)

where $k$ is the regime.

MorrisUnaryHEB(size, r) underflows to $0$, overflows to NR, and uses
TaperedFloatingPoint(size) for implementing its operations. The binary
representation starts with the sign bit. The next bit represents the first
regime bit $r_{0}$. The next consecutive bits with the same value as $r_{0}$
are considered regime bits. The next bit after them, if it exists, has the
negated value of $r_{0}$ and it is also considered as part of the regime. The
regime $k$ is computed as:

$k=\begin{cases}-\text{NoC0},&r_{0}=0\\\ \text{NoC1}-1,&r_{0}=1.\end{cases}$
(7)

The next $es$ bits or the next remaining bits (whichever is smaller) represent
the exponent value in natural base 2 format, if the signum(k) is $1$.
Otherwise, they need to be negated and the result is the binary exponent
value. If $es$ is grater than the remaining bits, the remaining bits represent
the most significant bits of the binary exponent value. The remaining least
significant bits of the binary exponent value are considered $0$. The exponent
is computed as:

$\text{exponent}=\begin{cases}\text{signum(k)}\times(2^{es}+\text{binaryExponent}),&es\neq-1\\\
0,&es=-1.\end{cases}$ (8)

After taking the exponent bits, the remaining bits are fraction bits and their
count is the fraction size. In summary, the binary format of
MorrisUnaryHEB(size, r) is:

${\color[rgb]{1,0,0}s}{\color[rgb]{0,0,1}r\textsubscript{0}r\textsubscript{1}...r\textsubscript{rs-2}\overline{r\textsubscript{rs-1}}}{\color[rgb]{.75,.5,.25}e\textsubscript{es-1}e\textsubscript{es-2}...e\textsubscript{0}}{\color[rgb]{1,.5,0}f\textsubscript{fs-1}f\textsubscript{fs-2}...f\textsubscript{0}}$
(9)

##  5 Evaluation

In this section, we evaluate the three new proposed NRSs in addition to well-
know NRSs from the literature. In the first subsection, we present the NRSs
under evaluation and their characteristics such as minimum absolute value,
maximum absolute value, dynamic range, and density of numbers in logarithmic
scale. The second subsection presents the decimal accuracy of the unary
operations for the tested NRSs with CDF graphs. In the third subsection, the
color maps of binary operations are presented. The last subsection goes
through some famous literature benchmarks. The next notation are used for
rounding in this section: RZ for rounding towards zero and RE for rounding to
the nearest tie to even. The values presented in this section are usually
truncated to three decimals after the decimal point.

###  5.1 NRSs Under Evaluation and Their Characteristics

Table 2 presents the NRSs under evaluation with their minimum absolute value,
maximum absolute value, and dynamic range when the total size is 16 bits. We
compare the three new NRSs based on Morris tapered format with hidden exponent
bit with the default Morris representation, fixed point, fixed floating point,
IEEE754, and posit.

Table 2: 16-bit NRSs Dynamic Range

NRS | Min(abs(X)) | Max(abs(X))/$1^{st}$ | Dynamic Range | $2^{nd}$ | $3^{rd}$
---|---|---|---|---|---
FixedFloatingPoint(5, 10, RE) | $3.054\times 10^{-4}$ | $130944$ | $9.6322$ | $130880$ | $130816$
FixedPoint(8, 8, RE) | $0.003$ | $127.996$ | $4.515$ | $127.992$ | $127.988$
half-IEEE754/IEEE754(5, 10, RE) | $5.960\times 10^{-8}$ | $65504$ | $12.040$ | $65472$ | $65440$
Posit(16, 2, RE) | $1.387\times 10^{-17}$ | $72.057\times 10^{15}$ | $33.715$ | $45.035\times 10^{14}$ | $11.258\times 10^{14}$
Morris(16, 4, RZ) | $9.207\times 10^{-19710}$ | $1.086\times 10^{19709}$ | $39418.071$ | $5.887\times 10^{19689}$ | $3.191\times 10^{19670}$
MorrisHEB(16, 4, RZ) | $4.630\times 10^{-9860}$ | $2.159\times 10^{9859}$ | $19718.668$ | $3.295\times 10^{9854}$ | $5.028\times 10^{9849}$
MorrisBiasHEB(16, 4, RE) | $6.061\times 10^{-39}$ | $1.121\times 10^{77}$ | $115.267$ | $1.085\times 10^{77}$ | $1.049\times 10^{77}$
MorrisUnaryHEB(16, RE) | $9.168\times 10^{-2467}$ | $1.090\times 10^{2466}$ | $4932.075$ | $1.044\times 10^{1233}$ | $5.809\times 10^{924}$

Figure 2: Distribution of unique absolute values

Tapered floating-point NRSs have a higher dynamic range and can represent
higher and lower absolute values compared to IEEE754 and fixed point. On the
other hand, the difference between consecutive values may be one order of
magnitude. Figure 2 presents the count of unique absolute values for 16-bit
NRSs on a logarithmic scale. The added value of the hidden exponent bit can be
seen in the increased count of numbers for Morris-derived NRSs. An interesting
result is the MorrisUnaryHEB(16, RE) “golden zone”: it has 30,201 unique
absolute values in the interval $(10^{-3},10^{3})$ versus 26,587 for Posit(16,
2, RE). This, together with the higher dynamic range, makes it a good
competitor for posit in deep neural networks. We shall evaluate this in a
future work.

The difference between the underflow and overflow rules of IEEE754(es, fs, r)
and FixedFloatingPoint(es, fs, r) can be seen in the gradual underflow for
IEEE754(es, fs, r) and the additional higher values for FixedFloatingPoint(es,
fs, r). The usage of a positive regime value for zero can be seen in the
unequal distribution of the values of MorrisUnaryHEB(16, RE) and Posit(16, 2,
RE) in Figure 2.

###  5.2 Unary Operations

Figure 3: CDF of Unary Operations

Figure 3 presents the CDF of decimal accuracy for the square root, natural
logarithm, inverse, exponential, sinus, and cube root operations. The x-axis
represents how many accurate digits are there in the result. For all the
Taylor series functions ($\ln(x),\sin(x),e^{x}$), the decimal accuracy
reference is the RationalNumber result after 30 iterations. For a decimal
accuracy of at least three digits, MorrisUnaryHEB(16, RE) is the best NRS.
This is because of its unique absolute values. Note that the exponential is
the only function that increases the magnitude of the result.

###  5.3 Binary Operations

For binary operations, 12 bits NRSs were chosen because 8 bits hold too little
information and 16 bits take too much storage space to keep all the values. We
present the results as color maps, where black represents an accuracy of 10 or
more digits, while white represents zero or less.

Figure 4: Color Maps for Addition Figure 5: Color Maps for Multiplication

The color map of addition is presented in Figure 4. The subtraction is similar
to addition. This plot beautifully shows why FixedPoint(is, es, r) is the
perfect NRS for accumulators if the range of the results is known. The white
color space represents the overflow area for positive and negative values. The
similarities between FixedFloatingPoint(es, fs, r) and IEEE754(es, fs, r) are
obvious, but one can also observe the effect of the gradual underflow in
IEEE754(es, fs, r). The black border and the plus lines for IEEE754(es, fs, r)
represent NaNs (NaN plus anything else results in a NaN).

The maps for Morris(size, g, r) and MorrisHEB(size, g, r) are different from
the other maps because the binary representations do not represent ordered
values. MorrisBiasHEB(size, g, r) looks like a mixed between
FixedFloatingPoint(es, fs, r) and Posit(size, es, r): it exhibits tapered
floating-point features by having an inverse proportional relationship between
accuracy and absolute values. That is, when the absolute values of the
operands increase, the decimal accuracy decreases. Posit(size, es, r) has a
more uniform distribution of the accuracy. Note that Posit(size, es, r) does
not use sign magnitude but uses 2’s complement for negative numbers so its map
symmetry is different from the other maps.

Table 3: Binary Operations (ADD,DIV,MUL) Results

NRS | Exact | Average Accuracy | Kops
---|---|---|---
ADD | DIV | MUL | ADD | DIV | MUL | ADD | DIV | MUL
FixedFloatingPoint(4, 7, RE) | $16.4\%$ | $2.4\%$ | $2.2\%$ | $3.3$ | $2.4$ | $2.4$ | $191$ | $374$ | $278$
FixedPoint(6, 6, RE) | $75.0\%$ | $0.9\%$ | $0.9\%$ | $0.0$ | $2.8$ | $0.5$ | $6535$ | $2551$ | $4117$
IEEE754(4, 7, RE) ($12.1\%$ NaNs) | $28.6\%$ | $14.3\%$ | $14.4\%$ | $3.2$ | $2.7$ | $2.7$ | $362$ | $370$ | $326$
Posit(12, 2, RE) | $12.4\%$ | $4.2\%$ | $4.2\%$ | $2.8$ | $4.0$ | $2.8$ | $150$ | $206$ | $253$
Morris(12, 3, RZ) | $20.9\%$ | $22.1\%$ | $26.4\%$ | $4.9$ | $1.5$ | $1.5$ | $145$ | $256$ | $347$
MorrisHEB(12, 3, RZ) | $14.2\%$ | $8.9\%$ | $8.8\%$ | $5.4$ | $1.9$ | $1.8$ | $185$ | $301$ | $385$
MorrisBiasHEB(12, 3, RE) | $20.2\%$ | $2.2\%$ | $2.2\%$ | $3.4$ | $2.7$ | $2.9$ | $148$ | $221$ | $261$
MorrisUnaryHEB(12, RE) | $37.6\%$ | $1.9\%$ | $1.9\%$ | $4.2$ | $3.0$ | $3.0$ | $142$ | $219$ | $263$

The results of decimal accuracy for multiplication are presented in Figure 5.
The overflow problem of FixedPoint(is, es, r) is obvious, while gradual
underflow helps IEEE754(es, fs, r). The black borders of IEEE754(es, fs, r)
are from the NaN values. MorrisUnaryHEB(size, r), Posit(size, es, r), and
MorrisBiasHEB(size, g, r) exhibit their tapered floating-point proprieties in
waves (or bands) of accuracy. Comparing MorrisUnaryHEB(size, r) and
Posit(size, es, r), the rule for underflow can be observed as the white band
in the color map of MorrisUnaryHEB(size, r). These results suggest that the
Posit(size, es, r) rule for underflow might be the best one to be implemented
in an NRS. The results of decimal accuracy for division are similar to the
ones for multiplication and are omitted due to space constraints.

Table 3 presents the percentage of exact results, the average decimal accuracy
for inexact results, and the number of (thousands) operations per second
(Kops). From IEEE754(4, 7, RE), one should remove $12.1\%$ of the results
because they represent NaNs. The interesting results in Table 3 are: (i) the
high number of exact results for MorrisUnaryHEB(12, RE), (ii) the relatively
good average decimal accuracy on inexact results for MorrisUnaryHEB(12, RE)
and MorrisBiasHEB(12, 3, RE) on all operations, and (iii) the relatively low
percentage of exact results for Posit(12, 2, RE) (this is because of the
increased exponent size).

###  5.4 Literature Benchmarks

In Table 4, we summarize the results of the evaluations proposed by Gustafson
in [9]. The proposed evaluations are:

  * •

John Wallis Product: $2\times\prod_{i=1}^{n}\frac{(2\times i)^{2}}{(2\times
i-1)\times(2\times i+1)}$ for $n=30$,

  * •

Kahan series: $u_{i+2}=111-\frac{1130}{u_{i+1}}+\frac{3000}{u_{i}\times
u_{i+1}}$ for $u_{30}$,

  * •

Jean Micheal Muller:
$E(0)=1,E(z)=\frac{e^{z}-1}{z},Q(x)=|x-\sqrt{x^{2}+1}|-\frac{1}{x+\sqrt{x^{2}+1}},H(x)=E((Q(x))^{2})$
for $H(15),H(16),H(17),H(9999)$,

  * •

Siegfried Rump: $333.74\times y^{6}+x^{2}\times(11\times x^{2}\times
y^{2}-y^{6}-121\times y^{4}-2)+5.5\times y^{8}+\frac{x}{2\times y}$ for
$x=77517$ and $y=33096$,

  * •

Decimal accuracy for $r_{1}$ from Quadratic formula for $a=3,b=100,c=2$,

  * •

David Bailey’s system of equations: $0.25510582\times x+0.52746197\times
y=0.79981812,0.80143857\times x+1.65707065\times y=2.51270273$ solved with
Cramer’s rule.

Note that none of the NRSs passes all the evaluations. The problem is with the
limitations of finite representations.

Table 4: Benchmarks in [9]

NRS | John Wallis | Kahan $u_{30}$ | Jean Micheal Muller | Siegfried Rump |  $r_{1}$ DA | David Bailey
---|---|---|---|---|---|---
32-bit NRSs
FixedFloatingPoint(8, 23, RE) | $3.091$ | $100$ | $(0,0,0,0)$ | $-63.382\times 10^{28}$ | $5.612$ | $(NR,NR)$
FixedPoint(16, 16, RE) | $3.091$ | $100$ | $(1,1,1,NR)$ | $NR$ | $3.787$ | $(NR,NR)$
IEEE754(8, 23, RE) | $3.091$ | $100$ | $(0,0,0,0)$ | $-1.901\times 10^{30}$ | $5.612$ | $(NR,NR)$
Posit(32, 2, RE) | $3.091$ | $100$ | $(0,0,0,0)$ | $1.172$ | $5.996$ | $(-4,2)$
Morris(32, 4, RZ) | $3.091$ | $99.999$ | $(0,0,0,0.995)$ | $20.282\times 10^{30}$ | $4.599$ | $(0,1)$
MorrisHEB(32, 4, RZ) | $3.091$ | $99.999$ | $(0,0,0,0.989)$ | $15.211\times 10^{30}$ | $4.945$ | $(2,1)$
MorrisBiasHEB(32, 4, RE) | $3.091$ | $100$ | $(0,0,0,0)$ | $-25.353\times 10^{29}$ | $5.612$ | $(1,0.5)$
MorrisUnaryHEB(32, RE) | $3.091$ | $100$ | $(0,0,0,0.999)$ | $1.172$ | $5.612$ | $(2,0)$
RationalNumber | $3.091$ | $6.004$ | $(1,1,1,1)$ | $-0.827$ | $1$ | $(-1,2)$

In Table 5, we present the results of multiple benchmarks from the literature
[4, 6, 10]. These benchmarks are:

  * •

thin triangle area for $a=7,c=b=\frac{7+2^{-25}}{2}$,

  * •

the formula $x=(\frac{27/10-e}{\pi-(\sqrt{2}+\sqrt{3})})^{67/16}$,

  * •

the fraction $\frac{x^{n}}{n!}$ for $x=7,n=20$ and $x=25,n=30$,

  * •

Planck constant $h=6.626070150\times 10^{-34}$,

  * •

Avogadro number $L=6.02214076\times 10^{23}$,

  * •

speed of light $c=299792458$,

  * •

charge of $\overline{e}1.602176634\times 10^{-19}$,

  * •

Boltzmann constant $k=1.380649\times 10^{-23}$.

The values in Table 5 represent the decimal accuracy of the results compared
to the correct result. The first two benchmarks are favorable to Posit(size,
es, r) while the last six are favorable to IEEE754(es, fs, r). Morris and its
derived NRSs exhibit results that are close to the best NRS for each
benchmark. MorrisBiasHEB(size, g, r) has good results for the entire spectrum
of benchmarks.

Table 5: Other Literature Benchmarks [4, 6, 10]

NRS | Thin Triangle | $x$ | $\frac{x^{n}}{n!}$ | Planck | L | c | $\overline{e}$ | k
---|---|---|---|---|---|---|---|---
32-bit NRSs
FixedPoint(16, 16, RE) | $0$ | $2.289$ | $(0,0)$ | $0$ | $0$ | $0$ | $0$ | $0$
IEEE754(8, 23, RE) | $0$ | $4.370$ | $(7.135,0)$ | $8.727$ | $8.075$ | $7.839$ | $8.004$ | $7.782$
Posit(32, 2, RE) | $1.204$ | $5.684$ | $(4.339,0)$ | $0.627$ | $4.091$ | $6.969$ | $4.213$ | $4.037$
Morris(32, 4, RZ) | $0$ | $5.101$ | $(6.016,5.604)$ | $6.347$ | $6.429$ | $6.969$ | $7.347$ | $6.480$
MorrisHEB(32, 4, RZ) | $0$ | $5.098$ | $(6.245,6.188)$ | $6.680$ | $6.784$ | $7.839$ | $7.347$ | $6.480$
MorrisBiasHEB(32, 4, RE) | $0$ | $5.682$ | $(6.911,8.619)$ | $7.053$ | $7.219$ | $7.839$ | $7.347$ | $6.878$
MorrisUnaryHEB(32, RE) | $0$ | $6.875$ | $(6.017,5.289)$ | $6.031$ | $5.919$ | $6.969$ | $7.347$ | $5.566$

##  6 Conclusion

In this paper, (i) we presented a Scala library that makes it easy to add,
test, and fine-tune number representation systems (NRSs), (ii) we introduced
three new NRSs based on Morris tapered floating-point, and (iii) we analyzed
these three proposed NRSs together with well-known NRSs such as IEEE 754
floating-point and posit.

By adding the hidden exponent bit to Morris tapered floating-point in three
different forms, the resulting NRSs became competitors for IEEE754 and posit.
MorrisBiasHEB(size, g, r) exhibits the best results on literature benchmarks
on 32 and 64 bits when compared to the other NRSs. On the other hand,
MorrisUnaryHEB(size, r) is a great candidate for machine learning computations
due to its “golden zone” population, dynamic range, percent of exact results
on addition and average decimal accuracy for inexact results on
multiplication.

Our library exhibits a performance of around 200 Kops which is good enough for
testing and evaluating NRSs, but not enough for real-world applications. In
future works, the library will be integrated with the Aparapi
library666https://aparapi.com/ and tested on GPU, and used for machine
learning models with Spark. We also plan to increase the number of benchmarks.

## Acknowledgment

Ștefan-Dan Ciocîrlan is partly supported by the Bitdefender’s University PhD
Grants Program 2019-2022 and by the Google IoT/Wearables Student Grants 2022.
Dumitrel Loghin is partly supported by the Ministry of Education of
Singapore’s Academic Research Fund Tier 1 (grant 251RES2106).

## References

  * [1] Ieee standard for floating-point arithmetic. IEEE Std 754-2019 (Revision of IEEE 754-2008) pp. 1–84 (2019). https://doi.org/10.1109/IEEESTD.2019.8766229
  * [2] Carmichael, Z., Langroudi, H.F., Khazanov, C., Lillie, J., Gustafson, J.L., Kudithipudi, D.: Deep positron: A deep neural network using the posit number system. In: Design, Automation & Test in Europe Conference & Exhibition (DATE). pp. 1421–1426 (2019)
  * [3] Carmichael, Z., Langroudi, H.F., Khazanov, C., Lillie, J., Gustafson, J.L., Kudithipudi, D.: Performance-efficiency trade-off of low-precision numerical formats in deep neural networks. In: Proceedings of the Conference for Next Generation Arithmetic. pp. 1–9 (2019)
  * [4] De Dinechin, F., Forget, L., Muller, J.M., Uguen, Y.: Posits: the good, the bad and the ugly. In: Proceedings of the Conference for Next Generation Arithmetic. pp. 1–10 (2019)
  * [5] De Dinechin, F., Pasca, B.: Designing custom arithmetic data paths with flopoco. IEEE Design & Test of Computers 28(4), 18–27 (2011)
  * [6] Goldberg, D.: What every computer scientist should know about floating-point arithmetic. ACM Computing Surveys (CSUR) 23(1), 5–48 (1991)
  * [7] Guntoro, A., De La Parra, C., Merchant, F., De Dinechin, F., Gustafson, J.L., Langhammer, M., Leupers, R., Nambiar, S.: Next generation arithmetic for edge computing. In: Design, Automation & Test in Europe Conference & Exhibition (DATE). pp. 1357–1365 (2020)
  * [8] Gustafson, J.: Posit arithmetic. Mathematica Notebook describing the posit number system 30 (2017)
  * [9] Gustafson, J.L.: The end of error: Unum computing. Chapman and Hall/CRC (2017)
  * [10] Gustafson, J.L., Yonemoto, I.T.: Beating floating point at its own game: Posit arithmetic. Supercomputing Frontiers and Innovations 4(2), 71–86 (2017)
  * [11] Hamada, H.: Urr: Universal representation of real numbers. New Generation Computing 1(2), 205–209 (1983)
  * [12] Ho, N.M., De Silva, H., Gustafson, J.L., Wong, W.F.: Qtorch+: Next generation arithmetic for pytorch machine learning. In: Proceedings of the Conference on Next Generation Arithmetic. pp. 31–49 (2022)
  * [13] Ho, N.M., Nguyen, D.T., De Silva, H., Gustafson, J.L., Wong, W.F., Chang, I.J.: Posit arithmetic for the training and deployment of generative adversarial networks. In: Design, Automation & Test in Europe Conference & Exhibition (DATE). pp. 1350–1355 (2021)
  * [14] Jaiswal, M.K., So, H.K.H.: Pacogen: A hardware posit arithmetic core generator. IEEE Access 7, 74586–74601 (2019)
  * [15] Johnson, J.: Rethinking floating point for deep learning. arXiv preprint arXiv:1811.01721 (2018)
  * [16] Kant, M., Thakur, R.: Implementation and performance improvement of posit multiplier for advance dsp applications. In: Proceedings of the Fifth International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud)(I-SMAC). pp. 1730–1736 (2021)
  * [17] Klöwer, M., Düben, P.D., Palmer, T.N.: Posits as an alternative to floats for weather and climate models. In: Proceedings of the Conference for Next Generation Arithmetic 2019. pp. 1–8 (2019)
  * [18] Langroudi, S.H.F., Pandit, T., Kudithipudi, D.: Deep learning inference on embedded devices: Fixed-point vs posit. In: 1st Workshop on Energy Efficient Machine Learning and Cognitive Computing for Embedded Applications (EMC2). pp. 19–23 (2018)
  * [19] Lehóczky, Z., Retzler, A., Tóth, R., Szabó, Á., Farkas, B., Somogyi, K.: High-level. net software implementations of unum type i and posit with simultaneous fpga implementation using hastlayer. In: Proceedings of the Conference for Next Generation Arithmetic. pp. 1–7 (2018)
  * [20] Morris, R.: Tapered floating point: A new floating-point representation. IEEE Transactions on Computers 100(12), 1578–1579 (1971)
  * [21] Murillo, R., Del Barrio, A.A., Botella, G.: Customized posit adders and multipliers using the FloPoCo core generator. In: IEEE International Symposium on Circuits and Systems (ISCAS) (2020)
  * [22] Nolander, C., Strömdahl, A.: A comparative study on the accuracy of ieee-754 and posit for n-body simulations (2021)
  * [23] Omtzigt, E.T.L., Gottschling, P., Seligman, M., Zorn, W.: Universal Numbers Library: design and implementation of a high-performance reproducible number systems library. arXiv:2012.11011 (2020)
  * [24] Omtzigt, E.T.L., Quinlan, J.: Universal: Reliable, reproducible, and energy-efficient numerics. In: Proceedings of the Conference on Next Generation Arithmetic. pp. 100–116. Springer (2022)
  * [25] Sharma, N., Jain, R., Mohan, M., Patkar, S., Leupers, R., Rishiyur, N., Merchant, F.: Clarinet: A risc-v based framework for posit arithmetic empiricism. arXiv preprint arXiv:2006.00364 (2020)
  * [26] Tagliavini, G., Marongiu, A., Benini, L.: Flexfloat: A software library for transprecision computing. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 39(1), 145–156 (2018)
  * [27] Uguen, Y., Forget, L., de Dinechin, F.: Evaluating the hardware cost of the posit number system. In: Proceedings of the 29th International Conference on Field Programmable Logic and Applications (FPL). pp. 106–113 (2019)
  * [28] Zuras, D., Cowlishaw, M., Aiken, A., Applegate, M., Bailey, D., Bass, S., Bhandarkar, D., Bhat, M., Bindel, D., Boldo, S., et al.: Ieee standard for floating-point arithmetic. IEEE Std 754(2008), 1–70 (2008)