Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
4ac217a5
Commit
4ac217a5
authored
Sep 14, 2021
by
Peterson, Peter
Browse files
Minor rewording of docs and exception
parent
7187a1b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Framework/Kernel/src/Unit.cpp
View file @
4ac217a5
...
...
@@ -661,7 +661,7 @@ double dSpacing::singleToTOF(const double x) const {
/**
* DIFA * d^2 + DIFC * d + T0 - TOF = 0
*
* Use the citardauq formula to solve quadratic in order to minimise loss of precision. citar
q
auq (quadratic spelled
* Use the citardauq formula to solve quadratic in order to minimise loss of precision. citar
d
auq (quadratic spelled
* backwards) is an alternate formulation of the quadratic formula. DIFC and sqrt term are often similar and the
* "classic" quadratic formula involves calculating their difference in the numerator
*
...
...
@@ -688,8 +688,8 @@ double dSpacing::singleFromTOF(const double tof) const {
// non-physical result
if
(
tzero
>
tof
)
{
if
(
difa
>
0.
)
{
throw
std
::
runtime_error
(
"Cannot convert to
imaginary
d spacing because tzero > time-of-flight and difa is "
"
positive.
Quadratic doesn't have a positive root"
);
throw
std
::
runtime_error
(
"Cannot convert to d spacing because tzero > time-of-flight and difa is
positive.
"
"Quadratic doesn't have a positive root"
);
}
else
if
(
difa
==
0.
)
{
throw
std
::
runtime_error
(
"Cannot convert to d spacing because tzero > time-of-flight"
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment