17#ifndef INCLUDE_S3ACTION_HPP_
18#define INCLUDE_S3ACTION_HPP_
24#pragma GCC diagnostic push
25#pragma GCC diagnostic ignored "-Wcomment"
50 long double const Lambda)
noexcept -> Gmpzf
79 mpfr_inits2(
PRECISION, pi, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12,
83 mpfr_init_set_si(n1_tl, N1_TL, MPFR_RNDD);
84 mpfr_init_set_si(n3_31, N3_31_13, MPFR_RNDD);
85 mpfr_init_set_si(n3_22, N3_22, MPFR_RNDD);
86 mpfr_init_set_ld(k, K, MPFR_RNDD);
87 mpfr_init_set_ld(lambda, Lambda, MPFR_RNDD);
88 mpfr_init_set_str(two,
"2.0", 10, MPFR_RNDD);
89 mpfr_const_pi(pi, MPFR_RNDD);
90 mpfr_init_set_str(const2673,
"2.673", 10, MPFR_RNDD);
91 mpfr_init_set_str(const118,
"0.118", 10, MPFR_RNDD);
92 mpfr_init_set_str(const7386,
"7.386", 10, MPFR_RNDD);
95 mpfr_mul(r1, two, pi, MPFR_RNDD);
96 mpfr_mul(r2, r1, k, MPFR_RNDD);
97 mpfr_mul(r3, r2, n1_tl, MPFR_RNDD);
100 mpfr_mul(r4, const2673, k, MPFR_RNDD);
101 mpfr_mul(r5, const118, lambda, MPFR_RNDD);
102 mpfr_add(r6, r4, r5, MPFR_RNDD);
103 mpfr_mul(r7, n3_31, r6, MPFR_RNDD);
106 mpfr_mul(r8, const7386, k, MPFR_RNDD);
107 mpfr_mul(r9, const118, lambda, MPFR_RNDD);
108 mpfr_add(r10, r8, r9, MPFR_RNDD);
109 mpfr_mul(r11, n3_22, r10, MPFR_RNDD);
112 mpfr_sub(r12, r7, r3, MPFR_RNDD);
113 mpfr_add(total, r11, r12, MPFR_RNDD);
117 auto const result = mpfr_get_d(total, MPFR_RNDD);
120 mpfr_clears(n1_tl, n3_31, n3_22, k, lambda, two, pi, r1, r2, r3, const2673,
121 const118, r4, r5, r6, r7, const7386, r8, r9, r10, r11, r12, total,
147 long double const Lambda)
noexcept -> Gmpzf
177 mpfr_inits2(
PRECISION, pi, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12,
181 mpfr_init_set_si(n1_tl, N1_TL, MPFR_RNDD);
182 mpfr_init_set_si(n3_31, N3_31_13, MPFR_RNDD);
183 mpfr_init_set_si(n3_22, N3_22, MPFR_RNDD);
184 mpfr_init_set_ld(k, K, MPFR_RNDD);
185 mpfr_init_set_ld(lambda, Lambda, MPFR_RNDD);
186 mpfr_init_set_str(two,
"2.0", 10, MPFR_RNDD);
187 mpfr_const_pi(pi, MPFR_RNDD);
188 mpfr_init_set_str(const3548,
"-3.548", 10, MPFR_RNDD);
189 mpfr_init_set_str(const167,
"-0.167", 10, MPFR_RNDD);
190 mpfr_init_set_str(const5355,
"-5.355", 10, MPFR_RNDD);
191 mpfr_init_set_str(const204,
"-0.204", 10, MPFR_RNDD);
194 mpfr_mul(r1, two, pi, MPFR_RNDD);
195 mpfr_mul(r2, r1, k, MPFR_RNDD);
196 mpfr_mul(r3, r2, n1_tl, MPFR_RNDD);
199 mpfr_mul(r4, const3548, k, MPFR_RNDD);
200 mpfr_mul(r5, const167, lambda, MPFR_RNDD);
201 mpfr_add(r6, r4, r5, MPFR_RNDD);
202 mpfr_mul(r7, n3_31, r6, MPFR_RNDD);
205 mpfr_mul(r8, const5355, k, MPFR_RNDD);
206 mpfr_mul(r9, const204, lambda, MPFR_RNDD);
207 mpfr_add(r10, r8, r9, MPFR_RNDD);
208 mpfr_mul(r11, n3_22, r10, MPFR_RNDD);
211 mpfr_add(r12, r3, r7, MPFR_RNDD);
212 mpfr_add(total, r11, r12, MPFR_RNDD);
216 auto const result = mpfr_get_d(total, MPFR_RNDD);
219 mpfr_clears(n1_tl, n3_31, n3_22, k, lambda, two, pi, r1, r2, r3, const3548,
220 const167, r4, r5, r6, r7, const5355, const204, r8, r9, r10, r11,
221 r12, total,
nullptr);
254 Int_precision const N3_22,
long double const Alpha,
long double const K,
255 long double const Lambda)
noexcept -> Gmpzf
326 mpfr_inits2(
PRECISION, pi, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12,
327 r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23, r24, r25,
328 r26, r27, r28, r29, r30, r31, r32, r33, r34, r35, r36, r37, r38,
329 r39, r40, r41, r42, r43, r44, r45, r46, r47, r48, r49, r50, r51,
330 r52, total,
nullptr);
333 mpfr_init_set_si(n1_tl, N1_TL, MPFR_RNDD);
334 mpfr_init_set_si(n3_31, N3_31_13, MPFR_RNDD);
335 mpfr_init_set_si(n3_22, N3_22, MPFR_RNDD);
336 mpfr_init_set_ld(alpha, Alpha, MPFR_RNDD);
337 mpfr_init_set_ld(k, K, MPFR_RNDD);
338 mpfr_init_set_ld(lambda, Lambda, MPFR_RNDD);
339 mpfr_init_set_str(two,
"2.0", 10, MPFR_RNDD);
340 mpfr_const_pi(pi, MPFR_RNDD);
341 mpfr_init_set_str(three,
"3.0", 10, MPFR_RNDD);
342 mpfr_init_set_str(four,
"4.0", 10, MPFR_RNDD);
343 mpfr_init_set_str(one,
"1.0", 10, MPFR_RNDD);
344 mpfr_init_set_str(twelve,
"12.0", 10, MPFR_RNDD);
347 mpfr_mul(r1, two, pi, MPFR_RNDD);
348 mpfr_mul(r2, r1, k, MPFR_RNDD);
349 mpfr_sqrt(r3, alpha, MPFR_RNDD);
350 mpfr_mul(r4, r3, r2, MPFR_RNDD);
351 mpfr_mul(r5, r4, n1_tl, MPFR_RNDD);
354 mpfr_sqrt(r6, three, MPFR_RNDD);
355 mpfr_mul(r7, four, alpha, MPFR_RNDD);
356 mpfr_add(r8, one, r7, MPFR_RNDD);
357 mpfr_sqrt(r9, r8, MPFR_RNDD);
358 mpfr_mul(r10, r6, r9, MPFR_RNDD);
359 mpfr_div(r11, one, r10, MPFR_RNDD);
360 mpfr_asinh(r12, r11, MPFR_RNDD);
361 mpfr_neg(r13, three, MPFR_RNDD);
362 mpfr_mul(r14, r13, k, MPFR_RNDD);
363 mpfr_mul(r15, r14, r12, MPFR_RNDD);
365 mpfr_mul(r16, two, alpha, MPFR_RNDD);
366 mpfr_add(r17, r16, one, MPFR_RNDD);
367 mpfr_div(r18, r17, r8, MPFR_RNDD);
368 mpfr_acos(r19, r18, MPFR_RNDD);
369 mpfr_mul(r20, r14, r3, MPFR_RNDD);
370 mpfr_mul(r21, r20, r19, MPFR_RNDD);
372 mpfr_mul(r22, three, alpha, MPFR_RNDD);
373 mpfr_add(r23, r22, one, MPFR_RNDD);
374 mpfr_sqrt(r24, r23, MPFR_RNDD);
375 mpfr_neg(r25, lambda, MPFR_RNDD);
376 mpfr_div(r26, r25, twelve, MPFR_RNDD);
377 mpfr_mul(r27, r26, r24, MPFR_RNDD);
380 mpfr_add(r28, r15, r21, MPFR_RNDD);
381 mpfr_add(r29, r28, r27, MPFR_RNDD);
384 mpfr_mul(r30, n3_31, r29, MPFR_RNDD);
387 mpfr_mul(r31, two, k, MPFR_RNDD);
388 mpfr_sqrt(r32, two, MPFR_RNDD);
389 mpfr_mul(r33, two, r32, MPFR_RNDD);
390 mpfr_sqrt(r34, r17, MPFR_RNDD);
391 mpfr_mul(r35, r33, r34, MPFR_RNDD);
392 mpfr_div(r36, r35, r8, MPFR_RNDD);
394 mpfr_asinh(r37, r36, MPFR_RNDD);
395 mpfr_mul(r38, r31, r37, MPFR_RNDD);
397 mpfr_neg(r39, one, MPFR_RNDD);
398 mpfr_div(r40, r39, r8, MPFR_RNDD);
399 mpfr_acos(r41, r40, MPFR_RNDD);
400 mpfr_neg(r42, four, MPFR_RNDD);
401 mpfr_mul(r43, r42, k, MPFR_RNDD);
402 mpfr_mul(r44, r43, r3, MPFR_RNDD);
403 mpfr_mul(r45, r44, r41, MPFR_RNDD);
405 mpfr_add(r46, r7, two, MPFR_RNDD);
406 mpfr_sqrt(r47, r46, MPFR_RNDD);
407 mpfr_mul(r48, r26, r47, MPFR_RNDD);
410 mpfr_add(r49, r38, r45, MPFR_RNDD);
411 mpfr_add(r50, r49, r48, MPFR_RNDD);
414 mpfr_mul(r51, n3_22, r50, MPFR_RNDD);
416 mpfr_add(r52, r5, r30, MPFR_RNDD);
417 mpfr_add(total, r51, r52, MPFR_RNDD);
421 auto const result = mpfr_get_d(total, MPFR_RNDD);
424 mpfr_clears(n1_tl, n3_31, n3_22, alpha, k, lambda, two, pi, r1, r2, r3, r4,
425 r5, r6, three, r7, four, r8, one, r9, r10, r11, r12, r13, r14,
426 r15, r16, r17, r18, r19, r20, r21, twelve, r22, r23, r24, r25,
427 r26, r27, r28, r29, r30, r31, r32, r33, r34, r35, r36, r37, r38,
428 r39, r40, r41, r42, r43, r44, r45, r46, r47, r48, r49, r50, r51,
429 r52, total,
nullptr);
434#pragma GCC diagnostic pop
auto S3_bulk_action_alpha_one(Int_precision const N1_TL, Int_precision const N3_31_13, Int_precision const N3_22, long double const K, long double const Lambda) noexcept -> Gmpzf
Calculates S3 bulk action for =1.
auto S3_bulk_action_alpha_minus_one(Int_precision const N1_TL, Int_precision const N3_31_13, Int_precision const N3_22, long double const K, long double const Lambda) noexcept -> Gmpzf
Calculates S3 bulk action for =-1.
auto S3_bulk_action(Int_precision const N1_TL, Int_precision const N3_31_13, Int_precision const N3_22, long double const Alpha, long double const K, long double const Lambda) noexcept -> Gmpzf
Calculates the generalized S3 bulk action in terms of , , , , , and .
Global integer and precision settings.
std::int_fast32_t Int_precision
static Int_precision constexpr PRECISION
Sets the precision for MPFR.