View Issue Details

IDProjectCategoryView StatusLast Update
0002814OpenFOAMBugpublic2018-01-22 22:32
Reportersamir1291Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0002814: Logical error in checking range of factorial argument range in Label.H
DescriptionIn the file Label.H, the factorial function tries to check the range of n.
     #ifdef FULLDEBUG
   72 if (n > 12 && n < 0) // <<<<<<<<<<<<<<<<
   73 {
   74 FatalErrorInFunction
   75 << "n value out of range"
   76 << abort(FatalError);
   77 }
   78 #endif

I think this is a logical error, because the condition (n > 12 && n < 0) is always false. Instead it must be: (n > 12 || n < 0)
Steps To ReproduceSee the source code (Label.H)
Tagscritical condition

Activities

samir1291

2018-01-22 21:05

reporter  

Factorial_function.PNG (9,280 bytes)   
Factorial_function.PNG (9,280 bytes)   

henry

2018-01-22 22:31

manager   ~0009212

File Label.H does not exist, do you mean label.C?

henry

2018-01-22 22:32

manager   ~0009213

Resolved in OpenFOAM-5.x by commit c5d0a45c12f48bfcfad2f0ba6be38fa161c775d7

Resolved in OpenFOAM-dev by commit 16d9dd618380c268ebca9c00443d157dd160e56e

Issue History

Date Modified Username Field Change
2018-01-22 21:05 samir1291 New Issue
2018-01-22 21:05 samir1291 File Added: Factorial_function.PNG
2018-01-22 21:05 samir1291 Tag Attached: critical condition
2018-01-22 22:31 henry Note Added: 0009212
2018-01-22 22:32 henry Assigned To => henry
2018-01-22 22:32 henry Status new => closed
2018-01-22 22:32 henry Resolution open => fixed
2018-01-22 22:32 henry Note Added: 0009213