// Copyright Supranational LLC // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 #if defined(__GNUC__) || defined(__clang__) # define FR_T(vec_t, ...) fr_t{(vec_t){__VA_ARGS__}} #else # define FR_T(vec_t, ...) fr_t{vec_t{__VA_ARGS__}} #endif const fr_t group_gen = FR_T(vec256, 0x296c7ffffffffed3u, 0x929216656ffffec7u, 0x4c01534d92860e69u, 0x0c79cfc4b9819970u ); const fr_t group_gen_inverse = FR_T(vec256, 0xb76f9745d1745d17u, 0xfed18274afffffffu, 0xfce619835b36a173u, 0x068b6ffd78dc8d16u ); const int S = 47; const fr_t forward_roots_of_unity[S + 1] = { FR_T(vec256, 0x7d1c7ffffffffff3u, 0x7257f50f6ffffff2u, 0x16d81575512c0feeu, 0x0d4bda322bbb9a9du ), FR_T(vec256, 0x8cf500000000000eu, 0xe75281ef6000000eu, 0x49dc37a90b0ba012u, 0x055f8b2c6e710ab9u ), FR_T(vec256, 0x4bcacfd5d2103b0eu, 0x4597a1b1b0ddeb5cu, 0x713273b2dd764c92u, 0x1208f485585ae1eau ), FR_T(vec256, 0x43c377a2d0b10cfbu, 0x6fdcdd33e1ab2ffeu, 0x41a160295c736721u, 0x0fed8f09fbb492e4u ), FR_T(vec256, 0x172fa063ffae379au, 0x6d2c389cd26cc040u, 0x8b26d6078c01617eu, 0x0ad7a02c1199ccbfu ), FR_T(vec256, 0xff7759ccfefe873du, 0xc9e469cc2e15a1d7u, 0x53eb598bcd5ccaddu, 0x0a119f08b45ed5aau ), FR_T(vec256, 0x7fcc4602d6873602u, 0x9b015cba0d84664cu, 0x736cd5304e2e0179u, 0x0f21c7bdeed774bfu ), FR_T(vec256, 0x1dc55c8a8bf61422u, 0x8dfaaca46ec7175au, 0x640623d46a8ba80fu, 0x02e960ed5e6447d2u ), FR_T(vec256, 0xe2c1d978aec0317bu, 0x433f4156355a9b4eu, 0x5ff43674ebb7842bu, 0x0714a7883c6b13afu ), FR_T(vec256, 0xb89ab895675f3dbau, 0x32200ccb96ac3995u, 0x3029e5dc63b9ba0fu, 0x0d2fb38c17b5de92u ), FR_T(vec256, 0x512dd09e5dca3d19u, 0x5c4913b21dc70202u, 0xdf2a5b8150c5548au, 0x0c9079137b1b24b6u ), FR_T(vec256, 0xcdf2ec3a5ae23c46u, 0x6a3067507ae7991bu, 0x9eca9511c4d698aau, 0x05adb6ca20eeeb4cu ), FR_T(vec256, 0xbdbbe39e63c9ff05u, 0xbc0d9400155388cfu, 0xcf9daa6d01214e28u, 0x02bcbc362ad494c3u ), FR_T(vec256, 0xf39b3ddec812dec9u, 0xac4acef2a9e798f6u, 0xb156be66ef6fbfd6u, 0x044d02c2d8f648feu ), FR_T(vec256, 0xcb4b02e89ad1d94au, 0x09286f228aa9f768u, 0xbe4b4d11e43d7830u, 0x098e8002e6b7e267u ), FR_T(vec256, 0xd68025fb06508dfbu, 0x590c1be9db0b556fu, 0x3d313c6d67a5f2f6u, 0x0bdea4d8c18105b2u ), FR_T(vec256, 0xeefb02d3872ad28bu, 0x6aec95274e058bc1u, 0xcc0b97a6435ad922u, 0x0194c4d9b06162c4u ), FR_T(vec256, 0xbabf311d2a4e6774u, 0x7d76e06a4df5f875u, 0x3cb67900f44a84a0u, 0x05de3c1fa1a2eb41u ), FR_T(vec256, 0x30f67ce7e7d7cbacu, 0x9a57d99687c53f40u, 0x9e47662488d63896u, 0x094d7b965cf5d2e6u ), FR_T(vec256, 0x363a8c55a97bcae9u, 0x994a338b541d6703u, 0x0142b614d82123ebu, 0x0c16027c73265ce5u ), FR_T(vec256, 0xfd92ff20bb375929u, 0x9a19190be3b9fea2u, 0xe5cc2e60c8a4cadeu, 0x0cd7703c762eef58u ), FR_T(vec256, 0xd98f135463d4e247u, 0xaa2bebd26ae5ab2au, 0x687b3c9d51e7fca9u, 0x0904f8eae20035ffu ), FR_T(vec256, 0x705ff163618ada97u, 0x92e8577fc756b3fdu, 0x518f5a48eabda19bu, 0x069ff405aaf3e6f5u ), FR_T(vec256, 0x95159cf85a70a78eu, 0x61ed434408bea666u, 0xaf13234ccb93c8e5u, 0x079ca85ab5f61a08u ), FR_T(vec256, 0xdf95a592762b62a6u, 0x4b33079206cd7776u, 0x9cdeeba3892b3401u, 0x0406b7da1bb7b875u ), FR_T(vec256, 0x72306a59bb5d59f0u, 0x2d113f940470200bu, 0x651a62d4a7038bb9u, 0x024c8b173544a763u ), FR_T(vec256, 0x5280a8809d734f5bu, 0x0521871ce21ea4d6u, 0x0051682243728a35u, 0x0f968a5c29db897cu ), FR_T(vec256, 0x7ace170448bd341fu, 0x99cbcaffce59c019u, 0x50740d592e332bf8u, 0x065b7a947b4d6259u ), FR_T(vec256, 0x18edfc4b06a79893u, 0xffe5168fd9942118u, 0x76b85d81b4ab2c5cu, 0x0a43904047c2ecc0u ), FR_T(vec256, 0xc15ce3367897160bu, 0x60ccb65ea5553888u, 0x03f8025a28ca87c3u, 0x0ca0ef4ae6c09c6cu ), FR_T(vec256, 0xd737d2e52d132c04u, 0x7bbc8b757b01556cu, 0x43a015853524a269u, 0x070a19c53db20e87u ), FR_T(vec256, 0xec40797c6027c013u, 0xf0771a3e8998af87u, 0xd35354464ddb40f0u, 0x0746e328a8c24178u ), FR_T(vec256, 0xdac72d53a7d6e38du, 0xebf0c43a8b12743du, 0x9c1d0a5e0fdc055fu, 0x12199274d0de1e1du ), FR_T(vec256, 0x32943098d36de428u, 0xf3597b4847aba111u, 0x206340abad0d776eu, 0x10cfdd357a8fbb83u ), FR_T(vec256, 0xb6f93b88916a2f3du, 0x45e2313d42427291u, 0x968ece12da27d3d5u, 0x0f2c27f1af060240u ), FR_T(vec256, 0xf32eef07bf615993u, 0x71f0bc0575600c8bu, 0xa7f5e0fa576e29aeu, 0x00f64695d6b9ceecu ), FR_T(vec256, 0xabd1ea6e59cd8662u, 0xcf14da155f588557u, 0x6e5f908066ebbac1u, 0x0a4705816176056eu ), FR_T(vec256, 0x39890dfe7137cc6bu, 0x06a976c31642dbf1u, 0xd2be68273bb1ea2cu, 0x0dd79056a1964ec8u ), FR_T(vec256, 0xfc6c79e8d02a7b32u, 0x8ba9f919180b0110u, 0xfb8c7378fbeca933u, 0x0183cbb147cba996u ), FR_T(vec256, 0x1b81a6d7dd77a5a8u, 0xa8bb487c3e6bc378u, 0xbde95c77155369a9u, 0x0bab1284d398faabu ), FR_T(vec256, 0xf77e90efa5bdde95u, 0x54870dbf87faf539u, 0xaddc8af0f33dc989u, 0x0be74b87f6dd376au ), FR_T(vec256, 0x58d7895260e38028u, 0x10014dfaf04dd21bu, 0xcdb8265f34d4e72fu, 0x06edad9aedc8a15bu ), FR_T(vec256, 0x77773544a1eb2706u, 0x570824476ff28770u, 0x0eda9ad4fd33602du, 0x077ab5c762faa37au ), FR_T(vec256, 0xd7262345756b148fu, 0x2009de2d296bffd7u, 0xe20029ffab567e28u, 0x0170a9c5d279aeedu ), FR_T(vec256, 0x68bc6cac04fc7429u, 0xa2d76e481d4ac39fu, 0x73c90fa2b2e506ebu, 0x0801e08d721b25b7u ), FR_T(vec256, 0x3f6f3ff17326cc26u, 0xc6d71ac6eb5da228u, 0x717d2664f89ba32cu, 0x0a29fd79b39afdceu ), FR_T(vec256, 0x89832c301f7d7347u, 0x0dbd1eaadd07018bu, 0xb76f3b3206370de0u, 0x0458c8bce631e66bu ), FR_T(vec256, 0xaf80da4dda3ad648u, 0x5e223adbfc381dacu, 0x03ba0666b2f92525u, 0x0f906c5b3befb0ceu ), }; const fr_t inverse_roots_of_unity[S + 1] = { FR_T(vec256, 0x7d1c7ffffffffff3u, 0x7257f50f6ffffff2u, 0x16d81575512c0feeu, 0x0d4bda322bbb9a9du ), FR_T(vec256, 0x8cf500000000000eu, 0xe75281ef6000000eu, 0x49dc37a90b0ba012u, 0x055f8b2c6e710ab9u ), FR_T(vec256, 0xbe46b02a2defc4f3u, 0x1412d54d1f2214a4u, 0xef81d96b7ec1636fu, 0x00a270d941d1c36bu ), FR_T(vec256, 0xf64cdca2e53d52c6u, 0x93e63e83120ff18fu, 0x5fe53168e7c53cc6u, 0x09234d5c0287d532u ), FR_T(vec256, 0x0ee27570e8a8784bu, 0xda62faba8682d7adu, 0x87b49b4000eeefbcu, 0x128b552de44daaf4u ), FR_T(vec256, 0x407c45fd3bc9136au, 0x02c846fc1ba1094bu, 0x8bc65351f3620fb1u, 0x09aecbe2caca2ccdu ), FR_T(vec256, 0xfd52be9ff148cf5bu, 0x6b5c1892af510870u, 0x58c3fc00cb36fac9u, 0x09ea0e3d8d8799f2u ), FR_T(vec256, 0x3e10896e2a77cf6au, 0x5172cd0d713e523du, 0x69196e5ea0bbbbb1u, 0x082774e3454dd831u ), FR_T(vec256, 0x4783109af0c730a2u, 0xdc09f16176c30281u, 0x8b7ce0ba73c11417u, 0x0b243b3f5d56e620u ), FR_T(vec256, 0xf1bb77ea112b3f9fu, 0x1d4447d0c9e8fc24u, 0x3d8d28ab68fdf445u, 0x0a9bafe53767a775u ), FR_T(vec256, 0x4d11c481b9db9bf3u, 0xaebaa0140fd281dcu, 0xec5bee042f3a2f6au, 0x0d61799fd9312b14u ), FR_T(vec256, 0x2ccbc0f388a6a15fu, 0x56b825c4ed1d4632u, 0x41bf5f914298acd3u, 0x12aa0619035fc8c5u ), FR_T(vec256, 0x1e2e7cfb1a1f9b43u, 0x263c888b6be50beeu, 0x99475a2f84ebbfa6u, 0x0bdcbe0b02a86bceu ), FR_T(vec256, 0x82d0fed0a98b353au, 0xe2f86799c470aa7eu, 0x2b390d06d6dd8326u, 0x0bcc4abe016bd50du ), FR_T(vec256, 0x2c7ca60b25738776u, 0x8313a374ac87dc79u, 0x435dc9a1072c5c39u, 0x1295c2ba1ff7effbu ), FR_T(vec256, 0x79ded283bbcea182u, 0x93bfd7a153654d8eu, 0xb46cca149b42a0c9u, 0x0a7b4d293432f219u ), FR_T(vec256, 0xb89fd30078d696f6u, 0x30a0bb5d1bf4d038u, 0x41ab9198e3a07effu, 0x0a4aee0e31d60cdeu ), FR_T(vec256, 0x51aec100c1cda761u, 0x3ad7cf83dcae69e9u, 0x92cb95dad5344407u, 0x020dddfe15eb17d2u ), FR_T(vec256, 0x211b59aa2a1551dfu, 0x96fae0a28816042du, 0x2258ceea6b8785e7u, 0x0ff9de8433e8481du ), FR_T(vec256, 0x672e5a03e7b52ae4u, 0xd163678b74377a4fu, 0x30fc736057583c53u, 0x036019d5c9ec71e0u ), FR_T(vec256, 0x708dbcecbed20f9au, 0x1e937fbbdbe6c7f4u, 0xc4a62bc6d7af09ceu, 0x037e62b26cf2be16u ), FR_T(vec256, 0xb06ba5f60c97cdfdu, 0x47f6a95329cf0be6u, 0x7485843f29fc4fb8u, 0x05145b97ef0a9221u ), FR_T(vec256, 0xa8cddb14e3825884u, 0x9310fb3158828fe5u, 0x2f03e61986af70f6u, 0x09bacc7ed15fc81bu ), FR_T(vec256, 0x1434222d73cc6379u, 0x48c8afe73a5e1019u, 0x936e25ef87182cc4u, 0x04110dca71d7377eu ), FR_T(vec256, 0xd3e14c7f04a581a6u, 0xef3fca926532d258u, 0xdf5da385924beca2u, 0x0eb2be53e69c145au ), FR_T(vec256, 0x0155ff768906f8b7u, 0x0d801e6f740c7d5au, 0x7574e8a9f2e90247u, 0x0cb68ac8e240311au ), FR_T(vec256, 0x530271029bf1c91cu, 0xc3e2dadce0828e4au, 0x21830c17c9d6de73u, 0x0689a21995f783d8u ), FR_T(vec256, 0x1535e76672808cbeu, 0x28c9c0a2bba1b3b0u, 0xd4fbc4047df68ddbu, 0x03b601cc98be9bdbu ), FR_T(vec256, 0x05619548e00b3a4eu, 0xe0169b111bff8695u, 0xb9cfb28f375fcb29u, 0x07ff417af3098b00u ), FR_T(vec256, 0xb6452d76d49fea6du, 0x49803711f27f7e73u, 0xa71291049c2da0f9u, 0x0abd0a966f8fbcd5u ), FR_T(vec256, 0xd98843bafff86801u, 0x17b37a06d392fc8eu, 0x68e324b86fe248a3u, 0x125a00a04675d1dfu ), FR_T(vec256, 0xe7f74c076c070e31u, 0xe2e4b45ba09270d9u, 0x1ee211086e70a842u, 0x11c3d0d92c76e4b8u ), FR_T(vec256, 0xf38a1c2809866015u, 0xd31f19003a741c5bu, 0x80ceaf9750ba7f32u, 0x039a6a0018f79e1bu ), FR_T(vec256, 0x3ab97f117e48ad07u, 0x3443a82c41e2d9b1u, 0xb6b899712dfa4c8eu, 0x06c8b11d4228411au ), FR_T(vec256, 0x1c5549b5096b2b63u, 0x0753910b4adae626u, 0x177ca49c2682cf5au, 0x0b81de1e64b39f0au ), FR_T(vec256, 0x677e5f1114bb84c0u, 0x6faac2de820f34ebu, 0x71282b6b8cc5898cu, 0x05a37beca2b70e95u ), FR_T(vec256, 0xd6e2b40b48001a9eu, 0x1b37e22e260fd00bu, 0x9e56868f1c29518cu, 0x1016c201ee677406u ), FR_T(vec256, 0x5602da29d96a543bu, 0x9bf5b22eff81e9d1u, 0x788060e91fcc9034u, 0x0124543082e085b2u ), FR_T(vec256, 0xf4b2260211e46e13u, 0x330cabfba5705f5du, 0x6261a38de95c7501u, 0x0b866b7a439e480fu ), FR_T(vec256, 0xd9636c94f3c6dad7u, 0xa005fc6e5d58381fu, 0x4a28db0e1a8e9335u, 0x0e889eb90c1f9844u ), FR_T(vec256, 0x9c69f5693718477bu, 0x5b7f1542342f03e8u, 0x451ef0bd7c16e7acu, 0x07fcf38fe84d79c8u ), FR_T(vec256, 0x065e6c5748168d6du, 0x54d5a6ea0fc4ae3fu, 0xe5815f829f55ed7eu, 0x081396ccafd69e19u ), FR_T(vec256, 0x5b6986a3af26ed0bu, 0x0e9dd43f0954b60au, 0x4d8c438b3235a80au, 0x0c61d6226af22c03u ), FR_T(vec256, 0xe1a953a62d71f2a0u, 0xce378b1faf0426efu, 0x8e1a460ef9857747u, 0x0c296ae31826fcd7u ), FR_T(vec256, 0xb311ae553c377785u, 0xc2dd1d5de7224c4eu, 0x8ebc4d0e71750d8eu, 0x0774860da9e01de1u ), FR_T(vec256, 0x605d45c00d363679u, 0xf6c4cc58909c1fe5u, 0x0bfb8decf0f63f2fu, 0x0b920a01a00f620du ), FR_T(vec256, 0x51407fd0edce32ddu, 0xd56d5ff972314643u, 0x8ca8ec9770d5ab31u, 0x01a4b2d1319ca504u ), FR_T(vec256, 0x0d248e974767f5bdu, 0xfa72032b32f67f4cu, 0x7ec7e591ee4ee58fu, 0x1227d66f8e126f27u ), }; const fr_t domain_size_inverse[S + 1] = { FR_T(vec256, 0x7d1c7ffffffffff3u, 0x7257f50f6ffffff2u, 0x16d81575512c0feeu, 0x0d4bda322bbb9a9du ), FR_T(vec256, 0xc396fffffffffffau, 0xe60136071ffffff9u, 0xbbc63149d6b1dff7u, 0x0ffb9fc862f41ff9u ), FR_T(vec256, 0xe1cb7ffffffffffdu, 0xf3009b038ffffffcu, 0xdde318a4eb58effbu, 0x07fdcfe4317a0ffcu ), FR_T(vec256, 0xf5ee7fffffffffffu, 0xa65589012ffffffeu, 0x9f4bb2e1a3c84ffeu, 0x0d549aa165d35aa9u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x1000000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0800000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0400000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0200000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0100000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0080000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0040000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0020000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0010000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0008000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0004000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0002000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0001000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000800000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000400000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000200000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000100000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000080000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000040000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000020000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000010000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000008000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000004000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000002000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000001000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000800000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000400000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000200000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000100000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000080000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000040000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000020000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000010000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000008000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000004000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000002000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000001000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000800000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000400000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000200000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000100000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000080000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000040000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000020000u ), }; #undef FR_T