# FlowFPX: Nimble Tools for Debugging Floating-Point Exceptions

Taylor Allred  University of Utah  Xinyi Li  University of Utah  Ashton
Wiersdorf  University of Utah  Ben Greenman  University of Utah  Ganesh
Gopalakrishnan  University of Utah

###### Abstract

Reliable numerical computations are central to scientific computing, but the
floating-point arithmetic that enables large-scale models is error-prone.
Numeric exceptions are a common occurrence and can propagate through code,
leading to flawed results. This paper presents FlowFPX, a toolkit for
systematically debugging floating-point exceptions by recording their flow,
coalescing exception contexts, and fuzzing in select locations. These tools
help scientists discover when exceptions happen and track down their origin,
smoothing the way to a reliable codebase.

###### keywords:

Julia, floating-point, debugging

##  1 Introduction

Reliable numeric computations are central to high-performance computing,
machine learning, and scientific applications. Yet the floating-point
arithmetic that powers these computations is fundamentally unreliable (section
2). Exceptional values, such as Not a Number (NaN) and infinity (Inf), can and
often do arise thanks to culprits such as roundoff error, catastrophic
cancellation, singular matrices, and vanishing derivatives [33, 5, 11, 9, 23,
4]. Developers are responsible for guarding against exceptions, but this task
is difficult because many operations can generate and propagate exceptions.
Worst of all, operations such as less-than (<) can kill an exceptional value,
leaving no trace of the problem. There is little tool support to assist in
exception debugging, thus (unsurprisingly) a quick GitHub search reports over
4,000 open issues related to NaN or Inf exceptions [10].

This paper introduces FlowFPX, a toolkit for debugging floating-point
exceptions (section 3) that has helped improve a variety of applications, from
ocean simulations to heat modes (section 4):

  * •

The centerpiece of FlowFPX is FloatTracker, a dynamic analysis tool that
selectively monitors for exceptions and fuzzes code for vulnerabilities.

  * •

To visualize results, FloatTracker adapts coalesced stack-trace graphs (CSTGs,
or stack graphs) [15] to summarize the program contexts that handled
exceptional values.

  * •

A companion tool GPU-FPX [24] provides fine-grained insights for GPU kernels.

##  2 Floating-Point Exception Primer

Figure 1: Floats are spread across the real number line

Floating-point numbers use a finite number of bits to represent a spectrum of
points along the real number line (fig. 1). The implementation strategy is
essentially that followed in scientific notation. A floating-point number
packs a sign bit, an exponent, and a fraction part (also called the
“significand” or “mantissa”) into a bitstring. Typical strings are 64 or 32
bits long, but 16-bit and 8-bit formats are on the rise [17, 26]. This
representation supports very small and very large numbers in a narrow range of
bits:

[language = Julia] julia> prevfloat(typemax(Float64)) 1.7976931348623157e308
julia> nextfloat(typemin(Float64)) -1.7976931348623157e308

The flip side is that most real numbers fall into the gaps between floating-
point numbers and must be rounded, which introduces error and can lead to
surprising results. For example, adding the tiny Planck constant to the large
Avogadro number results in Avogadro’s number after rounding:

[language = Julia] julia> planck = 6.62607015e-34 6.62607015e-34 julia>
avogadro = 6.02214076e23 6.02214076e23 julia> avogadro + planck == avogadro
true

This is an extreme example, but many operations on floating-point numbers
closer in magnitude induce a loss of accuracy. Refer to the literature for
more details, e.g., [21, 34, 28].

###  2.1 Exceptions and Exceptional Values

The IEEE 754 floating-point standard [16] defines exceptions and exceptional
values as the outcome of operations that have “no single universally
acceptable result” [30]. For example, dividing by zero and exceeding the
Float64 range both lead to exceptions:

[language = Julia] julia> 0 / 0 NaN julia> avogadro^avogadro Inf julia> log(0)
-Inf julia> Inf + NaN NaN

IEEE 754 defers the question of how to handle such exceptions to application
code. It is up to developers to watch for NaN, Inf, and subnormal numbers
(underflow) and implement an appropriate repair. This is no easy task,
however, because of the approximations inherent to floating point. Even an
apparently-safe division could result in a NaN if its denominator gets
truncated to zero. Some NaNs might be spurious, others might be fatal, but in
any event anticipating the various exceptions is a burden. All too often,
exceptional values go unhandled and flow through the code.

###  2.2 Lifetime of an Unhandled Exceptions

Figure 2: Gen, Prop, Kill: Lifetime of an exceptional value

Unhandled exceptional values have a lifetime: they are born, or _generated_ ,
by some operation; they _propagate_ through other operations; and they either
appear in the program output, go out of scope, or get _killed_ by a numeric
operation. Figure 2 summarizes this _gen_ -_prop_ -_kill_ process. The gens
and props are straightforward; see above for examples (section 2.1). The kills
often arise from numeric comparisons (<, =, etc.), but exponents (1^NaN) and
over-eager matrix optimizations [5] can kill exceptions as well.

To illustrate the perils of killed exceptions, consider the following two ways
of finding the maximum value in a list. The first compares numbers with <=
while the second uses the built-in max function:

[language = Julia] function max1(lst) max_seen = 0.0 for x in lst # swap if x
is not too small if ! (x <= max_seen) max_seen = x end end max_seen end

function max2(lst) foldl(max, lst) end

For lists with a NaN inside, the functions can give different results because
<= kills NaNs whereas max propagates them:

[language = Julia] julia> max1([1, 5, NaN, 4]) 4.0 julia> max2([1, 5, NaN, 4])
NaN

Not only is the result from max1 problematic for obscuring the fact that there
was a NaN in the list, the result is arguably wrong! The result from max2 at
least shows that a NaN was in the works, though in a realistic setting it may
not be clear where the NaN came from. Both versions would thus benefit from
tools that track exceptions across their lifetime. FlowFPX can help.

##  3 FlowFPX

FlowFPX is a toolkit for tracking down floating-point exceptions. The primary
tools in this paper are FloatTracker, which records lifetimes and enables
fuzzing, and stack graphs (more precisely, CSTGs), which visualize the flow of
exceptions. GPU-FPX is a third component of FlowFPX that tracks floating-point
exceptions inside GPU kernels [24].

###  3.1 FloatTracker

FloatTracker tracks exceptional values across their _gen_ -_prop_ -_kill_
lifetime and can fuzz code for vulnerabilities by injecting a NaN or Inf as
the result of an operation. FloatTracker is implemented in Julia and is
available on JuliaHub:

https://juliahub.com/ui/Packages/FloatTracker/dBXig

####  3.1.1 Tracking Exceptional Values

Exn. Input? | $\Rightarrow$ | Exn. Output? | = | Event
---|---|---|---|---
$\times$ | $\Rightarrow$ | ✓ | = | gen
✓ | $\Rightarrow$ | ✓ | = | prop
✓ | $\Rightarrow$ |  $\times$ | = | kill
Figure 3: How to classify operations that see exceptions

FloatTracker monitors NaN and Inf exceptions by overloading arithmetic
operations and logging key events. When the input to an operation is
exception-free but the output is exceptional, the operation is a gen event
(fig. 3). When the input and output contain exceptions, the operation is a
prop event. And when the input contains an exception but the output does not,
the operation is a kill event. Put together, the log of all gens, props, and
kills sheds light of how various exceptions traveled across the program. The
logs also record the call context (stack trace) and the arguments to the
operation as a starting point for debugging efforts.

FloatTracker writes logs to three files: one for gen events, one for props,
and one for kills. This way, discovering where a NaN came from is a matter of
sifting through the gen file. Users can also lower the overhead of logging by
turning it off for prop events.

The instrumentation works through custom floating-point types: TrackedFloat64,
TrackedFloat32, and TrackedFloat16. Developers must opt in to FloatTracker by
wrapping numbers in a custom type. From then on, tracking is automatic and
extends transitively to all outputs of tracked operations. Multiplying a
Float64 value with a TrackedFloat64, for example, yields a TrackedFloat64 to
continue the logging trail.

Crucially, the tracked version of an exception, say a NaN, points to the
original exceptional value. This enables techniques such as NaN-packing, or
otherwise using the payload in creative ways. Not all Julia operations
currently preserve NaNs bit-for-
bit,111https://github.com/JuliaLang/julia/issues/48523 but FloatTracker does
its part.

####  3.1.2 Fuzzing

Operator overloading gives FloatTracker a powerful way to fuzz code from the
inside out. Each overloaded function serves as a hook where FloatTracker can
decide whether to observe the operation or step in, discard the original
result, and return an exception instead. Injecting faults in a random way
[12], also known as fuzzing, is a useful way to discover vulnerabilities in a
large codebase. Demmel et al. propose essentially the same idea for BLAS and
LAPACK [5].

FloatTracker exposes several parameters to let developers control the fuzzer:

  * •

odds::Int64 inject if rand(odds) == 1.

  * •

n_inject::Int64 upper bound on the number of NaNs to inject.

  * •

active::Bool fuzz only when set to true.

  * •

functions::ArrayString limit fuzzing to the dynamic extent of the listed
functions.

  * •

libraries::ArrayString limit fuzzing to functions from the following libraries

When fuzzing reveals an error, the next step is to craft a regression test to
guide repairs. FloatTracker therefore records the sequence of injections that
it makes during a fuzzing run and enables a replay of any recording after the
fact. Replay runs proceed deterministically so that developers can harden
their code and check that the fixes remove the error.

####  3.1.3 FloatTracker Internals

FloatTracker takes advantage of Julia’s operator overloading to track
exceptions and fuzz for vulnerabilities. For example, below is a variant of +
that is overloaded for TrackedFloat64. It calls the basic + (or injects a NaN)
and checks for exceptions before returning: This lets FloatTracker intercept
all floating-point operations involving TrackedFloat types.

[language = Julia] function +(x::TrackedFloat64, y::TrackedFloat64) result =
run_or_inject(+, x.val, y.val) check_error(+, result, x.val, y.val)
TrackedFloat64(result) end

Every arithmetic operation requires a similar overloading. Thus, the
implementation of FloatTracker uses a metaprogramming technique adapted from
Sherlogs [20] to abstract over the common patterns. For every binary
operation, the library creates an overloading similar to the one for + above.
Unary operations and others work analogously. This approach saved thousands of
lines of code. The implementation weighs in at 218 lines and defines 645
overloaded function; assuming 5 lines of code per function, a handwritten
version would require over 3,000 lines.

###  3.2 Stack Graphs

FloatTracker can produce copious amounts of log files which can be challenging
to sift through manually. Coalesced stack trace graphs (CSTGs or stack graphs
for short) provide a way to visualize large amounts of stack traces in a
compact form [15]. This techinque pairs well with FloatTracker and makes
analyzing the log files easier.

Figure 4 illustrates the construction of a stack graph from a collection of
stack traces. Each trace on the left contributes nodes and edges to the graph
on the right. Repeated edges get emphasized with darker lines and larger
counts.

Figure 4: From stack traces (left) to stack graph (right)

Reading bottom-up, a stack graph based on the _gen_ events in a program
highlights the contexts that frequently produced exceptional values. Using
fig. 4 as an example, Frame D produced three exceptions, two of which arose
under Frame C. In a large program with many exceptions, stack graphs offer a
way to prioritize debugging efforts: go for the heavily-trodden paths first.

###  3.3 GPU-FPX

Many programs offload work onto GPUs, which are no less susceptible to
floating-point exceptions than CPUs. In fact, GPU programs are worse off
because they lack exception-handling mechanisms from the CPU world [23]. Since
FloatTracker instruments Julia programs, it cannot help directly; however, the
companion tool GPU-FPX instruments GPU kernels to detect and report floating-
point exceptions [24]. Together, FloatTracker and GPU-FPX provide insights for
accelerated programs.

##  4 Case Studies

FlowFPX has helped to debug exceptions and fuzz for issues in a variety of
settings, some synthetic and some realistic. The case studies include a
shallow water simulation, the OrdinaryDiffEq solver, and a Bayesian inference
library.

###  4.1 ShallowWaters

ShallowWaters simulates the flow of water over a seabed [18, 19]. The library
has dozens of parameters that a scientist can experiment with. One notable
parameter is the Courant-Friedrichs-Lewy (CFL) number, which roughly describes
the size of the time step to take in running the simulation. A small CFL
number makes the simulation run slowly, but accurately; a large number speeds
it up but loses precision because the system does not get enough time to
propagate information.

Normal values for the CFL number range between zero and one. With a CFL of
0.9, the shallow water simulation produces the graph on the left half of fig.
5 showing current speed in a rectangular basin. Raising the CFL too high, to
1.6, causes trouble (fig. 5, right) with large, white regions where the
current speed is NaN instead of a normal value.

Running FloatTracker on the high-CFL simulation reveals where the simulation
drifted from numbers to NaN exceptions. The first step in applying
FloatTracker is to convert relevant floats to tracked floats, e.g., Float32 to
TrackedFloat32. For ShallowWaters, this step is easy because the simulation is
parameterized by a floating-point type for internal use. Swapping in a tracked
type is enough:

[language = Julia] run_model(T=TrackedFloat32, cfl=10, nx=100, Ndays=100,
L_ratio=1, bc="nonperiodic", wind_forcing_x="double_gyre",
topography="seamount")

With tracking, the simulation runs as before, producing an ugly graph. It
additionally outputs logs for all gen, prop, and kill events as they happen.
Below is one event from the gen logs:

-([-Inf, -Inf]) FT/TrackedFloat.jl:106 momentum_u! SW/rhs.jl:246 rhs_nonlinear! SW/rhs.jl:50 rhs! SW/rhs.jl:14 [inlined] time_integration SW/time_integration.jl:77 run_model SW/run_model.jl:37 top-level

We can see that the NaN appeared as the result of subtracting two infinities
(-Inf - -Inf). The trace further shows that this subtraction happens inside
the function momentum_u! on line 246 of the rhs.jl file.

This solves the mystery of where one NaN came from, but raises a new question
about the source of the Inf value. The logs for Inf gens have an answer:

^([-1.515f31, 2]) FT/TrackedFloat.jl:138 literal_pow() intfuncs.jl:325 …
materialize(^) broadcast.jl:860 top-level getproperty(…)
examples/sw_nan_tf.jl:14 .. This Inf came from an exponent that overflowed the
float type (-1.515e31^2). FloatTracker has shown exactly which numeric values
in which operation caused exceptions to occur.

Figure 5: Raising the CFL number creates white gaps due to NaNs

####  4.1.1 Stack Graphs for a Bigger Picture

While the logs for ShallowWaters contain useful information, there is an
overwhelming amount of it. There are over ten thousand lines in the gen file
alone. Converting these logs to a stack graph gives a quick overview of the
most common paths to exceptional values.

Figure 6 presents the stack graph for NaN gen events in ShallowWaters with the
high CFL number. Reading bottom-up, every NaN came from calls to the ‘-’ and
‘+’ operations. Calls to ‘+’ account for most of the NaNs. These NaNs arose in
two different contexts: a small number (30) occurred within a momentum
calculation, while the rest (162) occurred within a continuity step. Moving to
the top of the graph, it shows that the function run_model drove the entire
simulation. With this overview of the program, a promising next step is to
guard against NaNs in the momentum and continuity functions.

Figure 6: Stack graph for NaN gens in ShallowWaters

####  4.1.2 Stack Graph Differences

Graph diffing works well for stack graphs; it shows how flows in the program
evolved from one stage to another. Figure 7 illustrates one diff in the
context of NaN gens for ShallowWaters: it compares the first 10% of gen events
to the latter 90% of gens. The positive numbers and green lines indicate flows
that are new in the latter part, and the negative numbers and red lines show
flows that disappeared in the latter part. A domain expert might use these
clues to find where an instability started in the first part of the program.
In this case, the function momentum_u! showed up only in the beginning of the
logs—it may be an effective point to check for NaNs.

Figure 7: Stack graph diff

###  4.2 OrdinaryDiffEq

With the targeted fuzzing abilities of FloatTracker, we set focus on the
NBodySimulator package from the SciML
team.222https://github.com/SciML/NBodySimulator.jl We only wanted to test the
robustness of the NBodySimulator package, so we configured the fuzzer to
inject NaNs _only_ when inside of a function of that library. This way, we
could avoid injecting in the standard library or other dependencies of
NBodySimulator and concentrate on improving this one library.

However, Fuzzing discovered zero bugs and zero exceptional events. In fact,
fuzzing injected _zero_ exceptional values whatsoever, even with adjusting the
odds to _force_ an injection at the first available opportunity. The reason
for this lack of NaN injection, it turns out, is that the nbody simulation
merely creates a problem for the OrdinaryDiffEq
solver.333https://github.com/SciML/OrdinaryDiffEq.jl All the floating-point
operations were in another library.

Fuzzing on OrdinaryDiffEq led to a curious situation. The library itself
reported a NaN and printed a message that it would exit. However, after
printing that message, the program went into an infinite loop. Using stack
graphs to guide our search, we found a NaN kill that manifested repeatedly in
the logs. The stack traces for that kill originated from inside the file
solve.jl:

<([NaN, 3.0e6]) at FT/TrackedFloat.jl:193 solve! at ODE/solve.jl:515 …

The relevant part of solve.jl contains a pair of loops. With injection, the
variable tdir holds a NaN, stopping all productivity:

[language = Julia] while !isempty(time_stops) while tdir * t <
first(time_stops) # do integration work # pop_off(time_stops) end end

In more detail, the NaN for tdir propagates though the multiplication and gets
killed by the < comparison. Hence the condition for inner while loop is always
false, which means the outer loop never ends up with an empty list.

This is a real-world example of how NaN kills can affect control flow, and we
filed an issue for
it.444https://github.com/SciML/OrdinaryDiffEq.jl/issues/1939 Fortunately, the
problem in this case is benign as the code was already trying to halt.

###  4.3 Finch

Finch is a domain-specific language for specifying PDEs [14].555Not to be
confused with the Finch loop optimizer [1]. In the spirit of FEniCS [2] and
related tools [13, 25, 7, 32], Finch helps scientists quickly convert math
into code. What sets Finch apart is its flexibility. It supports multiple
discretization methods (finite element and finite volume) and multiple
backends (Julia, C++, Dendro [8]). Furthermore it strives to output code that
humans can easily fine-tune.

Fuzzing with FloatTracker revealed two places where Finch needed protection
against user input. The first was when reading an input
mesh.666https://github.com/paralab/Finch/issues/16 A NaN injected in the mesh
led to a crash further on:

BoundsError: attempt to access 1-element VectorInt64 at index [2]

Before accessing the input, Finch needed to check for NaNs. The second place
was in setting bounds for the
solver.777https://github.com/paralab/Finch/issues/17 Here, a NaN could leave
bounds uninitialized, leading to a bounds error. Additionally, FloatTracker
and stack graphs have been useful for identifying NaNs that appear in unstable
heat simulations written in Finch.

###  4.4 Oceananigans

Oceananigans [31] is simulation package for incompressible fluid dynamics that
can generate code for Nvidia GPUs. For example, the following program (from
the project readme) simulates turbulance:

[language = Julia] using Oceananigans grid = RectilinearGrid(GPU(), size=(128,
128), x=(0, 2π), y=(0, 2π), topology=(Periodic, Periodic, Flat)) model =
NonhydrostaticModel(; grid, advection=WENO()) ϵ(x, y, z) = 2rand() - 1
set!(model, u=ϵ, v=ϵ) simulation = Simulation(model; Δt=0.01, stop_time=4)
run!(simulation)

GPU-FPX provides detailed feedback on this program. The output in fig. 8 shows
that 21 kernels appear and generate six floating-point exceptions. There are
three NaNs, one Inf, and two division by zero errors. The report is a starting
point for further investigation of the reliability of the example.

| \-- FP64 Operations -- |
---|---
Total NaN: | 2
Total INF: | 1
Total subnormal: | 0
Total div0: | 2
| \-- FP32 Operations -- |
---|---
Total NaN: | 1
Total INF: | 0
Total subnormal: | 0
Total div0: | 0

\-- Other Stats -- |
---|---
Kernels: | 21

Figure 8: Example GPU-FPX output

###  4.5 RxInfer

We discovered an open issue in the RxInfer.jl library related to NaN detection
and suggested FloatTracker to the
developers.888https://github.com/biaslab/RxInfer.jl/issues/116 Within a day,
they were able to track down the location of an important NaN gen. This
success came with little input from our end; in fact, the application program
was closed-source. We merely explained how to use FloatTracker by wrapping
inputs in a tracked type.

##  5 Related Work

###  5.1 Error Analysis

Demmel et al.[5] examine floating-point exceptional value handling in BLAS and
LAPACK, identify several inconsistencies, and propose an API for debugging and
adding determinism. The proposal includes an extension to the INFO_ARRAY
parameter with fields that record _gen_ -_prop_ -_kill_ information. It also
includes fuzzing, which we realize in FloatTracker.

Toronto and McCarthy [34] propose a test-driven method for detecting numeric
error: plot the results of an expression on a range of inputs and look for
sharp deviations, or _badlands_. They point out several ways to rewrite code
to avoid badlands by rewriting code in a semantics-preserving way.

Herbie [29] automatically rewrites arithmetic expressions to reduce floating-
point error. This would combine well with FloatTracker: first identify the
location of a NaN, ask Herbie to find a repair. The Odyssey[27] workbench
provides an interactive interface to Herbie.

###  5.2 Diagnosing floating-point exceptions

The Julia library Sherlogs [20] inspired our use of a custom number type to
intercept operations on a number. In contrast to FloatTracker which monitors
for exceptional values and logs stack traces at interesting points in their
lifetime, Sherlogs tracks and reports the range of values seen over the course
of a computation. This is intended to provide insight into whether or not a
library could tolerate a lower-precision floating-point format.

FPSpy [6] is an LD_PRELOAD shared library that works on unmodified x86
binaries. It monitors a program during execution for operations that generate
an exception, such as division by zero, underflow, and overflow. By contrast
to FloatTracker, it does not track prop or kill events. FPSpy has the
advantage of being lightweight enough to run on production code for certain
loads.

###  5.3 Stack Graphs

Our stack graphs utilize the CSTG library for coalesced stack trace graphs
[15]. In turn, CSTGs build on the STAT tool from LLNL [3]. STAT collects,
analyzes, and visualizes stack traces from concurrent processes to highlight
anomalies. It produces visualizations similar to those of CSTG, thought CSTG
offers more compact views and supports diffs.

###  5.4 GPU Exception Tracking

FPChecker [22] is a tool to report floating-point exceptions occurring on the
GPU. FPChecker relies on LLVM-level instrumentation of GPU kernels, and so
cannot run on the plethora of closed-source GPU kernels in usage today. BinFPE
[23] is another tool in the same space; BinFPE performs SASS-level analysis of
GPU kernels, but is limited in that it is slow and does not catch errors that
alter control flow. The latter deficiency is particularly worrisome, as we
have seen, silent NaN kills can invalidate results without the user noticing.
GPU-FPX [24] improves on the work of FPChecker and BinFPE by being more
performant and catching a wider set of errors, including those that alter
control flow. GPU-FPX is a shared library that, like FPSpy uses LD_PRELOAD to
work on unmodified binaries. GPU-FPX runs on CUDA cores from NVIDIA and
reports total numbers of exceptional values. Like FloatTracker, GPU-FPX can
catch NaN gens and kills, but it does this on the GPU where FloatTracker
doesn’t apply. Despite these improvements, GPU-FPX is limited by the closed-
source nature of common GPU cores, and cannot report at the rich level of
source detail that FloatTracker can.

##  6 Discussion

Lightweight tools for error analysis that can quickly identify floating-point
problems and suggest repairs are an important topic. The number of scale of
scientific application has grown tremendously over the years. For small teams
that cannot afford a full-time analyst, tools like FlowFPX fill a critical
role.

FlowFPX it itself an evolving toolkit. Below we discuss some topics for future
work.

###  6.1 Performance

FloatTracker incurs significant overhead on the order of 100x slower than a
non-instrumented run of the same program. It is a debugging tool, not a
production tool. To put this number into context, Valgrind runs with a similar
level of slowdown.

