Bigint in jq (It is possible to use this)

What happens

I am currently trying to develop an exercise in jq in which I need to handle very large numbers, the problem is that the number is represented in scientific notation and this generates two problems for me:

  1. I need to get modulo and this operation is performed on integers.
  2. The number loses precision, since it only supports 16 decimal numbers.

Example :

python :


jq :


What do you understand or find about that problem

I understand that jq is implemented with js, therefore it is not a typed “language”, in addition to this it cannot support bigints and at the same time it cannot store decimals more than 16 decimals, losing precision when calculating very large numbers.

You make any workaround? What did you do?

Looking to find that the development team of jq implemented a function in a gitlab repository, to operate bigints.

I need help with

I need to know if using these functions would be legal.
Because I am afraid of using them and that it is considered plagiarism since it would only be a tool provided by the jq development team to operate bigints but not an answer to the exercise I am doing. It would be to use an external library.


The rules are clear, if you can’t solve the challenge with the established criteria you should try another language or try to solve another challenge instead.