diff --git a/rpn/math/rpnLexicographic.py b/rpn/math/rpnLexicographic.py index b7528c3..51db125 100644 --- a/rpn/math/rpnLexicographic.py +++ b/rpn/math/rpnLexicographic.py @@ -275,7 +275,7 @@ def combineDigits( n ): listResult = False for i in n: - if isinstance( i, ( list, RPNGenerator ) ) and result == 0: + if isinstance( i, ( list, types.GeneratorType, RPNGenerator ) ) and result == 0: listResult = True result = combineDigits( i ) elif listResult: diff --git a/rpn/math/rpnNumberTheory.py b/rpn/math/rpnNumberTheory.py index 0839d0e..38cc82d 100644 --- a/rpn/math/rpnNumberTheory.py +++ b/rpn/math/rpnNumberTheory.py @@ -2409,7 +2409,8 @@ def getNthZetaZeroOperator( n ): 48: 57885161, 49: 74207281, 50: 77232917, - 51: 82589933 + 51: 82589933, + 52: 136279841 } diff --git a/rpn/special/rpnList.py b/rpn/special/rpnList.py index 742805b..5fa8300 100644 --- a/rpn/special/rpnList.py +++ b/rpn/special/rpnList.py @@ -920,13 +920,16 @@ def reduceListOperator( n ): #****************************************************************************** def calculateGeometricMean( args ): - if isinstance( args[ 0 ], ( list, types.GeneratorType ) ): - return [ calculateGeometricMean( list( arg ) ) for arg in args ] + if not isinstance( args, types.GeneratorType ): + if isinstance( args[ 0 ], ( list, types.GeneratorType ) ): + return [ calculateGeometricMean( arg ) for arg in args ] result = mpmathify( 1 ) count = 0 for arg in args: + print( 'arg', arg, type( arg ) ) + result = fmul( result, arg ) count += 1