In addition to the cost incurred by intercepting floating-point operations,
gathering stack traces is expensive. We observe a 10x slowdown on
ShallowWaters with logging disabled. We recommend that users of FloatTracker
make use of the maxLogs and exclude_stacktrace configuration options to limit
the number and kind of logs gathered, and thereby reduce the number of calls
to stacktrace(). Stack traces are essential to decide where to inject a fault
when fuzzing, but we defer them as late as possible to maximize performance.

###  6.2 Enhanced Fuzzing

While fuzzing is useful for discovering issues, its success rate is low
because every floating-point operation is a candidate for injection. Even
operations that are already well-defended against NaNs are candidates.
FloatTracker could use two sorts of tools for improving injection. First,
fine-grained control to let users decide where not to inject. Second, tools
for understanding the context of an injection point after the fact. Program
slicing is especially relevant to the latter point and effectively what we did
by hand when fuzzing Finch (section 4.3). For each operation, an expert needs
to study the values that feed into it to decide whether they are protected or
not.

###  6.3 Tracking Exceptions in External Libraries

FloatTracker is limited to Julia code. It cannot track the lifetime of
exceptional values in external libraries, such as GPU kernels or C programs.
For GPUs it relies on GPU-FPX, through the connection between these tools is
loose. In the future, FloatTracker would benefit from an API to plug in tools
for external libraries, gather their output, and present a comprehensive view
of exceptions in a multi-language program.

###  6.4 Interface Concerns

FloatTracker is capable of monitoring all sorts of events and floating-point
values beyond exceptions. For example, FloatTracker could monitor large or
small values with guidance from the user about which values are worth logging.
On a similar note, the interface to FloatTracker is primitive: users express
interest in a number by wrapping it in a constructor such as TrackedFloat64.
Helper functions that track data structures and choose a default size would
make it easier to experiment with FloatTracker.

##  7 Acknowledgments

Thanks to the Sherlogs.jl developers for inspiring the architecture of
FloatTracker. Thanks to the RxInfer.jl developers for testing FloatTracker and
for feedback on its user interface. Thanks to Alex Larsen and Rob Durst for
comments on an early draft. This work is supported by NSF grant 2030859 to the
CRA for the CIFellows project, and DOE ASCR Award Number DE-SC0022252 and NSF
CISE Awards 1956106 and 21241.

## References

  * [1] Willow Ahrens, Daniel Donenfeld, Fredrik Kjolstad, and Saman Amarasinghe. Looplets: A language for structured coiteration. In CGO, pages 41–54. ACM, 2023. doi:10.1145/3579990.3580020.
  * [2] M. S. Alnaes, J. Blechta, J. Hake, A. Johansson, B. Kehlet, A. Logg, C. Richardson, J. Ring, M. E. Rognes, and G. N. Wells. The FEniCS project version 1.5. Archive of Numerical Software, 3, 2015. doi:10.11588/ans.2015.100.20553.
  * [3] Dorian C. Arnold, Dong H. Ahn, Bronis R. de Supinski, Gregory L. Lee, Barton P. Miller, and Martin Schulz. Stack Trace Analysis for Large Scale Debugging. In IPDPS, pages 1–10. IEEE, 2007. doi:10.1109/IPDPS.2007.370254.
  * [4] Dorra Ben Khalifa, Xinyi Li, Ignacio Laguna, Matthieu Martel, and Ganesh Gopalakrishnan. Toward increasing trust in exascale simulations. In XLOOP, pages 26–31. IEEE, 2022. doi:10.1109/XLOOP56614.2022.00010.
  * [5] James Demmel, Jack J. Dongarra, Mark Gates, Greg Henry, Julien Langou, Xiaoye S. Li, Piotr Luszczek, Weslley S. Pereira, E. Jason Riedy, and Cindy Rubio-González. Proposed consistent exception handling for the BLAS and LAPACK. In Correctness@SC, pages 1–9. IEEE, 2022. doi:10.1109/Correctness56720.2022.00006.
  * [6] Peter Dinda, Alex Bernat, and Conor Hetland. Spying on the Floating Point Behavior of Existing, Unmodified Scientific Applications. In HPDC, pages 5–16. ACM, 2020. doi:10.1145/3369583.3392673.
  * [7] Dune. DUNE numerics, 2023. https://www.dune-project.org/. Accessed 2023-06-06.
  * [8] Milinda Fernando, David Neilsen, Eric W. Hirschmann, and Hari Sundar. A scalable framework for adaptive computational general relativity on heterogeneous clusters. In SC, page 1–12. ACM, 2019. doi:10.1145/3330345.3330346.
  * [9] FPChecker. Open source reports, 2023. https://fpchecker.org/open-source-reports.html. Accessed 2023-06-16.
  * [10] GitHub. Issue search: NaN+infinity, 2023. https://github.com/search?q=NaN+infinity++state%3Aopen&type=issues&ref=advsearch. Accessed 2023-06-16.
  * [11] Ganesh Gopalakrishnan, Ignacio Laguna, Ang Li, Pavel Panchekha, Cindy Rubio-González, and Zachary Tatlock. Guarding numerics amidst rising heterogeneity. In Correctness@SC, pages 9–15. IEEE, 2021. doi:10.1109/Correctness54621.2021.00007.
  * [12] Richard Hamlet. Random testing. Encyclopedia of Software Engineering, 2:971–978, 1994. doi:10.1002/0471028959.
  * [13] F. Hecht. New development in FreeFem++. Journal of Numerical Mathematics, 20(3-4):251–265, 2012. doi:10.1515/jnum-2012-0013.
  * [14] Eric Heisler, Aadesh Deshmukh, and Hari Sundar. Finch: Domain Specific Language and Code Generation for Finite Element and Finite Volume in Julia. In ICCS, volume 13350, pages 118–132. Springer, 2022. doi:10.1007/978-3-031-08751-6_9.
  * [15] Alan Humphrey, Qingyu Meng, Martin Berzins, Diego Caminha B. De Oliveira, Zvonimir Rakamaric, and Ganesh Gopalakrishnan. Systematic Debugging Methods for Large-Scale HPC Computational Frameworks. Computing in Science & Engineering, 16(3):48–56, 2014. doi:10.1109/MCSE.2014.11.
  * [16] IEEE Standard for Binary Floating-Point Arithmetic. ANSI/IEEE Std 754-1985, pages 1–20, 1985. doi:10.1109/IEEESTD.1985.82928.
  * [17] Milan Klöwer. Low-Precision Climate Computing: Preserving Information despite Fewer Bits. http://purl.org/dc/dcmitype/Text, University of Oxford, 2021.
  * [18] Milan Klöwer, Peter D. Düben, and T. N. Palmer. Number Formats, Error Mitigation, and Scope for 16-Bit Arithmetics in Weather and Climate Modeling Analyzed With a Shallow Water Model. Journal of Advances in Modeling Earth Systems, 12(10), 2020. doi:10.1029/2020MS002246.
  * [19] Milan Klöwer, Peter D. Düben, and Tim N. Palmer. Posits as an alternative to floats for weather and climate models. In Proceedings of the Conference for Next Generation Arithmetic 2019, pages 1–8. ACM, 2019. doi:10.1145/3316279.3316281.
  * [20] Milan Klöwer and OnButtonUp. Milankl/Sherlogs.jl, 2021. doi:10.5281/ZENODO.5115765.
  * [21] Donald Ervin Knuth. The Art of Computer Programming, Volume 2: Seminumerical Algorithms. Addison-Wesley, 3rd edition, 1997.
  * [22] Ignacio Laguna. FPChecker: Detecting floating-point exceptions in GPU applications. In ASE, pages 1126–1129. IEEE, 2019. doi:10.1109/ASE.2019.00118.
  * [23] Ignacio Laguna, Xinyi Li, and Ganesh Gopalakrishnan. BinFPE: accurate floating-point exception detection for GPU applications. In SOAP, pages 1–8. ACM, 2022. doi:10.1145/3520313.3534655.
  * [24] Xinyi Li, Ignacio Laguna, Katarzyna Swirydowicz, Bo Fang, Ang Li, and Ganesh Gopalakrishnan. Design and evaluation of GPU-FPX: A low-overhead tool for floating-point exception detection in NVIDIA GPUs. In ACM HPDC 2023, 2023. doi:10.11578/dc.20230713.4.
  * [25] Sandra Macià, Pedro J. Martínez-Ferrer, Sergi Mateo, Vicenç Beltran, and Eduard Ayguadé. Assembling a high-productivity DSL for computational fluid dynamics. In PASC. ACM, 2019. doi:10.1145/3324989.3325721.
  * [26] Paulius Micikevicius, Dusan Stosic, Neil Burgess, Marius Cornea, Pradeep Dubey, Richard Grisenthwaite, Sangwon Ha, Alexander Heinecke, Patrick Judd, John Kamalu, Naveen Mellempudi, Stuart F. Oberman, Mohammad Shoeybi, Michael Y. Siu, and Hao Wu. FP8 formats for deep learning. CoRR, abs/2209.05433, 2022. doi:10.48550/arXiv.2209.05433.
  * [27] Edward Misback, Caleb Chan, Brett Saiki, Eunice Jun, Zachary Tatlock, and Pavel Panchekha. Odyssey: An interactive workbench for expert-driven floating-point expression rewriting. CoRR, abs/2305.10599, 2023. doi:10.48550/arXiv.2305.10599. arXiv:2305.10599.
  * [28] Jean-Michel Muller, Nicolas Brunie, Florent De Dinechin, Claude-Pierre Jeannerod, Mioara Joldes, Vincent Lefèvre, Guillaume Melquiond, Nathalie Revol, and Serge Torres. Handbook of Floating-Point Arithmetic. Springer, 2018. doi:10.1007/978-3-319-76526-6.
  * [29] Pavel Panchekha, Alex Sanchez-Stern, James R. Wilcox, and Zachary Tatlock. Automatically improving accuracy for floating point expressions. In PLDI, pages 1–11. ACM, 2015. doi:10.1145/2737924.2737959.
  * [30] David J. Priest. Handling IEEE 754 invalid operation exceptions in real interval arithmetic, 1997\. https://j3-fortran.org/doc/year/97/97-172.pdf. Accessed 2023-08-16.
  * [31] Ali Ramadhan, Gregory LeClaire Wagner, Chris Hill, Jean-Michel Campin, Valentin Churavy, Tim Besard, Andre Souza, Alan Edelman, Raffaele Ferrari, and John Marshall. Oceananigans.jl: Fast and friendly geophysical fluid dynamics on GPUs. Journal of Open Source Software, 5(53):2018, 2020. doi:10.21105/joss.02018.
  * [32] Florian Rathgeber, David A. Ham, Lawrence Mitchell, Michael Lange, Fabio Luporini, Andrew T. T. Mcrae, Gheorghe-Teodor Bercea, Graham R. Markall, and Paul H. J. Kelly. Firedrake: Automating the finite element method by composing abstractions. Transactions on Mathematical Software, 43(3), 2016. doi:10.1145/2998441.
  * [33] Kasia Świrydowicz, Eric Darve, Wesley Jones, Jonathan Maack, Shaked Regev, Michael A Saunders, Stephen J. Thomas, and Slaven Peleš. Linear solvers for power grid optimization problems: A review of GPU-accelerated linear solvers. Parallel Computing, 111:102870, 2022. doi:10.1016/j.parco.2021.102870.
  * [34] Neil Toronto and Jay McCarthy. Practically Accurate Floating-Point Math. Computing in Science & Engineering, 16(4):80–95, 2014. doi:10.1109/MCSE.2014.90.


The Belle II Collaboration

# Tests of light-lepton universality in angular asymmetries of
$B^{0}\rightarrow D^{*-}\ell\nu$ decays

