Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/HowieHz/hpyculator into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
HowieHz committed May 28, 2022
2 parents 7c8fd6e + 26c9232 commit 00a05f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Plugin/Prime_Palindromes_JIT_hz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,8 +864,7 @@ def scope_builder(num):
if int(str(ret) + str(ret)[-2::-1]) <= num:
return int(num / 10 ** ((num_len + 1) / 2 - 1))
return int(num / 10 ** ((num_len + 1) / 2 - 1) - 1)
else: # 偶数位
return int(9 * (1 - 10 ** (num_len / 2)) / -9) # 9*(10**0+10**1+10**2)
return int(9 * (1 - 10 ** (num_len / 2)) / -9) # 9*(10**0+10**1+10**2)


@numba.jit(nopython=True)
Expand Down
3 changes: 1 addition & 2 deletions src/Plugin/Prime_Palindromes_hz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,7 @@ def scope_builder(num):
if int(str(ret) + str(ret)[-2::-1]) <= num:
return int(num / 10 ** ((num_len + 1) / 2 - 1))
return int(num / 10 ** ((num_len + 1) / 2 - 1) - 1)
else: # 偶数位
return int(9 * (1 - 10 ** (num_len / 2)) / -9) # 9*(10**0+10**1+10**2)
return int(9 * (1 - 10 ** (num_len / 2)) / -9) # 9*(10**0+10**1+10**2)


def is_prime(num):
Expand Down

0 comments on commit 00a05f1

Please sign in to comment.