Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/crates/rusticol-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ loop-v2 = ["dep:ninjars", "symbolica-runtime"]
bincode.workspace = true
libloading = { version = "0.9", optional = true }
libc.workspace = true
ninjars = { git = "https://github.com/alphal00p/ninjars.git", rev = "de858c88e81058623d53a16fa4400b414f3aa260", optional = true }
ninjars = { git = "https://github.com/alphal00p/ninjars.git", rev = "a069504e3dc884d6e2682aadc75fb12a7f4e7c07", optional = true }
num-complex = { version = "0.4", optional = true }
rayon.workspace = true
serde.workspace = true
Expand Down
10 changes: 10 additions & 0 deletions rust/crates/rusticol-core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ pub enum RusticolErrorKind {
/// exact program and physical inputs in a wider scalar may recover it.
/// This category does not diagnose malformed caller-supplied values.
NonFiniteResult,
/// A valid numerical operation lost information at this working precision.
/// Reconstruct the original inputs in a wider scalar before retrying; the
/// bit count describes the attempt, not a component's tracked precision.
InsufficientPrecision {
bits: u32,
},
Selector,
ModelParameter,
UnsupportedPrecision,
Expand Down Expand Up @@ -77,6 +83,10 @@ impl RusticolError {
Self::with_kind(RusticolErrorKind::NonFiniteResult, message)
}

pub fn insufficient_precision(bits: u32, message: impl Into<String>) -> Self {
Self::with_kind(RusticolErrorKind::InsufficientPrecision { bits }, message)
}

pub fn selector(message: impl Into<String>) -> Self {
Self::with_kind(RusticolErrorKind::Selector, message)
}
Expand Down
22 changes: 11 additions & 11 deletions rust/loop-reduction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ license = "0BSD"
publish = false

[dependencies]
feynkit-amplitude = { git = "https://github.com/alphal00p/gammaloop.git", rev = "4b8569c03f7498b13482bc954953e66f6de5ffc1", default-features = false, features = ["native"] }
feynkit-generator = { git = "https://github.com/alphal00p/gammaloop.git", rev = "4b8569c03f7498b13482bc954953e66f6de5ffc1", default-features = false, features = ["native"] }
feynkit-graph = { git = "https://github.com/alphal00p/gammaloop.git", rev = "4b8569c03f7498b13482bc954953e66f6de5ffc1", default-features = false, features = ["native"] }
idenso = { git = "https://github.com/alphal00p/gammaloop.git", rev = "4b8569c03f7498b13482bc954953e66f6de5ffc1", default-features = false, features = ["native"] }
spenso = { git = "https://github.com/alphal00p/gammaloop.git", rev = "4b8569c03f7498b13482bc954953e66f6de5ffc1", default-features = false, features = ["native", "shadowing"] }
spenso-hep-lib = { git = "https://github.com/alphal00p/gammaloop.git", rev = "4b8569c03f7498b13482bc954953e66f6de5ffc1", default-features = false, features = ["native"] }
feynkit-model = { git = "https://github.com/alphal00p/gammaloop.git", rev = "4b8569c03f7498b13482bc954953e66f6de5ffc1", default-features = false, features = ["native"] }
feynkit-kinematics = { git = "https://github.com/alphal00p/gammaloop.git", rev = "4b8569c03f7498b13482bc954953e66f6de5ffc1", default-features = false, features = ["native"] }
feynkit-amplitude = { git = "https://github.com/alphal00p/gammaloop.git", rev = "ee18b8e6386cb36ca88b1917e00ab2ebae93e68e", default-features = false, features = ["native"] }
feynkit-generator = { git = "https://github.com/alphal00p/gammaloop.git", rev = "ee18b8e6386cb36ca88b1917e00ab2ebae93e68e", default-features = false, features = ["native"] }
feynkit-graph = { git = "https://github.com/alphal00p/gammaloop.git", rev = "ee18b8e6386cb36ca88b1917e00ab2ebae93e68e", default-features = false, features = ["native"] }
idenso = { git = "https://github.com/alphal00p/gammaloop.git", rev = "ee18b8e6386cb36ca88b1917e00ab2ebae93e68e", default-features = false, features = ["native"] }
spenso = { git = "https://github.com/alphal00p/gammaloop.git", rev = "ee18b8e6386cb36ca88b1917e00ab2ebae93e68e", default-features = false, features = ["native", "shadowing"] }
spenso-hep-lib = { git = "https://github.com/alphal00p/gammaloop.git", rev = "ee18b8e6386cb36ca88b1917e00ab2ebae93e68e", default-features = false, features = ["native"] }
feynkit-model = { git = "https://github.com/alphal00p/gammaloop.git", rev = "ee18b8e6386cb36ca88b1917e00ab2ebae93e68e", default-features = false, features = ["native"] }
feynkit-kinematics = { git = "https://github.com/alphal00p/gammaloop.git", rev = "ee18b8e6386cb36ca88b1917e00ab2ebae93e68e", default-features = false, features = ["native"] }
rusticol-core = { path = "../crates/rusticol-core", features = ["symbolica-runtime", "python-generation-bridge", "loop-v2"] }
ninjars = { git = "https://github.com/alphal00p/ninjars.git", rev = "de858c88e81058623d53a16fa4400b414f3aa260" }
ninjars-graph = { git = "https://github.com/alphal00p/ninjars.git", rev = "de858c88e81058623d53a16fa4400b414f3aa260" }
ninjars-symbolica = { git = "https://github.com/alphal00p/ninjars.git", rev = "de858c88e81058623d53a16fa4400b414f3aa260", features = ["native-masters"] }
ninjars = { git = "https://github.com/alphal00p/ninjars.git", rev = "a069504e3dc884d6e2682aadc75fb12a7f4e7c07" }
ninjars-graph = { git = "https://github.com/alphal00p/ninjars.git", rev = "a069504e3dc884d6e2682aadc75fb12a7f4e7c07" }
ninjars-symbolica = { git = "https://github.com/alphal00p/ninjars.git", rev = "a069504e3dc884d6e2682aadc75fb12a7f4e7c07", features = ["native-masters"] }
oneloop = { git = "https://github.com/alphal00p/oneloopmaster.git", rev = "8ec256fc26cb361b20e10f59c19beb35717ef32c", default-features = false }
symbolica = { version = "3.0.1", default-features = false, features = ["integer-gmp", "float-mpfr"] }
serde = { version = "1", features = ["derive"] }
Expand Down
15 changes: 13 additions & 2 deletions rust/loop-reduction/src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,21 @@ impl ExecutionError {
self.0.kind()
}
fn nonfinite_result(value: impl Display) -> Self {
Self(rusticol_core::RusticolError::nonfinite_result(value.to_string()))
Self(rusticol_core::RusticolError::nonfinite_result(
value.to_string(),
))
}
fn insufficient_precision(bits: u32, value: impl Display) -> Self {
Self(rusticol_core::RusticolError::insufficient_precision(
bits,
value.to_string(),
))
}
fn context(self, value: impl Display) -> Self {
Self(rusticol_core::RusticolError::with_kind(self.kind(), value.to_string()))
Self(rusticol_core::RusticolError::with_kind(
self.kind(),
value.to_string(),
))
}
}
impl From<ExecutionError> for rusticol_core::RusticolError {
Expand Down
Loading
Loading