I. Adachi  0000-0003-2287-0173 K. Adamczyk  0000-0001-6208-0876 L. Aggarwal
0000-0002-0909-7537 H. Aihara  0000-0002-1907-5964 N. Akopov
0000-0002-4425-2096 A. Aloisio  0000-0002-3883-6693 N. Anh Ky
0000-0003-0471-197X D. M. Asner  0000-0002-1586-5790 H. Atmacan
0000-0003-2435-501X T. Aushev  0000-0002-6347-7055 V. Aushev
0000-0002-8588-5308 M. Aversano  0000-0001-9980-0953 V. Babu
0000-0003-0419-6912 H. Bae  0000-0003-1393-8631 S. Bahinipati
0000-0002-3744-5332 P. Bambade  0000-0001-7378-4852 Sw. Banerjee
0000-0001-8852-2409 M. Barrett  0000-0002-2095-603X J. Baudot
0000-0001-5585-0991 M. Bauer  0000-0002-0953-7387 A. Baur  0000-0003-1360-3292
A. Beaubien  0000-0001-9438-089X F. Becherer  0000-0003-0562-4616 J. Becker
0000-0002-5082-5487 P. K. Behera  0000-0002-1527-2266 J. V. Bennett
0000-0002-5440-2668 F. U. Bernlochner  0000-0001-8153-2719 V. Bertacchi
0000-0001-9971-1176 M. Bertemes  0000-0001-5038-360X E. Bertholet
0000-0002-3792-2450 M. Bessner  0000-0003-1776-0439 S. Bettarini
0000-0001-7742-2998 B. Bhuyan  0000-0001-6254-3594 F. Bianchi
0000-0002-1524-6236 T. Bilka  0000-0003-1449-6986 D. Biswas
0000-0002-7543-3471 A. Bobrov  0000-0001-5735-8386 D. Bodrov
0000-0001-5279-4787 A. Bolz  0000-0002-4033-9223 A. Bondar
0000-0002-5089-5338 J. Borah  0000-0003-2990-1913 A. Bozek
0000-0002-5915-1319 M. Bračko  0000-0002-2495-0524 P. Branchini
0000-0002-2270-9673 R. A. Briere  0000-0001-5229-1039 T. E. Browder
0000-0001-7357-9007 A. Budano  0000-0002-0856-1131 S. Bussino
0000-0002-3829-9592 M. Campajola  0000-0003-2518-7134 L. Cao
0000-0001-8332-5668 G. Casarosa  0000-0003-4137-938X C. Cecchi
0000-0002-2192-8233 J. Cerasoli  0000-0001-9777-881X M.-C. Chang
0000-0002-8650-6058 P. Chang  0000-0003-4064-388X R. Cheaib
0000-0001-5729-8926 P. Cheema  0000-0001-8472-5727 V. Chekelian
0000-0001-8860-8288 B. G. Cheon  0000-0002-8803-4429 K. Chilikin
0000-0001-7620-2053 K. Chirapatpimol  0000-0003-2099-7760 H.-E. Cho
0000-0002-7008-3759 K. Cho  0000-0003-1705-7399 S.-K. Choi
0000-0003-2747-8277 S. Choudhury  0000-0001-9841-0216 J. Cochran
0000-0002-1492-914X L. Corona  0000-0002-2577-9909 L. M. Cremaldi
0000-0001-5550-7827 S. Das  0000-0001-6857-966X F. Dattola
0000-0003-3316-8574 E. De La Cruz-Burelo  0000-0002-7469-6974 S. A. De La
Motte  0000-0003-3905-6805 G. De Nardo  0000-0002-2047-9675 M. De Nuccio
0000-0002-0972-9047 G. De Pietro  0000-0001-8442-107X R. de Sangro
0000-0002-3808-5455 M. Destefanis  0000-0003-1997-6751 S. Dey
0000-0003-2997-3829 R. Dhamija  0000-0001-7052-3163 A. Di Canto
0000-0003-1233-3876 F. Di Capua  0000-0001-9076-5936 J. Dingfelder
0000-0001-5767-2121 Z. Doležal  0000-0002-5662-3675 I. Domínguez Jiménez
0000-0001-6831-3159 T. V. Dong  0000-0003-3043-1939 M. Dorigo
0000-0002-0681-6946 K. Dort  0000-0003-0849-8774 D. Dossett
0000-0002-5670-5582 S. Dreyer  0000-0002-6295-100X S. Dubey
0000-0002-1345-0970 G. Dujany  0000-0002-1345-8163 P. Ecker
0000-0002-6817-6868 M. Eliachevitch  0000-0003-2033-537X D. Epifanov
0000-0001-8656-2693 P. Feichtinger  0000-0003-3966-7497 T. Ferber
0000-0002-6849-0427 D. Ferlewicz  0000-0002-4374-1234 T. Fillinger
0000-0001-9795-7412 C. Finck  0000-0002-5068-5453 G. Finocchiaro
0000-0002-3936-2151 A. Fodor  0000-0002-2821-759X F. Forti
0000-0001-6535-7965 A. Frey  0000-0001-7470-3874 B. G. Fulsom
0000-0002-5862-9739 A. Gabrielli  0000-0001-7695-0537 E. Ganiev
0000-0001-8346-8597 M. Garcia-Hernandez  0000-0003-2393-3367 R. Garg
0000-0002-7406-4707 A. Garmash  0000-0003-2599-1405 G. Gaudino
0000-0001-5983-1552 V. Gaur  0000-0002-8880-6134 A. Gaz  0000-0001-6754-3315
A. Gellrich  0000-0003-0974-6231 G. Ghevondyan  0000-0003-0096-3555 D. Ghosh
0000-0002-3458-9824 H. Ghumaryan  0000-0001-6775-8893 G. Giakoustidis
0000-0001-5982-1784 R. Giordano  0000-0002-5496-7247 A. Giri
0000-0002-8895-0128 B. Gobbo  0000-0002-3147-4562 R. Godang
0000-0002-8317-0579 O. Gogota  0000-0003-4108-7256 P. Goldenzweig
0000-0001-8785-847X W. Gradl  0000-0002-9974-8320 S. Granderath
0000-0002-9945-463X E. Graziani  0000-0001-8602-5652 D. Greenwald
0000-0001-6964-8399 Z. Gruberová  0000-0002-5691-1044 T. Gu
0000-0002-1470-6536 Y. Guan  0000-0002-5541-2278 K. Gudkova
0000-0002-5858-3187 S. Halder  0000-0002-6280-494X Y. Han  0000-0001-6775-5932
T. Hara  0000-0002-4321-0417 K. Hayasaka  0000-0002-6347-433X H. Hayashii
0000-0002-5138-5903 S. Hazra  0000-0001-6954-9593 C. Hearty
0000-0001-6568-0252 M. T. Hedges  0000-0001-6504-1872 A. Heidelbach
0000-0002-6663-5469 I. Heredia de la Cruz  0000-0002-8133-6467 M. Hernández
Villanueva  0000-0002-6322-5587 A. Hershenhorn  0000-0001-8753-5451 T. Higuchi
0000-0002-7761-3505 E. C. Hill  0000-0002-1725-7414 M. Hoek
0000-0002-1893-8764 M. Hohmann  0000-0001-5147-4781 P. Horak
0000-0001-9979-6501 C.-L. Hsu  0000-0002-1641-430X T. Iijima
0000-0002-4271-711X K. Inami  0000-0003-2765-7072 G. Inguglia
0000-0003-0331-8279 N. Ipsita  0000-0002-2927-3366 A. Ishikawa
0000-0002-3561-5633 S. Ito  0000-0003-2737-8145 R. Itoh  0000-0003-1590-0266
M. Iwasaki  0000-0002-9402-7559 P. Jackson  0000-0002-0847-402X W. W. Jacobs
0000-0002-9996-6336 E.-J. Jang  0000-0002-1935-9887 Q. P. Ji
0000-0003-2963-2565 S. Jia  0000-0001-8176-8545 Y. Jin  0000-0002-7323-0830 A.
Johnson  0000-0002-8366-1749 H. Junkerkalefeld  0000-0003-3987-9895 A. B.
Kaliyar  0000-0002-2211-619X J. Kandra  0000-0001-5635-1000 K. H. Kang
0000-0002-6816-0751 G. Karyan  0000-0001-5365-3716 T. Kawasaki
0000-0002-4089-5238 F. Keil  0000-0002-7278-2860 C. Ketter
0000-0002-5161-9722 C. Kiesling  0000-0002-2209-535X C.-H. Kim
0000-0002-5743-7698 D. Y. Kim  0000-0001-8125-9070 K.-H. Kim
0000-0002-4659-1112 Y.-K. Kim  0000-0002-9695-8103 H. Kindo
0000-0002-6756-3591 K. Kinoshita  0000-0001-7175-4182 P. Kodyš
0000-0002-8644-2349 T. Koga  0000-0002-1644-2001 S. Kohani
0000-0003-3869-6552 K. Kojima  0000-0002-3638-0266 T. Konno
0000-0003-2487-8080 A. Korobov  0000-0001-5959-8172 S. Korpar
0000-0003-0971-0968 E. Kovalenko  0000-0001-8084-1931 R. Kowalewski
0000-0002-7314-0990 T. M. G. Kraetzschmar  0000-0001-8395-2928 P. Križan
0000-0002-4967-7675 P. Krokovny  0000-0002-1236-4667 T. Kuhr
0000-0001-6251-8049 J. Kumar  0000-0002-8465-433X M. Kumar
0000-0002-6627-9708 K. Kumara  0000-0003-1572-5365 T. Kunigo
0000-0001-9613-2849 A. Kuzmin  0000-0002-7011-5044 Y.-J. Kwon
0000-0001-9448-5691 S. Lacaprara  0000-0002-0551-7696 Y.-T. Lai
0000-0001-9553-3421 T. Lam  0000-0001-9128-6806 L. Lanceri
0000-0001-8220-3095 J. S. Lange  0000-0003-0234-0474 M. Laurenza
0000-0002-7400-6013 R. Leboucher  0000-0003-3097-6613 F. R. Le Diberder
0000-0002-9073-5689 P. Leitl  0000-0002-1336-9558 D. Levit
0000-0001-5789-6205 P. M. Lewis  0000-0002-5991-622X C. Li
0000-0002-3240-4523 L. K. Li  0000-0002-7366-1307 Y. Li  0000-0002-4413-6247
J. Libby  0000-0002-1219-3247 Q. Y. Liu  0000-0002-7684-0415 Z. Q. Liu
0000-0002-0290-3022 D. Liventsev  0000-0003-3416-0056 S. Longo
0000-0002-8124-8969 T. Lueck  0000-0003-3915-2506 T. Luo  0000-0001-5139-5784
C. Lyu  0000-0002-2275-0473 Y. Ma  0000-0001-8412-8308 M. Maggiora
0000-0003-4143-9127 S. P. Maharana  0000-0002-1746-4683 R. Maiti
0000-0001-5534-7149 S. Maity  0000-0003-3076-9243 G. Mancinelli
0000-0003-1144-3678 R. Manfredi  0000-0002-8552-6276 E. Manoni
0000-0002-9826-7947 A. C. Manthei  0000-0002-6900-5729 M. Mantovano
0000-0002-5979-5050 D. Marcantonio  0000-0002-1315-8646 S. Marcello
0000-0003-4144-863X C. Marinas  0000-0003-1903-3251 L. Martel
0000-0001-8562-0038 C. Martellini  0000-0002-7189-8343 A. Martini
0000-0003-1161-4983 T. Martinov  0000-0001-7846-1913 L. Massaccesi
0000-0003-1762-4699 M. Masuda  0000-0002-7109-5583 T. Matsuda
0000-0003-4673-570X D. Matvienko  0000-0002-2698-5448 S. K. Maurya
0000-0002-7764-5777 J. A. McKenna  0000-0001-9871-9002 R. Mehta
0000-0001-8670-3409 F. Meier  0000-0002-6088-0412 M. Merola
0000-0002-7082-8108 F. Metzner  0000-0002-0128-264X M. Milesi
0000-0002-8805-1886 C. Miller  0000-0003-2631-1790 M. Mirra
0000-0002-1190-2961 K. Miyabayashi  0000-0003-4352-734X G. B. Mohanty
0000-0001-6850-7666 N. Molina-Gonzalez  0000-0002-0903-1722 S. Mondal
0000-0002-3054-8400 S. Moneta  0000-0003-2184-7510 H.-G. Moser
0000-0003-3579-9951 M. Mrvar  0000-0001-6388-3005 R. Mussa
0000-0002-0294-9071 I. Nakamura  0000-0002-7640-5456 Y. Nakazawa
0000-0002-6271-5808 A. Narimani Charan  0000-0002-5975-550X M. Naruki
0000-0003-1773-2999 Z. Natkaniec  0000-0003-0486-9291 A. Natochii
0000-0002-1076-814X L. Nayak  0000-0002-7739-914X G. Nazaryan
0000-0002-9434-6197 N. K. Nisar  0000-0001-9562-1253 S. Nishida
0000-0001-6373-2346 S. Ogawa  0000-0002-7310-5079 H. Ono  0000-0003-4486-0064
P. Oskin  0000-0002-7524-0936 F. Otani  0000-0001-6016-219X P. Pakhlov
0000-0001-7426-4824 G. Pakhlova  0000-0001-7518-3022 A. Paladino
0000-0002-3370-259X A. Panta  0000-0001-6385-7712 E. Paoloni
0000-0001-5969-8712 S. Pardi  0000-0001-7994-0537 K. Parham
0000-0001-9556-2433 S.-H. Park  0000-0001-6019-6218 B. Paschen
0000-0003-1546-4548 A. Passeri  0000-0003-4864-3411 S. Patra
0000-0002-4114-1091 S. Paul  0000-0002-8813-0437 T. K. Pedlar
0000-0001-9839-7373 I. Peruzzi  0000-0001-6729-8436 R. Peschke
0000-0002-2529-8515 R. Pestotnik  0000-0003-1804-9470 F. Pham
0000-0003-0608-2302 M. Piccolo  0000-0001-9750-0551 L. E. Piilonen
0000-0001-6836-0748 P. L. M. Podesta-Lerma  0000-0002-8152-9605 T. Podobnik
0000-0002-6131-819X S. Pokharel  0000-0002-3367-738X C. Praz
0000-0002-6154-885X S. Prell  0000-0002-0195-8005 E. Prencipe
0000-0002-9465-2493 M. T. Prim  0000-0002-1407-7450 H. Purwar
0000-0002-3876-7069 N. Rad  0000-0002-5204-0851 P. Rados  0000-0003-0690-8100
G. Raeuber  0000-0003-2948-5155 S. Raiz  0000-0001-7010-8066 M. Reif
0000-0002-0706-0247 S. Reiter  0000-0002-6542-9954 M. Remnev
0000-0001-6975-1724 I. Ripp-Baudot  0000-0002-1897-8272 G. Rizzo
0000-0003-1788-2866 S. H. Robertson  0000-0003-4096-8393 M. Roehrken
0000-0003-0654-2866 J. M. Roney  0000-0001-7802-4617 A. Rostomyan
0000-0003-1839-8152 N. Rout  0000-0002-4310-3638 G. Russo  0000-0001-5823-4393
D. Sahoo  0000-0002-5600-9413 S. Sandilya  0000-0002-4199-4369 A. Sangal
0000-0001-5853-349X L. Santelj  0000-0003-3904-2956 Y. Sato
0000-0003-3751-2803 V. Savinov  0000-0002-9184-2830 B. Scavino
0000-0003-1771-9161 C. Schmitt  0000-0002-3787-687X M. Schnepf
0000-0003-0623-0184 C. Schwanda  0000-0003-4844-5028 Y. Seino
0000-0002-8378-4255 A. Selce  0000-0001-8228-9781 K. Senyo
0000-0002-1615-9118 J. Serrano  0000-0003-2489-7812 M. E. Sevior
0000-0002-4824-101X C. Sfienti  0000-0002-5921-8819 W. Shan
0000-0003-2811-2218 C. Sharma  0000-0002-1312-0429 C. P. Shen
0000-0002-9012-4618 X. D. Shi  0000-0002-7006-6107 T. Shillington
0000-0003-3862-4380 J.-G. Shiu  0000-0002-8478-5639 D. Shtol
0000-0002-0622-6065 B. Shwartz  0000-0002-1456-1496 A. Sibidanov
0000-0001-8805-4895 F. Simon  0000-0002-5978-0289 J. B. Singh
0000-0001-9029-2462 J. Skorupa  0000-0002-8566-621X R. J. Sobie
0000-0001-7430-7599 M. Sobotzik  0000-0002-1773-5455 A. Soffer
0000-0002-0749-2146 A. Sokolov  0000-0002-9420-0091 E. Solovieva
0000-0002-5735-4059 S. Spataro  0000-0001-9601-405X B. Spruck
0000-0002-3060-2729 M. Starič  0000-0001-8751-5944 P. Stavroulakis
0000-0001-9914-7261 S. Stefkova  0000-0003-2628-530X Z. S. Stottler
0000-0002-1898-5333 R. Stroili  0000-0002-3453-142X J. Strube
0000-0001-7470-9301 M. Sumihama  0000-0002-8954-0585 K. Sumisawa
0000-0001-7003-7210 W. Sutcliffe  0000-0002-9795-3582 H. Svidras
0000-0003-4198-2517 M. Takahashi  0000-0003-1171-5960 M. Takizawa
0000-0001-8225-3973 U. Tamponi  0000-0001-6651-0706 K. Tanida
0000-0002-8255-3746 F. Tenchini  0000-0003-3469-9377 A. Thaller
0000-0003-4171-6219 O. Tittel  0000-0001-9128-6240 R. Tiwary
0000-0002-5887-1883 D. Tonelli  0000-0002-1494-7882 E. Torassa
0000-0003-2321-0599 N. Toutounji  0000-0002-1937-6732 K. Trabelsi
0000-0001-6567-3036 I. Tsaklidis  0000-0003-3584-4484 M. Uchida
0000-0003-4904-6168 I. Ueda  0000-0002-6833-4344 Y. Uematsu
0000-0002-0296-4028 T. Uglov  0000-0002-4944-1830 K. Unger
0000-0001-7378-6671 Y. Unno  0000-0003-3355-765X K. Uno  0000-0002-2209-8198
S. Uno  0000-0002-3401-0480 P. Urquijo  0000-0002-0887-7953 Y. Ushiroda
0000-0003-3174-403X S. E. Vahsen  0000-0003-1685-9824 R. van Tonder
0000-0002-7448-4816 G. S. Varner  0000-0002-0302-8151 K. E. Varvell
0000-0003-1017-1295 M. Veronesi  0000-0002-1916-3884 V. S. Vismaya
0000-0002-1606-5349 L. Vitale  0000-0003-3354-2300 V. Vobbilisetti
0000-0002-4399-5082 R. Volpe  0000-0003-1782-2978 B. Wach  0000-0003-3533-7669
E. Waheed  0000-0001-7774-0363 M. Wakai  0000-0003-2818-3155 S. Wallner
0000-0002-9105-1625 E. Wang  0000-0001-6391-5118 M.-Z. Wang
0000-0002-0979-8341 Z. Wang  0000-0002-3536-4950 A. Warburton
0000-0002-2298-7315 M. Watanabe  0000-0001-6917-6694 S. Watanuki
0000-0002-5241-6628 M. Welsch  0000-0002-3026-1872 C. Wessel
0000-0003-0959-4784 X. P. Xu  0000-0001-5096-1182 B. D. Yabsley
0000-0002-2680-0474 S. Yamada  0000-0002-8858-9336 W. Yan  0000-0003-0713-0871
S. B. Yang  0000-0002-9543-7971 J. H. Yin  0000-0002-1479-9349 K. Yoshihara
0000-0002-3656-2326 C. Z. Yuan  0000-0002-1652-6686 L. Zani
0000-0003-4957-805X Y. Zhang  0000-0003-2961-2820 V. Zhilich
0000-0002-0907-5565 J. S. Zhou  0000-0002-6413-4687 Q. D. Zhou
0000-0001-5968-6359 V. I. Zhukova  0000-0002-8253-641X R. Žlebčík
0000-0003-1644-8523

