From 200f97094b4bcd8afb19e8df6da02215a5b4f53c Mon Sep 17 00:00:00 2001 From: WrathfulSpatula Date: Wed, 28 Aug 2024 17:04:44 -0400 Subject: [PATCH] Suggested by Elara, ChatGPT (given options: variance, deviance, abs. res.) --- src/qbdt/node_interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qbdt/node_interface.cpp b/src/qbdt/node_interface.cpp index dd8e760c4..5b6a594f9 100644 --- a/src/qbdt/node_interface.cpp +++ b/src/qbdt/node_interface.cpp @@ -110,8 +110,8 @@ bool QBdtNodeInterface::isEqualBranch(QBdtNodeInterfacePtr r, const bool& b) const real1 lWeight = ((real1)lLeaf.use_count()) * ((real1)lLeaf.use_count()); const real1 rWeight = ((real1)rLeaf.use_count()) * ((real1)rLeaf.use_count()); - const complex_x nScale = ((real1_x)(lWeight / (lWeight + rWeight))) * lLeaf->scale + - ((real1_x)(rWeight / (lWeight + rWeight))) * rLeaf->scale; + const complex_x nScale = ((real1_x)sqrt(lWeight / (lWeight + rWeight))) * lLeaf->scale + + ((real1_x)sqrt(rWeight / (lWeight + rWeight))) * rLeaf->scale; if (IS_NODE_0(nScale)) { lLeaf->SetZero();