###### Abstract

We present the first comprehensive tests of the universality of the light
leptons in the angular distributions of semileptonic $B^{0}$-meson decays to
charged spin-1 charmed mesons. We measure five angular-asymmetry observables
as functions of the decay recoil that are sensitive to lepton-universality-
violating contributions. We use events where one neutral $B$ is fully
reconstructed in $\mathchar 28935\relax\left(4S\right)\rightarrow
B\overline{B}$ decays in data corresponding to $189\leavevmode\nobreak\
\mathrm{fb}^{-1}$ integrated luminosity from electron-positron collisions
collected with the Belle II detector. We find no significant deviation from
the standard model expectations.

###### pacs:

In the standard model, all leptons share the same electroweak coupling, a
symmetry known as lepton universality (LU). Semileptonic $B$-meson decays
involving the quark transition $b\rightarrow c\,\ell\,\nu$ provide excellent
sensitivity to potential new interactions that would violate this symmetry.
Evidence for lepton-universality violation (LUV) in the ratio of semileptonic
decay rates to $\tau$ leptons relative to the light-leptons $\ell$, denoting
electrons and muons, has been reported in the combination of results from the
BaBar, Belle, and LHCb Collaborations [1, 2, 3, 4, 5, 6, 7, 8]. Recently,
evidence of LUV between the light leptons at the four-standard-deviation level
has been reported based on differences in their angular distributions in
semileptonic $B$ decays to $D^{*}$ mesons [9]. However, that analysis relied
on a reinterpretation of Belle results [10] that contained only one-
dimensional projections of the multidimensional angular distributions that are
needed to fully characterize such decays. We present the first light-lepton LU
test using a complete set of angular-asymmetry observables chosen to suppress
most theoretical and experimental uncertainties, thus optimizing sensitivity
to LUV [11]. This test is complementary to the branching-fractions-based LUV
test in Ref. [12].

The semileptonic decay $B^{0}\rightarrow D^{*-}\ell\nu$ is mediated in the
standard model via $W$-boson exchange (charge conjugation is implied
throughout). Due to the spin of the $D^{*-}$, which is reconstructed from its
decay to a $\mathit{{\mkern
4.0mu\overline{\mkern-4.0mu{D}}}{}_{\mspace{-2.0mu}\scriptstyle{}}^{\mspace{0.0mu}\scriptstyle{\rm{0}}}}$
and a charged pion, the properties of the coupling and the spin of the virtual
$W$ are encoded in angular distributions of the final-state particles. These
can be fully characterized in terms of a recoil parameter and three helicity
angles. The recoil parameter is defined as

$\displaystyle w$
$\displaystyle\equiv\frac{m_{B^{0}}^{2}+m_{D^{*}}^{2}-q^{2}}{2m_{B}m_{D^{*}}},$
(1)

where $m_{B^{0}}$ and $m_{D^{*}}$ are the known $B^{0}$ and $D^{*-}$ masses
and $q$ is the four-vector of the momentum transferred to the dilepton system
(natural units are used throughout). The helicity angles are defined as
follows: $\theta_{\ell}$ is the angle between the direction of the charged
lepton in the virtual $W$ frame and the $W$ in the $B^{0}$ frame, $\theta_{V}$
is the angle between the $\mathit{{\mkern
4.0mu\overline{\mkern-4.0mu{D}}}{}_{\mspace{-2.0mu}\scriptstyle{}}^{\mspace{0.0mu}\scriptstyle{\rm{0}}}}$
direction in the $D^{*-}$ frame and the $D^{*-}$ in the $B^{0}$ frame, and
$\chi$ is the angle between the decay planes formed by the virtual $W$ and the
$D^{*-}$ in the $B^{0}$ frame. Of these angles, only $\theta_{\ell}$ is
correlated to lab-frame quantities.

The four-dimensional standard-model differential rate can be represented in
terms of eight helicity amplitudes and as a function of $w$,
$\cos\theta_{\ell}$, $\cos\theta_{V}$, and $\chi$ [13, 14]. It is possible to
construct one- or two-dimensional integrals of these differential rates to
isolate angular asymmetries that are sensitive to LUV, called
$A_{\mathrm{FB}}$, $S_{3}$, $S_{5}$, $S_{7}$, and $S_{9}$ [11]. The forward-
backward asymmetry $A_{\mathrm{FB}}$ measures the tendency for the charged
lepton to travel in the same direction as the virtual $W$. The $S_{3}$ and
$S_{9}$ asymmetries are sensitive to the alignment of the lepton and $D^{*}$
momenta, while $S_{5}$ and $S_{7}$ measure coupled alignments in the
orientation of the $D$ with respect to the $D^{*}$. We redefine these
asymmetries in terms of one-dimensional integrals

$\mathcal{A}_{x}(w)\equiv\left(\frac{\mathrm{d}\Gamma}{\mathrm{d}w}\right)^{-1}\left[\int_{0}^{1}-\int_{-1}^{0}\right]\mathrm{d}x\frac{\mathrm{d}^{2}\Gamma}{\mathrm{d}w\mathrm{d}x},$
(2)

with $x=\cos\theta_{\ell}$ for $A_{\mathrm{FB}}$, $\cos 2\chi$ for $S_{3}$,
$\cos\chi\cos\theta_{V}$ for $S_{5}$, $\sin\chi\cos\theta_{V}$ for $S_{7}$,
and $\sin 2\chi$ for $S_{9}$, as illustrated in the supplemental material
[15]. The determination of each of the five asymmetries then reduces to
measuring the signal yields $N^{-}_{x}$ with $x\in[-1,0)$ and $N^{+}_{x}$ with
$x\in[0,1]$ after accounting for experimental effects such as resolution and
detector acceptance. The asymmetries are then calculated as

$\mathcal{A}_{x}(w)=\frac{N^{+}_{x}(w)-N^{-}_{x}(w)}{N^{+}_{x}(w)+N^{-}_{x}(w)}.$
(3)

The differences between the angular asymmetries of electrons and muons,

$\Delta\mathcal{A}_{x}(w)\equiv\mathcal{A}^{\mu}_{x}(w)-\mathcal{A}^{e}_{x}(w),$
(4)

are sensitive to interactions that violate LU. Most experimental uncertainties
cancel in the asymmetries $\mathcal{A}_{x}$, and standard-model contributions
largely cancel in the asymmetry differences $\Delta\mathcal{A}_{x}$, only
arising from the differences in lepton masses. Therefore, the compatibility
between measurements of the asymmetry differences $\Delta\mathcal{A}_{x}$ and
their standard-model expectations is a powerful test of LU. To optimize
sensitivity to extensions of the standard model [11], we measure these
variables integrated over three $w$ ranges: the full phase-space
($w_{\textrm{incl.}}$), the low $w$ region ($w_{\textrm{low}}$) from $1$ up to
$1.275$, and the high $w$ region ($w_{\textrm{high}}$) from $1.275$ to the
kinematic endpoint at $1.503$.

For each asymmetry $\mathcal{A}_{x}$ and $w$ range, we separate signal
candidates into angular categories $+$ and $-$ based on the measured value of
$x$. We determine the numbers of signal events $N^{\pm}_{x}$ with fits to
distributions of $M_{\mathrm{miss}}^{2}$, the squared difference between the
sum of the four-momenta of the colliding particles and the sum of the four-
momenta of the reconstructed particles. The $M_{\mathrm{miss}}^{2}$
distribution for correctly reconstructed signal events peaks near zero, while
the distribution for backgrounds, which come mostly from $B\rightarrow
D^{**}\ell\nu$ decays, does not peak. We correct these event numbers for
detector efficiency, acceptance, and resolution effects determined from
simulation in order to calculate unbiased asymmetries.

Of the five asymmetries, only $A_{\mathrm{FB}}$ and $S_{3}$ have been
measured, but not differentially in $w$ [9, 16, 17]. In the standard model or
any extension thereof, $S_{9}$ is always zero [9]. Similarly, $S_{7}$ is
always zero in the standard model and has reduced sensitivity to its
extensions [11]. In contrast, $A_{\mathrm{FB}}$, $S_{3}$, and $S_{5}$ are
highly sensitive to LUV via their asymmetry differences, which should show
highly correlated deviations from the SM expectations in the case of new
interactions. Therefore, correlated LUV signatures between the asymmetry
differences can help to probe the nature of any new interactions. Therefore,
the simultaneous determination of all asymmetries in different $w$ ranges
provides a powerful test of LU and probes the nature of non-standard-model
interactions.

We measure the asymmetries and their differences using a dataset corresponding
to $189\text{\text{ }}{\mathrm{fb}}^{-1}$ of electron-positron collisions at
10.58 GeV center-of-mass energy collected by the Belle II experiment between
2019 and 2021. We use the Belle II detector [18] to reconstruct $\mathchar
28935\relax\left(4S\right)$ $\rightarrow B^{0}\mathit{{\mkern
4.0mu\overline{\mkern-4.0mu{B}}}{}_{\mspace{-2.0mu}\scriptstyle{}}^{\mspace{0.0mu}\scriptstyle{\rm{0}}}}$
decays. The detector consists of several nested subsystems in a cylindrical
barrel, closed on either end with endcaps, arranged around the interaction
region and nearly coaxial with the beams. The innermost subsystem is the
vertex detector, composed of two layers of silicon pixels and four outer
layers of silicon-strip detectors. During data collection for this analysis
the outermost pixel layer only covered $15\%$ of the azimuth. Charged-particle
trajectories (tracks) are reconstructed by a small-cell drift chamber (CDC)
filled with a He $50\%$ and $\mathrm{C}_{2}\mathrm{H}_{6}$ $50\%$ gas mixture,
which also provides a measurement of ionization energy-loss for particle
identification. A Cherenkov-light imaging and time-of-propagation detector
(TOP) provides charged pion and kaon identification information in the barrel
region. This information is provided in the forward endcap by a proximity-
focusing, ring-imaging Cherenkov detector with an aerogel radiator. An
electromagnetic calorimeter (ECL) consisting of CsI(Tl) crystals provides
neutral-particle and electron identification information in the barrel and
both endcaps. All of the above subsystems are immersed in a uniform 1.5 T
magnetic field that is nearly aligned with the electron beam and is generated
by a superconducting solenoid situated outside the calorimeter. The outermost
subsystem, the $K^{0}_{\scriptscriptstyle L}$ and muon identification
detector, consists of scintillator strips in the endcaps and the inner part of
the barrel, and resistive-plate chambers in the outer barrel, interleaved with
iron plates that serve as a magnetic flux-return yoke.

We use Monte Carlo (MC) simulation to model the signal and backgrounds and to
calculate reconstruction efficiencies. We use the software libraries EvtGen
[19], PYTHIA [20], and KKMC [21] to model particle production and decay,
PHOTOS [22] for photon radiation, and GEANT4 [23] for detector response. We
overlay simulated beam-induced backgrounds on the simulated events [24]. We
simulate 900$\mbox{\,fb}^{-1}$ of $B^{0}\rightarrow D^{*-}\ell\nu$ decays with
the form factors of Refs. [25, 26, 27] and values determined by the
measurements of Refs. [10]. We use the Belle II analysis software, basf2 [28,
29], to reconstruct simulated and experimental data identically.

In each event, we use the full event interpretation (FEI) algorithm [30] to
fully reconstruct one neutral $B^{0}$, called the tag $B^{0}$. The FEI
reconstructs tag $B^{0}$ candidates in explicit hadronic decay cascades with
no missing particles. Each tag $B^{0}$ candidate then consists of a collection
of detected tracks and neutral energy depositions (clusters) and a hypothesis
for the full $B^{0}$ decay cascade that produced them. We use three variables
to select correctly reconstructed tags. The beam-constrained mass
$M_{\textrm{bc}}$ is calculated from the center-of-mass collision energy
$\sqrt{s}$ and tag-$B$ momentum $\vec{p}_{B}$,

$M_{\textrm{bc}}=\sqrt{\left(\sqrt{s}/2\right)^{2}-|{\vec{p}_{B}}|^{2}}.$ (5)

The energy difference $\Delta E=E_{B}-\sqrt{s}/2$ is the difference between
the center-of-mass collision energy and tag-$B$ energy $E_{B}$. Finally, a
tag-reconstruction confidence score, $\mathcal{P}_{\text{FEI}}$, valued
between zero and one, quantifies the agreement between the kinematic
properties of the detected particles and the hypothesized decay cascade.

Correctly and completely reconstructed $B^{0}$ candidates have
$M_{\textrm{bc}}$ near the $B^{0}$ mass, $\Delta E$ near zero, and
$\mathcal{P}_{\text{FEI}}$ near 1. We require that tag $B^{0}$ candidates
satisfy $M_{\textrm{bc}}>5.27\mathrm{\,Ge\kern-1.00006ptV}$, $\Delta
E\in[-0.15,0.1]\mathrm{\,Ge\kern-1.00006ptV}$, and
$\mathcal{P}_{\text{FEI}}>0.001$. If multiple tag $B^{0}$ candidates in an
event pass these selections, we keep only the one with the highest value of
$\mathcal{P}_{\text{FEI}}$.

In events with an identified tag $B^{0}$ candidate, we reconstruct
$B^{0}\rightarrow D^{*-}(\rightarrow\overline{D}{}^{0}\pi^{-})\ell\nu$
candidates with $\mathit{{\mkern
4.0mu\overline{\mkern-4.0mu{D}}}{}_{\mspace{-2.0mu}\scriptstyle{}}^{\mspace{0.0mu}\scriptstyle{\rm{0}}}}$
decaying to $K^{+}$$\pi^{-}$, $K^{+}$$\pi^{-}$$\pi^{+}$$\pi^{-}$,
$K^{+}$$\pi^{-}$$\pi^{0}$, $K^{+}$$\pi^{-}$$\pi^{+}$$\pi^{-}$$\pi^{0}$,
$K^{0}_{\scriptscriptstyle S}$$\pi^{+}$$\pi^{-}$, $K^{0}_{\scriptscriptstyle
S}$$\pi^{+}$$\pi^{-}$$\pi^{0}$, $K^{0}_{\scriptscriptstyle S}$$\pi^{0}$, or
$K^{+}$$K^{-}$ final states. We require that all tracks originate from the
vicinity of the interaction point. We require that each lepton candidate have
a lab-frame momentum above $0.4\mathrm{\,Ge\kern-1.00006ptV}$, and a polar
angle within the range $[0.22,2.71]$ rad for electrons and $[0.4,2.6]$ rad for
muons, to ensure that suitable particle-identification information is
available. Leptons are identified using the ratio of their likelihood to the
sum of likelihoods for all charged-particle types. These likelihoods combine
particle-identification information from the CDC, ECL, and, for muons, the
TOP. We retain lepton candidates with a likelihood ratio above $0.9$,
resulting in electron and muon identification efficiencies of 86% and 89%,
respectively, and hadron misidentification rates of less than $1\%$ and $3\%$,
respectively. We determine lepton-identification efficiencies and their
uncertainties from auxiliary measurements in discrete intervals of lab-frame
momentum, polar angle, and charge, using
${J\mskip-3.0mu/\mskip-2.0mu\psi\mskip 2.0mu}\rightarrow\ell^{+}\ell^{-}$,
$e^{+}e^{-}\rightarrow\ell^{+}\ell^{-}(\gamma)$, and
$e^{+}e^{-}\rightarrow(e^{+}e^{-})\ell^{+}\ell^{-}$ events.

We reconstruct $\pi^{0}$ candidates via decays to two photons. We identify
photon candidates from ECL clusters unassociated with any matched tracks and
with timing selections designed to minimize contamination from beam-induced
backgrounds. We require that each $\pi^{0}$ candidate have an invariant mass
in the range $[0.120,0.145]\mathrm{\,Ge\kern-1.00006ptV}$, approximately four
times the diphoton mass resolution. The $\pi^{0}$ reconstruction and selection
efficiency is approximately $0.3$.

We reconstruct $K^{0}_{\scriptscriptstyle S}$ candidates via decays to two
charged particles that are assigned the pion mass. We require that each
$K^{0}_{\scriptscriptstyle S}$ candidate has an invariant mass in the range
$[0.3,0.7]\mathrm{\,Ge\kern-1.00006ptV}$ and that it can be fit to a common
vertex that is displaced from the interaction point by at least one unit of
the uncertainty of the vertex fit. We also require that the angle between the
momentum of the $K^{0}_{\scriptscriptstyle S}$ candidate and the displacement
of the vertex from the interaction point be less than $0.64$ rad.

We require that the mass of each $\mathit{{\mkern
4.0mu\overline{\mkern-4.0mu{D}}}{}_{\mspace{-2.0mu}\scriptstyle{}}^{\mspace{0.0mu}\scriptstyle{\rm{0}}}}$
candidate is in the range $[1.85,1.88]\mathrm{\,Ge\kern-1.00006ptV}$,
corresponding to approximately four times the peak resolution and centered on
the known mass. We reconstruct $D^{*-}$ candidates by combining
$\mathit{{\mkern
4.0mu\overline{\mkern-4.0mu{D}}}{}_{\mspace{-2.0mu}\scriptstyle{}}^{\mspace{0.0mu}\scriptstyle{\rm{0}}}}$
candidates with each of the remaining tracks, which we label
$\mathit{{\pi}{}_{\mspace{-3.0mu}\scriptstyle{\mathrm{slow}}}^{\mspace{-1.0mu}\scriptstyle{}}}$,
and require that the mass difference between the $\mathit{{\mkern
4.0mu\overline{\mkern-4.0mu{D}}}{}_{\mspace{-2.0mu}\scriptstyle{}}^{\mspace{0.0mu}\scriptstyle{\rm{0}}}}$
and $D^{*-}$ candidates is in the range
$[0.143,0.148]\mathrm{\,Ge\kern-1.00006ptV}$, approximately four times its
resolution.

We combine $D^{*-}$ and lepton candidates to form signal $B^{0}$ candidates
and use the TreeFit [31] algorithm to reject candidates that cannot be fit to
consistent vertices. We then combine the signal and tag $B^{0}$ candidates and
require that no additional tracks remain in the event and that the difference
between the reconstructed energy and the collision energy is greater than
$0.3\mathrm{\,Ge\kern-1.00006ptV}$, in order to reject hadronic decay
backgrounds. If more than one candidate passes these requirements, we select
only the one closest to expectation in the well-modeled quantity
$|M(D^{*})-M(D)|$.

We obtain the signal yield for each combination of lepton flavor, $w$
interval, and angular category ($+$ or $-$ as defined for a particular
asymmetry $\mathcal{A}_{x}$) using a binned maximum-likelihood fit to the
distribution of $M_{\mathrm{miss}}^{2}$. The signal yield $N^{\pm}_{x}(w)$ and
the background yield are unconstrained in the fit, allowing for an effective
background-subtraction that removes dependence on the angular asymmetry of the
backgrounds. We determine the shapes of the signal and background with
simulation and choose a coarse binning to minimize dependence on resolution
modeling. In Fig. 1 we show the two such independent fits that determine
$N^{+}_{x}$ and $N^{-}_{x}$ for $x=\cos\theta_{\ell}$ in the muon mode and in
the $w_{\textrm{incl.}}$ bin. Together, these yields determine
$A_{\mathrm{FB}}^{\mu}(w_{\textrm{incl.}})$. We find 1617 (1639) signal events
in the electron (muon) mode overall, with a variation of less than one event
between variables. Of these, 803 (853) are in the $w_{\textrm{low}}$ range.

Figure 1: Muon-mode $M_{\mathrm{miss}}^{2}$ distributions and fit results for
$\cos\theta_{\ell}$ in the ranges $[-1,0)$ (left) and $[0,1]$ (right),
corresponding to the $-$ and $+$ categories of $A_{\mathrm{FB}}^{\mu}$, in the
full $w$ range ($w_{\textrm{incl.}}$).

We correct the fitted yields $N_{x}^{\pm}(w)$ for selection and detector
acceptance losses using efficiency estimates from simulation. The efficiency
ratios between the $+$ and $-$ categories are typically near $1.0$ but range
up to nearly $1.4$ for $A_{\mathrm{FB}}$, largely due to the reduced momentum
of leptons in the $-$ category, which are emitted opposite to the direction of
the boost of the $B$ mesons, relative to the $+$ leptons, which are emitted in
the direction of the boost. This lower momentum results in lower
reconstruction and identification efficiencies. We further correct for
migration of candidates between the $+$ and $-$ categories and different $w$
bins by inverting a detector-response matrix. This matrix is constructed from
the conditional probabilities that events generated in a particular kinematic
bin are reconstructed in each kinematic bin. For every variable and bin, the
probability of reconstruction into the correct bin is above $0.86$.

The largest systematic uncertainty affecting the measurement is from the size
of the simulated samples, which limits the precision of the bin-migration and
efficiency corrections. We determine this uncertainty from the standard
deviation of the results obtained by repeatedly resampling the simulated data
with replacement and refitting. This uncertainty is approximately one-fourth
to one-half of the statistical uncertainty, ranging in 0.010–0.025. We
determine the uncertainties from other systematic effects by varying their
contribution within their known uncertainties or bounds [32] or from
independent control data. Lepton-identification uncertainties mostly cancel in
the asymmetries $\mathcal{A}$ and are at most $0.004$. The uncertainty on the
reconstruction efficiency of $\pi_{\mathrm{slow}}$ also largely cancels and is
negligible. Uncertainties from modeling of the background processes, such as
$B\rightarrow D^{**}\ell\bar{\nu}_{\ell}$, are negligible due to fitting the
backgrounds independently in $+$ and $-$ categories. The supplemental material
contains a full list of all of the systematic uncertainties [15].

Figure 2: Observed asymmetries and their differences (points with error bars), one-standard-deviation bands from the Belle [16] and Belle II [17] measurements (hatched boxes), calculations from Ref. [9] based on a previous measurement from Belle [10](empty boxes), and standard-model expectations (solid boxes). The standard-model expectation is drawn with a dashed line when its uncertainty is too small to display.  Table 1: Summary of the results and comparison with expectations. The measurement uncertainties are statistical and systematic, respectively. Obs. |  $w$ bin | $\Delta\mathcal{A}_{x}$ | SM expectation
---|---|---|---
$\Delta A_{\mathrm{FB}}$ | $w_{\mathrm{low}}$ | $\phantom{-}0.099\pm 0.056\pm 0.020$ | $-0.00104$
| $w_{\mathrm{high}}$ | $-0.168\pm 0.068\pm 0.024$ | $-0.01133$
| $w_{\mathrm{incl.}}$ | $-0.024\pm 0.043\pm 0.016$ | $-0.00566$
$\Delta S_{3}$ | $w_{\mathrm{low}}$ | $-0.026\pm 0.068\pm 0.024$ | $\phantom{-}0.00028$
| $w_{\mathrm{high}}$ | $-0.101\pm 0.069\pm 0.025$ | $\phantom{-}0.00023$
| $w_{\mathrm{incl.}}$ | $-0.062\pm 0.047\pm 0.017$ | $\phantom{-}0.00018$
$\Delta S_{5}$ | $w_{\mathrm{low}}$ | $-0.019\pm 0.068\pm 0.024$ | $\phantom{-}0.00027$
| $w_{\mathrm{high}}$ | $-0.055\pm 0.065\pm 0.023$ | $\phantom{-}0.00107$
| $w_{\mathrm{incl.}}$ | $-0.035\pm 0.046\pm 0.016$ | $\phantom{-}0.00049$
$\Delta S_{7}$ | $w_{\mathrm{low}}$ | $\phantom{-}0.028\pm 0.067\pm 0.024$ | $\phantom{-}0\phantom{.00000}$
| $w_{\mathrm{high}}$ | $-0.066\pm 0.065\pm 0.022$ | $\phantom{-}0\phantom{.00000}$
| $w_{\mathrm{incl.}}$ | $-0.026\pm 0.046\pm 0.016$ | $\phantom{-}0\phantom{.00000}$
$\Delta S_{9}$ | $w_{\mathrm{low}}$ | $\phantom{-}0.032\pm 0.067\pm 0.024$ | $\phantom{-}0\phantom{.00000}$
| $w_{\mathrm{high}}$ | $\phantom{-}0.020\pm 0.068\pm 0.024$ | $\phantom{-}0\phantom{.00000}$
| $w_{\mathrm{incl.}}$ | $\phantom{-}0.020\pm 0.047\pm 0.017$ | $\phantom{-}0\phantom{.00000}$

Figure 2 shows our measurements of the asymmetries and the LUV-sensitive
differences and Table 1 shows the numerical values. The numerical values and
full covariance matrices of the measured observables will be made available on
HEPData [33]. These measurements are the first comprehensive tests of lepton
universality in the angular distributions of semileptonic $B$ decays. We
compare our measurements to predictions from Ref. [34] and measurements from
Refs. [9, 16, 17]. The results in Ref. [9] are obtained in a slightly reduced
$w$ range, $[1,1.5]$, which makes them not strictly comparable to the other
results. However, the standard-model expectations in these two $w$ ranges
differ only in the fourth decimal place. The results from Refs. [9, 17] derive
from analyses without explicit reconstruction of the tag $B$, resulting in
lower statistical uncertainties relative to these results.

To test agreement with the standard-model expectation [34], we perform three
different $\chi^{2}$ tests, accounting for the statistical and systematic
covariances between all of the variables. Tests of the asymmetries
$\mathcal{A}$ in the full $w$ range ($w_{\textrm{incl.}}$) yield
$\chi^{2}/N_{\textrm{dof}}=14.6/10$ ($p=0.15$) and in $w$ subranges
($w_{\textrm{low}}$, $w_{\textrm{high}}$) yield $26.7/20$ ($p=0.14$). Tests of
the LUV-sensitive asymmetry differences $\Delta A_{\mathrm{FB}}$, $\Delta
S_{3}$, and $\Delta S_{5}$ in the $w_{\textrm{incl.}}$ range yield
$\chi^{2}/N_{\textrm{dof}}=2.0/3$ ($p=0.57$) and in $w$ subranges yield
$10.2/6$ ($p=0.13$). Tests of the insensitive quantities $\Delta S_{7}$ and
$\Delta S_{9}$ in the $w_{\textrm{incl.}}$ range yield
$\chi^{2}/N_{\textrm{dof}}=0.6/2$ ($p=0.76$) and in $w$ subranges yield
$1.5/4$ ($p=0.83$). Our results agree well with the standard-model
expectations and provide no evidence for LUV.

This work, based on data collected using the Belle II detector, which was
built and commissioned prior to March 2019, was supported by Science Committee
of the Republic of Armenia Grant No. 20TTCG-1C010; Australian Research Council
and research Grants No. DE220100462, No. DP180102629, No. DP170102389, No.
DP170102204, No. DP150103061, No. FT130100303, No. FT130100018, and No.
FT120100745; Austrian Federal Ministry of Education, Science and Research,
Austrian Science Fund No. P 31361-N36 and No. J4625-N, and Horizon 2020 ERC
Starting Grant No. 947006 “InterLeptons”; Natural Sciences and Engineering
Research Council of Canada, Compute Canada and CANARIE; Chinese Academy of
Sciences and research Grant No. QYZDJ-SSW-SLH011, National Natural Science
Foundation of China and research Grants No. 11521505, No. 11575017, No.
11675166, No. 11761141009, No. 11705209, and No. 11975076, LiaoNing
Revitalization Talents Program under Contract No. XLYC1807135, Shanghai
Pujiang Program under Grant No. 18PJ1401000, Shandong Provincial Natural
Science Foundation Project ZR2022JQ02, and the CAS Center for Excellence in
Particle Physics (CCEPP); the Ministry of Education, Youth, and Sports of the
Czech Republic under Contract No. LTT17020 and Charles University Grant No.
SVV 260448 and the Czech Science Foundation Grant No. 22-18469S; European
Research Council, Seventh Framework PIEF-GA-2013-622527, Horizon 2020 ERC-
Advanced Grants No. 267104 and No. 884719, Horizon 2020 ERC-Consolidator Grant
No. 819127, Horizon 2020 Marie Sklodowska-Curie Grant Agreement No. 700525
”NIOBE” and No. 101026516, and Horizon 2020 Marie Sklodowska-Curie RISE
project JENNIFER2 Grant Agreement No. 822070 (European grants); L’Institut
National de Physique Nucléaire et de Physique des Particules (IN2P3) du CNRS
(France); BMBF, DFG, HGF, MPG, and AvH Foundation (Germany); Department of
Atomic Energy under Project Identification No. RTI 4002 and Department of
Science and Technology (India); Israel Science Foundation Grant No. 2476/17,
U.S.-Israel Binational Science Foundation Grant No. 2016113, and Israel
Ministry of Science Grant No. 3-16543; Istituto Nazionale di Fisica Nucleare
and the research grants BELLE2; Japan Society for the Promotion of Science,
Grant-in-Aid for Scientific Research Grants No. 16H03968, No. 16H03993, No.
16H06492, No. 16K05323, No. 17H01133, No. 17H05405, No. 18K03621, No.
18H03710, No. 18H05226, No. 19H00682, No. 22H00144, No. 26220706, and No.
26400255, the National Institute of Informatics, and Science Information
NETwork 5 (SINET5), and the Ministry of Education, Culture, Sports, Science,
and Technology (MEXT) of Japan; National Research Foundation (NRF) of Korea
Grants No. 2016R1D1A1B02012900, No. 2018R1A2B3003643, No. 2018R1A6A1A06024970,
No. 2018R1D1A1B07047294, No. 2019R1I1A3A01058933, No. 2022R1A2C1003993, and
No. RS-2022-00197659, Radiation Science Research Institute, Foreign Large-size
Research Facility Application Supporting project, the Global Science
Experimental Data Hub Center of the Korea Institute of Science and Technology
Information and KREONET/GLORIAD; Universiti Malaya RU grant, Akademi Sains
Malaysia, and Ministry of Education Malaysia; Frontiers of Science Program
Contracts No. FOINS-296, No. CB-221329, No. CB-236394, No. CB-254409, and No.
CB-180023, and No. SEP-CINVESTAV research Grant No. 237 (Mexico); the Polish
Ministry of Science and Higher Education and the National Science Center; the
Ministry of Science and Higher Education of the Russian Federation, Agreement
No. 14.W03.31.0026, and the HSE University Basic Research Program, Moscow;
University of Tabuk research Grants No. S-0256-1438 and No. S-0280-1439 (Saudi
Arabia); Slovenian Research Agency and research Grants No. J1-9124 and No.
P1-0135; Agencia Estatal de Investigacion, Spain Grant No. RYC2020-029875-I
and Generalitat Valenciana, Spain Grant No. CIDEGENT/2018/020 Ministry of
Science and Technology and research Grants No. MOST106-2112-M-002-005-MY3 and
No. MOST107-2119-M-002-035-MY3, and the Ministry of Education (Taiwan);
Thailand Center of Excellence in Physics; TUBITAK ULAKBIM (Turkey); National
Research Foundation of Ukraine, project No. 2020.02/0257, and Ministry of
Education and Science of Ukraine; the U.S. National Science Foundation and
research Grants No. PHY-1913789 and No. PHY-2111604, and the U.S. Department
of Energy and research Awards No. DE-AC06-76RLO1830, No. DE-SC0007983, No. DE-
SC0009824, No. DE-SC0009973, No. DE-SC0010007, No. DE-SC0010073, No. DE-
SC0010118, No. DE-SC0010504, No. DE-SC0011784, No. DE-SC0012704, No. DE-
SC0019230, No. DE-SC0021274, No. DE-SC0022350; and the Vietnam Academy of
Science and Technology (VAST) under Grant No. DL0000.05/21-23.

These acknowledgements are not to be interpreted as an endorsement of any
statement made by any of our institutes, funding agencies, governments, or
their representatives.

We thank the SuperKEKB team for delivering high-luminosity collisions; the KEK
cryogenics group for the efficient operation of the detector solenoid magnet;
the KEK computer group and the NII for on-site computing support and SINET6
network support; and the raw-data centers at BNL, DESY, GridKa, IN2P3, INFN,
and the University of Victoria for offsite computing support.

## References

  * Lees  _et al._ [2012] J. P. Lees _et al._ (BaBar Collaboration), Evidence for an excess of $\overline{B}\rightarrow D^{(*)}\tau^{-}\overline{\nu}_{\tau}$ decays, Phys. Rev. Lett. 109, 101802 (2012).
  * Lees  _et al._ [2013] J. P. Lees _et al._ (BaBar Collaboration), Measurement of an excess of $\overline{B}\rightarrow D^{(*)}\tau^{-}\overline{\nu}_{\tau}$ decays and implications for charged Higgs bosons, Phys. Rev. D 88, 072012 (2013).
  * Huschle  _et al._ [2015] M. Huschle _et al._ (Belle Collaboration), Measurement of the branching ratio of $\overline{B}\rightarrow D^{(\ast)}\tau^{-}\overline{\nu}_{\tau}$ relative to $\overline{B}\rightarrow D^{(\ast)}\ell^{-}\overline{\nu}_{\ell}$ decays with hadronic tagging at Belle, Phys. Rev. D 92, 072014 (2015).
  * Caria  _et al._ [2020] G. Caria _et al._ (Belle Collaboration), Measurement of $R(D)$ and $R(D^{*})$ with a semileptonic ttagging method, Phys. Rev. Lett. 124 (2020).
  * Hirose  _et al._ [2017] S. Hirose _et al._ (Belle Collaboration), Measurement of the $\tau$ lepton polarization and $R(D^{*})$ in the decay $\overline{B}\rightarrow D^{*}\tau^{-}\overline{\nu}_{\tau}$, Phys. Rev. Lett. 118, 211801 (2017).
  * Aaij  _et al._ [2015] R. Aaij _et al._ (LHCb Collaboration), Measurement of the ratio of branching fractions $\mathcal{B}(\overline{B}^{0}\rightarrow D^{*+}\tau^{-}\overline{\nu}_{\tau})/\mathcal{B}(\overline{B}^{0}\rightarrow D^{*+}\mu^{-}\overline{\nu}_{\mu})$, Phys. Rev. Lett. 115, 111803 (2015), [Erratum: Phys. Rev. Lett. 115, 159901 (2015)].
  * Aaij  _et al._ [2018a] R. Aaij _et al._ (LHCb Collaboration), Measurement of the ratio of the $B^{0}\rightarrow D^{*-}\tau^{+}\nu_{\tau}$ and $B^{0}\rightarrow D^{*-}\mu^{+}\nu_{\mu}$ branching fractions using three-prong $\tau$-lepton decays, Phys. Rev. Lett. 120, 171802 (2018a).
  * Aaij  _et al._ [2018b] R. Aaij _et al._ (LHCb Collaboration), Test of lepton flavor universality by the measurement of the ${B}^{0}\rightarrow{{D}^{*}}^{-}{\tau}^{+}{\nu}_{\tau}$ branching fraction using three-prong $\tau$ decays, Phys. Rev. D 97, 072013 (2018b).
  * Bobeth  _et al._ [2021] C. Bobeth _et al._ , Lepton-flavour non-universality of ${\overline{B}}\rightarrow D^{*}\ell{{\overline{\nu}}}$ angular distributions in and beyond the Standard Model, Eur. Phys. J. C 81, 984 (2021).
  * Waheed  _et al._ [2019] E. Waheed _et al._ (Belle Collaboration), Measurement of the CKM matrix element $|V_{cb}|$ from $B^{0}\rightarrow D^{*-}\ell^{+}\nu_{\ell}$ at Belle, Phys. Rev. D 100, 052007 (2019), [Erratum: Phys. Rev. D 103, 079901 (2021)].
  * Bhattacharya  _et al._ [2023] B. Bhattacharya _et al._ , Implications for the $\mathrm{\Delta}{A}_{FB}$ anomaly in ${\overline{B}}^{0}\rightarrow{D}^{*+}{\ell}^{-}\overline{\nu}$ using a new Monte Carlo event generator, Phys. Rev. D 107, 015011 (2023).
  * Aggarwal  _et al._ [2023] L. Aggarwal _et al._ (Belle II Collaboration), Test of Light-Lepton Universality in the Rates of Inclusive Semileptonic $B$-Meson Decays at Belle II, Phys. Rev. Lett. 131, 051804 (2023).
  * Korner and Schuler [1990] J. G. Korner and G. A. Schuler, Exclusive semileptonic heavy meson decays including lepton mass effects, Z. Phys. C 46, 93 (1990).
  * Gilman and Singleton [1990] F. J. Gilman and R. L. Singleton, Analysis of semileptonic decays of mesons containing heavy quarks, Phys. Rev. D 41, 142 (1990).
  * [15] See Supplemental Material at http://link.aps.org/supplemental/10.1103/PhysRevLett.131.181801 for additional information regarding construction of asymmetry integrals, statistical and systematic uncertainties, and covariance matrices .
  * Prim  _et al._ [2023] M. T. Prim _et al._ (Belle Collaboration), Measurement of Differential Distributions of $B\rightarrow D^{*}\ell\overline{\nu_{\ell}}$ and Implications on $|V_{cb}|$ arXiv:2301.07529 (2023).
  * Adachi  _et al._ [2023] I. Adachi _et al._ (Belle II Collaboration), Determination of $|V_{cb}|$ using $\overline{B}^{0}\rightarrow D^{*+}\ell^{-}\bar{\nu}_{\ell}$ decays with Belle II, Submitted to Phys. Rev. D (2023), arXiv:2310.01170 [hep-ex] .
  * Abe [2010] T. Abe (Belle II Collaboration), Belle II technical design report (2010), arXiv:1011.0352 .
  * Lange [2001] D. J. Lange, The EvtGen particle decay simulation package, Nucl. Instrum. Meth. A 462, 152 (2001).
  * Sjöstrand  _et al._ [2015] T. Sjöstrand _et al._ , An introduction to PYTHIA 8.2, Comput. Phys. Commun. 191, 159 (2015).
  * Jadach  _et al._ [2000] S. Jadach _et al._ , The Precision Monte Carlo event generator KK for two fermion final states in $e^{+}e^{-}$ collisions, Comput. Phys. Commun. 130, 260 (2000).
  * Barberio  _et al._ [1991] E. Barberio, B. van Eijk, and Z. Was, PHOTOS: A Universal Monte Carlo for QED radiative corrections in decays, Comput. Phys. Commun. 66, 115 (1991).
  * Agostinelli  _et al._ [2003] S. Agostinelli _et al._ (Geant4 Collaboration), Geant4—a simulation toolkit, Nucl. Instrum. Meth. A 506, 250 (2003).
  * Natochii  _et al._ [2022] A. Natochii _et al._ , Beam background expectations for Belle II at SuperKEKB, (2022), arXiv:2203.05731 .
  * Boyd  _et al._ [1995] C. G. Boyd, B. Grinstein, and R. F. Lebed, Constraints on form-factors for exclusive semileptonic heavy to light meson decays, Phys. Rev. Lett. 74, 4603 (1995).
  * Grinstein and Kobach [2017] B. Grinstein and A. Kobach, Model-independent extraction of $|V_{cb}|$ from $\overline{B}\rightarrow D^{*}\ell\overline{\nu}$, Phys. Lett. B 771, 359 (2017).
  * Bigi  _et al._ [2017] D. Bigi, P. Gambino, and S. Schacht, A fresh look at the determination of $|V_{cb}|$ from $B\rightarrow D^{*}\ell\nu$, Phys. Lett. B 769, 441 (2017).
  * Kuhr  _et al._ [2019] T. Kuhr _et al._ (Belle II Framework Software Group), The Belle II Core Software, Comput. Softw. Big Sci. 3, 1 (2019).
  * The Belle II Collaboration [2022] The Belle II Collaboration, Belle II Analysis Software Framework (basf2) (2022).
  * Keck  _et al._ [2019] T. Keck _et al._ , The Full Event Interpretation: An exclusive tagging algorithm for the Belle II experiment, Comput. Softw. Big Sci. 3, 6 (2019).
  * Hulsbergen [2009] W. Hulsbergen, The global covariance matrix of tracks fitted with a Kalman filter and an application in detector alignment, Nucl. Instr. Meth. A 600, 471 (2009).
  * Workman  _et al._ [2022] R. L. Workman _et al._ (Particle Data Group), Review of Particle Physics, PTEP 2022, 083C01 (2022).
  * [33] https://www.hepdata.net/record/144759.
  * Bernlochner  _et al._ [2022] F. U. Bernlochner _et al._ , Constrained second-order power corrections in HQET: $R(D^{(*)})$, $|V_{cb}|$, and new physics, Phys. Rev. D 106, 096015 (2022).