1 #ifndef _tinyfadtwenty_h_ 2 #define _tinyfadtwenty_h_ 9 template <
class T>
class TinyFad<20,T> {
41 void diff(
const size_t ith,
const size_t sz){
65 case 0 : dx0_ = T(1.);
break;
66 case 1 : dx1_ = T(1.);
break;
67 case 2 : dx2_ = T(1.);
break;
68 case 3 : dx3_ = T(1.);
break;
69 case 4 : dx4_ = T(1.);
break;
70 case 5 : dx5_ = T(1.);
break;
71 case 6 : dx6_ = T(1.);
break;
72 case 7 : dx7_ = T(1.);
break;
73 case 8 : dx8_ = T(1.);
break;
74 case 9 : dx9_ = T(1.);
break;
75 case 10 : dx10_ = T(1.);
break;
76 case 11 : dx11_ = T(1.);
break;
77 case 12 : dx12_ = T(1.);
break;
78 case 13 : dx13_ = T(1.);
break;
79 case 14 : dx14_ = T(1.);
break;
80 case 15 : dx15_ = T(1.);
break;
81 case 16 : dx16_ = T(1.);
break;
82 case 17 : dx17_ = T(1.);
break;
83 case 18 : dx18_ = T(1.);
break;
84 case 19 : dx19_ = T(1.);
break;
85 default : cout <<
"ith = " << ith <<
" out of definition set" << endl;exit(1);
89 TinyFad(
const T& ind,
const int ini) : n(ini+1), val_(ind) {
112 case 0 : dx0_ = T(1.);
break;
113 case 1 : dx1_ = T(1.);
break;
114 case 2 : dx2_ = T(1.);
break;
115 case 3 : dx3_ = T(1.);
break;
116 case 4 : dx4_ = T(1.);
break;
117 case 5 : dx5_ = T(1.);
break;
118 case 6 : dx6_ = T(1.);
break;
119 case 7 : dx7_ = T(1.);
break;
120 case 8 : dx8_ = T(1.);
break;
121 case 9 : dx9_ = T(1.);
break;
122 case 10 : dx10_ = T(1.);
break;
123 case 11 : dx11_ = T(1.);
break;
124 case 12 : dx12_ = T(1.);
break;
125 case 13 : dx13_ = T(1.);
break;
126 case 14 : dx14_ = T(1.);
break;
127 case 15 : dx15_ = T(1.);
break;
128 case 16 : dx16_ = T(1.);
break;
129 case 17 : dx17_ = T(1.);
break;
130 case 18 : dx18_ = T(1.);
break;
131 case 19 : dx19_ = T(1.);
break;
132 default : cout <<
"ini = " << ini <<
" out of definition set" << endl;exit(1);
205 int N()
const {
return n-1;}
210 const T&
d0()
const {
return dx0_;}
211 T&
d0() {
return dx0_;}
213 const T&
d1()
const {
return dx1_;}
214 T&
d1() {
return dx1_;}
216 const T&
d2()
const {
return dx2_;}
217 T&
d2() {
return dx2_;}
219 const T&
d3()
const {
return dx3_;}
220 T&
d3() {
return dx3_;}
222 const T&
d4()
const {
return dx4_;}
223 T&
d4() {
return dx4_;}
225 const T&
d5()
const {
return dx5_;}
226 T&
d5() {
return dx5_;}
228 const T&
d6()
const {
return dx6_;}
229 T&
d6() {
return dx6_;}
231 const T&
d7()
const {
return dx7_;}
232 T&
d7() {
return dx7_;}
234 const T&
d8()
const {
return dx8_;}
235 T&
d8() {
return dx8_;}
237 const T&
d9()
const {
return dx9_;}
238 T&
d9() {
return dx9_;}
240 const T&
d10()
const {
return dx10_;}
243 const T&
d11()
const {
return dx11_;}
246 const T&
d12()
const {
return dx12_;}
249 const T&
d13()
const {
return dx13_;}
252 const T&
d14()
const {
return dx14_;}
255 const T&
d15()
const {
return dx15_;}
258 const T&
d16()
const {
return dx16_;}
261 const T&
d17()
const {
return dx17_;}
264 const T&
d18()
const {
return dx18_;}
267 const T&
d19()
const {
return dx19_;}
272 case 0 :
return dx0_;
273 case 1 :
return dx1_;
274 case 2 :
return dx2_;
275 case 3 :
return dx3_;
276 case 4 :
return dx4_;
277 case 5 :
return dx5_;
278 case 6 :
return dx6_;
279 case 7 :
return dx7_;
280 case 8 :
return dx8_;
281 case 9 :
return dx9_;
282 case 10 :
return dx10_;
283 case 11 :
return dx11_;
284 case 12 :
return dx12_;
285 case 13 :
return dx13_;
286 case 14 :
return dx14_;
287 case 15 :
return dx15_;
288 case 16 :
return dx16_;
289 case 17 :
return dx17_;
290 case 18 :
return dx18_;
291 case 19 :
return dx19_;
292 default : cout <<
"i out of bounds" << endl;exit(1);
295 const T&
dx(
int i)
const {
297 case 0 :
return dx0_;
298 case 1 :
return dx1_;
299 case 2 :
return dx2_;
300 case 3 :
return dx3_;
301 case 4 :
return dx4_;
302 case 5 :
return dx5_;
303 case 6 :
return dx6_;
304 case 7 :
return dx7_;
305 case 8 :
return dx8_;
306 case 9 :
return dx9_;
307 case 10 :
return dx10_;
308 case 11 :
return dx11_;
309 case 12 :
return dx12_;
310 case 13 :
return dx13_;
311 case 14 :
return dx14_;
312 case 15 :
return dx15_;
313 case 16 :
return dx16_;
314 case 17 :
return dx17_;
315 case 18 :
return dx18_;
316 case 19 :
return dx19_;
317 default : cout <<
"i out of bounds" << endl;exit(1);
322 case 0 :
return dx0_;
323 case 1 :
return dx1_;
324 case 2 :
return dx2_;
325 case 3 :
return dx3_;
326 case 4 :
return dx4_;
327 case 5 :
return dx5_;
328 case 6 :
return dx6_;
329 case 7 :
return dx7_;
330 case 8 :
return dx8_;
331 case 9 :
return dx9_;
332 case 10 :
return dx10_;
333 case 11 :
return dx11_;
334 case 12 :
return dx12_;
335 case 13 :
return dx13_;
336 case 14 :
return dx14_;
337 case 15 :
return dx15_;
338 case 16 :
return dx16_;
339 case 17 :
return dx17_;
340 case 18 :
return dx18_;
341 case 19 :
return dx19_;
342 default : cout <<
"i out of bounds" << endl;exit(1);
345 const T&
d(
int i)
const {
347 case 0 :
return dx0_;
348 case 1 :
return dx1_;
349 case 2 :
return dx2_;
350 case 3 :
return dx3_;
351 case 4 :
return dx4_;
352 case 5 :
return dx5_;
353 case 6 :
return dx6_;
354 case 7 :
return dx7_;
355 case 8 :
return dx8_;
356 case 9 :
return dx9_;
357 case 10 :
return dx10_;
358 case 11 :
return dx11_;
359 case 12 :
return dx12_;
360 case 13 :
return dx13_;
361 case 14 :
return dx14_;
362 case 15 :
return dx15_;
363 case 16 :
return dx16_;
364 case 17 :
return dx17_;
365 case 18 :
return dx18_;
366 case 19 :
return dx19_;
367 default : cout <<
"i out of bounds" << endl;exit(1);
477 dx0_ = dx0_ * in.
val_ + val_ * in.
dx0_;
478 dx1_ = dx1_ * in.
val_ + val_ * in.
dx1_;
479 dx2_ = dx2_ * in.
val_ + val_ * in.
dx2_;
480 dx3_ = dx3_ * in.
val_ + val_ * in.
dx3_;
481 dx4_ = dx4_ * in.
val_ + val_ * in.
dx4_;
482 dx5_ = dx5_ * in.
val_ + val_ * in.
dx5_;
483 dx6_ = dx6_ * in.
val_ + val_ * in.
dx6_;
484 dx7_ = dx7_ * in.
val_ + val_ * in.
dx7_;
485 dx8_ = dx8_ * in.
val_ + val_ * in.
dx8_;
486 dx9_ = dx9_ * in.
val_ + val_ * in.
dx9_;
487 dx10_ = dx10_ * in.
val_ + val_ * in.
dx10_;
488 dx11_ = dx11_ * in.
val_ + val_ * in.
dx11_;
489 dx12_ = dx12_ * in.
val_ + val_ * in.
dx12_;
490 dx13_ = dx13_ * in.
val_ + val_ * in.
dx13_;
491 dx14_ = dx14_ * in.
val_ + val_ * in.
dx14_;
492 dx15_ = dx15_ * in.
val_ + val_ * in.
dx15_;
493 dx16_ = dx16_ * in.
val_ + val_ * in.
dx16_;
494 dx17_ = dx17_ * in.
val_ + val_ * in.
dx17_;
495 dx18_ = dx18_ * in.
val_ + val_ * in.
dx18_;
496 dx19_ = dx19_ * in.
val_ + val_ * in.
dx19_;
502 if (in.
val_ == 0.)
error(
"TinyFad & TinyFad::operator /= (const TinyFad & in), dividing by 0");
563 if ( in == T(0.) )
error(
"TinyFad & TinyFad::operator /= (const T & in), dividing by 0");
621 template <
class L,
class R>
inline 630 tmp.d0() = un.d0() + deux.d0();
632 tmp.d1() = un.d1() + deux.d1();
634 tmp.d2() = un.d2() + deux.d2();
636 tmp.d3() = un.d3() + deux.d3();
638 tmp.d4() = un.d4() + deux.d4();
640 tmp.d5() = un.d5() + deux.d5();
642 tmp.d6() = un.d6() + deux.d6();
644 tmp.d7() = un.d7() + deux.d7();
646 tmp.d8() = un.d8() + deux.d8();
648 tmp.d9() = un.d9() + deux.d9();
650 tmp.d10() = un.d10() + deux.d10();
652 tmp.d11() = un.d11() + deux.d11();
654 tmp.d12() = un.d12() + deux.d12();
656 tmp.d13() = un.d13() + deux.d13();
658 tmp.d14() = un.d14() + deux.d14();
660 tmp.d15() = un.d15() + deux.d15();
662 tmp.d16() = un.d16() + deux.d16();
664 tmp.d17() = un.d17() + deux.d17();
666 tmp.d18() = un.d18() + deux.d18();
668 tmp.d19() = un.d19() + deux.d19();
675 template <
class L,
class R>
inline 704 tmp.d10() = un.d10();
706 tmp.d11() = un.d11();
708 tmp.d12() = un.d12();
710 tmp.d13() = un.d13();
712 tmp.d14() = un.d14();
714 tmp.d15() = un.d15();
716 tmp.d16() = un.d16();
718 tmp.d17() = un.d17();
720 tmp.d18() = un.d18();
722 tmp.d19() = un.d19();
724 tmp.
val() = un.
val() + deux;
729 template <
class L,
class R>
inline 735 template <
class L,
class R>
inline 744 tmp.d0() = un.d0()*deux.
val() + un.
val() * deux.d0();
746 tmp.d1() = un.d1()*deux.
val() + un.
val() * deux.d1();
748 tmp.d2() = un.d2()*deux.
val() + un.
val() * deux.d2();
750 tmp.d3() = un.d3()*deux.
val() + un.
val() * deux.d3();
752 tmp.d4() = un.d4()*deux.
val() + un.
val() * deux.d4();
754 tmp.d5() = un.d5()*deux.
val() + un.
val() * deux.d5();
756 tmp.d6() = un.d6()*deux.
val() + un.
val() * deux.d6();
758 tmp.d7() = un.d7()*deux.
val() + un.
val() * deux.d7();
760 tmp.d8() = un.d8()*deux.
val() + un.
val() * deux.d8();
762 tmp.d9() = un.d9()*deux.
val() + un.
val() * deux.d9();
764 tmp.d10() = un.d10()*deux.
val() + un.
val() * deux.d10();
766 tmp.d11() = un.d11()*deux.
val() + un.
val() * deux.d11();
768 tmp.d12() = un.d12()*deux.
val() + un.
val() * deux.d12();
770 tmp.d13() = un.d13()*deux.
val() + un.
val() * deux.d13();
772 tmp.d14() = un.d14()*deux.
val() + un.
val() * deux.d14();
774 tmp.d15() = un.d15()*deux.
val() + un.
val() * deux.d15();
776 tmp.d16() = un.d16()*deux.
val() + un.
val() * deux.d16();
778 tmp.d17() = un.d17()*deux.
val() + un.
val() * deux.d17();
780 tmp.d18() = un.d18()*deux.
val() + un.
val() * deux.d18();
782 tmp.d19() = un.d19()*deux.
val() + un.
val() * deux.d19();
789 template <
class L,
class R>
inline 798 tmp.d0() = un.d0()*deux;
800 tmp.d1() = un.d1()*deux;
802 tmp.d2() = un.d2()*deux;
804 tmp.d3() = un.d3()*deux;
806 tmp.d4() = un.d4()*deux;
808 tmp.d5() = un.d5()*deux;
810 tmp.d6() = un.d6()*deux;
812 tmp.d7() = un.d7()*deux;
814 tmp.d8() = un.d8()*deux;
816 tmp.d9() = un.d9()*deux;
818 tmp.d10() = un.d10()*deux;
820 tmp.d11() = un.d11()*deux;
822 tmp.d12() = un.d12()*deux;
824 tmp.d13() = un.d13()*deux;
826 tmp.d14() = un.d14()*deux;
828 tmp.d15() = un.d15()*deux;
830 tmp.d16() = un.d16()*deux;
832 tmp.d17() = un.d17()*deux;
834 tmp.d18() = un.d18()*deux;
836 tmp.d19() = un.d19()*deux;
838 tmp.
val() = un.
val() * deux;
843 template <
class L,
class R>
inline 851 template <
class L,
class R>
inline 860 tmp.d0() = un.d0() - deux.d0();
862 tmp.d1() = un.d1() - deux.d1();
864 tmp.d2() = un.d2() - deux.d2();
866 tmp.d3() = un.d3() - deux.d3();
868 tmp.d4() = un.d4() - deux.d4();
870 tmp.d5() = un.d5() - deux.d5();
872 tmp.d6() = un.d6() - deux.d6();
874 tmp.d7() = un.d7() - deux.d7();
876 tmp.d8() = un.d8() - deux.d8();
878 tmp.d9() = un.d9() - deux.d9();
880 tmp.d10() = un.d10() - deux.d10();
882 tmp.d11() = un.d11() - deux.d11();
884 tmp.d12() = un.d12() - deux.d12();
886 tmp.d13() = un.d13() - deux.d13();
888 tmp.d14() = un.d14() - deux.d14();
890 tmp.d15() = un.d15() - deux.d15();
892 tmp.d16() = un.d16() - deux.d16();
894 tmp.d17() = un.d17() - deux.d17();
896 tmp.d18() = un.d18() - deux.d18();
898 tmp.d19() = un.d19() - deux.d19();
905 template <
class L,
class R>
inline 914 tmp.d0() -= deux.d0();
916 tmp.d1() -= deux.d1();
918 tmp.d2() -= deux.d2();
920 tmp.d3() -= deux.d3();
922 tmp.d4() -= deux.d4();
924 tmp.d5() -= deux.d5();
926 tmp.d6() -= deux.d6();
928 tmp.d7() -= deux.d7();
930 tmp.d8() -= deux.d8();
932 tmp.d9() -= deux.d9();
934 tmp.d10() -= deux.d10();
936 tmp.d11() -= deux.d11();
938 tmp.d12() -= deux.d12();
940 tmp.d13() -= deux.d13();
942 tmp.d14() -= deux.d14();
944 tmp.d15() -= deux.d15();
946 tmp.d16() -= deux.d16();
948 tmp.d17() -= deux.d17();
950 tmp.d18() -= deux.d18();
952 tmp.d19() -= deux.d19();
954 tmp.
val() = un - deux.
val();
959 template <
class L,
class R>
inline 987 tmp.d10() = un.d10();
989 tmp.d11() = un.d11();
991 tmp.d12() = un.d12();
993 tmp.d13() = un.d13();
995 tmp.d14() = un.d14();
997 tmp.d15() = un.d15();
999 tmp.d16() = un.d16();
1001 tmp.d17() = un.d17();
1003 tmp.d18() = un.d18();
1005 tmp.d19() = un.d19();
1007 tmp.
val() = un.
val() - deux;
1012 template <
class L,
class R>
inline 1018 if (deux.
val() == 0.)
error(
"TinyFad & TinyFad::operator /(const TinyFad<20,L> & un, const TinyFad<20,R> & deux), dividing by 0");
1022 value_type dval = deux.
val();
1024 tmp.d0() = ( un.d0()* deux.
val() - un.
val() * deux.d0() ) / dval / dval ;
1026 tmp.d1() = ( un.d1()* deux.
val() - un.
val() * deux.d1() ) / dval / dval ;
1028 tmp.d2() = ( un.d2()* deux.
val() - un.
val() * deux.d2() ) / dval / dval ;
1030 tmp.d3() = ( un.d3()* deux.
val() - un.
val() * deux.d3() ) / dval / dval ;
1032 tmp.d4() = ( un.d4()* deux.
val() - un.
val() * deux.d4() ) / dval / dval ;
1034 tmp.d5() = ( un.d5()* deux.
val() - un.
val() * deux.d5() ) / dval / dval ;
1036 tmp.d6() = ( un.d6()* deux.
val() - un.
val() * deux.d6() ) / dval / dval ;
1038 tmp.d7() = ( un.d7()* deux.
val() - un.
val() * deux.d7() ) / dval / dval ;
1040 tmp.d8() = ( un.d8()* deux.
val() - un.
val() * deux.d8() ) / dval / dval ;
1042 tmp.d9() = ( un.d9()* deux.
val() - un.
val() * deux.d9() ) / dval / dval ;
1044 tmp.d10() = ( un.d10()* deux.
val() - un.
val() * deux.d10() ) / dval / dval ;
1046 tmp.d11() = ( un.d11()* deux.
val() - un.
val() * deux.d11() ) / dval / dval ;
1048 tmp.d12() = ( un.d12()* deux.
val() - un.
val() * deux.d12() ) / dval / dval ;
1050 tmp.d13() = ( un.d13()* deux.
val() - un.
val() * deux.d13() ) / dval / dval ;
1052 tmp.d14() = ( un.d14()* deux.
val() - un.
val() * deux.d14() ) / dval / dval ;
1054 tmp.d15() = ( un.d15()* deux.
val() - un.
val() * deux.d15() ) / dval / dval ;
1056 tmp.d16() = ( un.d16()* deux.
val() - un.
val() * deux.d16() ) / dval / dval ;
1058 tmp.d17() = ( un.d17()* deux.
val() - un.
val() * deux.d17() ) / dval / dval ;
1060 tmp.d18() = ( un.d18()* deux.
val() - un.
val() * deux.d18() ) / dval / dval ;
1062 tmp.d19() = ( un.d19()* deux.
val() - un.
val() * deux.d19() ) / dval / dval ;
1064 tmp.
val() = un.
val() / dval;
1069 template <
class L,
class R>
inline 1075 if (deux.
val() == 0.)
error(
"TinyFad & TinyFad::operator /(const L & un, const TinyFad<20,R> & deux), dividing by 0");
1079 value_type dval = deux.
val();
1081 tmp.d0() = - un * deux.d0() / dval / dval ;
1083 tmp.d1() = - un * deux.d1() / dval / dval ;
1085 tmp.d2() = - un * deux.d2() / dval / dval ;
1087 tmp.d3() = - un * deux.d3() / dval / dval ;
1089 tmp.d4() = - un * deux.d4() / dval / dval ;
1091 tmp.d5() = - un * deux.d5() / dval / dval ;
1093 tmp.d6() = - un * deux.d6() / dval / dval ;
1095 tmp.d7() = - un * deux.d7() / dval / dval ;
1097 tmp.d8() = - un * deux.d8() / dval / dval ;
1099 tmp.d9() = - un * deux.d9() / dval / dval ;
1101 tmp.d10() = - un * deux.d10() / dval / dval ;
1103 tmp.d11() = - un * deux.d11() / dval / dval ;
1105 tmp.d12() = - un * deux.d12() / dval / dval ;
1107 tmp.d13() = - un * deux.d13() / dval / dval ;
1109 tmp.d14() = - un * deux.d14() / dval / dval ;
1111 tmp.d15() = - un * deux.d15() / dval / dval ;
1113 tmp.d16() = - un * deux.d16() / dval / dval ;
1115 tmp.d17() = - un * deux.d17() / dval / dval ;
1117 tmp.d18() = - un * deux.d18() / dval / dval ;
1119 tmp.d19() = - un * deux.d19() / dval / dval ;
1121 tmp.
val() = un / dval;
1126 template <
class L,
class R>
inline 1132 if (deux == 0.)
error(
"TinyFad & TinyFad::operator /(const TinyFad<20,L> & un, const R & deux), dividing by 0");
1137 tmp.d0() = un.d0() / deux;
1139 tmp.d1() = un.d1() / deux;
1141 tmp.d2() = un.d2() / deux;
1143 tmp.d3() = un.d3() / deux;
1145 tmp.d4() = un.d4() / deux;
1147 tmp.d5() = un.d5() / deux;
1149 tmp.d6() = un.d6() / deux;
1151 tmp.d7() = un.d7() / deux;
1153 tmp.d8() = un.d8() / deux;
1155 tmp.d9() = un.d9() / deux;
1157 tmp.d10() = un.d10() / deux;
1159 tmp.d11() = un.d11() / deux;
1161 tmp.d12() = un.d12() / deux;
1163 tmp.d13() = un.d13() / deux;
1165 tmp.d14() = un.d14() / deux;
1167 tmp.d15() = un.d15() / deux;
1169 tmp.d16() = un.d16() / deux;
1171 tmp.d17() = un.d17() / deux;
1173 tmp.d18() = un.d18() / deux;
1175 tmp.d19() = un.d19() / deux;
1177 tmp.
val() = un.
val() / deux;
1212 if ( in.
val() <= 0)
error(
"TinyFad log (const TinyFad& in) : zero or negative value");
1215 tmp.
d0() = in.
d0() / in.
val();
1216 tmp.
d1() = in.
d1() / in.
val();
1217 tmp.
d2() = in.
d2() / in.
val();
1218 tmp.
d3() = in.
d3() / in.
val();
1219 tmp.
d4() = in.
d4() / in.
val();
1220 tmp.
d5() = in.
d5() / in.
val();
1221 tmp.
d6() = in.
d6() / in.
val();
1222 tmp.
d7() = in.
d7() / in.
val();
1223 tmp.
d8() = in.
d8() / in.
val();
1224 tmp.
d9() = in.
d9() / in.
val();
1241 if ( in.
val() < 0. )
error(
"TinyFad<20,T> sqrt (const TinyFad& in) : negative value");
1245 if ( in.
val() == T(0.) ){
1246 if ( in.
d0() != T(0.) ) test =
false;
1248 if ( in.
d1() != T(0.) ) test =
false;
1250 if ( in.
d2() != T(0.) ) test =
false;
1252 if ( in.
d3() != T(0.) ) test =
false;
1254 if ( in.
d4() != T(0.) ) test =
false;
1256 if ( in.
d5() != T(0.) ) test =
false;
1258 if ( in.
d6() != T(0.) ) test =
false;
1260 if ( in.
d7() != T(0.) ) test =
false;
1262 if ( in.
d8() != T(0.) ) test =
false;
1264 if ( in.
d9() != T(0.) ) test =
false;
1266 if ( in.
d10() != T(0.) ) test =
false;
1268 if ( in.
d11() != T(0.) ) test =
false;
1270 if ( in.
d12() != T(0.) ) test =
false;
1272 if ( in.
d13() != T(0.) ) test =
false;
1274 if ( in.
d14() != T(0.) ) test =
false;
1276 if ( in.
d15() != T(0.) ) test =
false;
1278 if ( in.
d16() != T(0.) ) test =
false;
1280 if ( in.
d17() != T(0.) ) test =
false;
1282 if ( in.
d18() != T(0.) ) test =
false;
1284 if ( in.
d19() != T(0.) ) test =
false;
1287 error(
"TinyFad<20,T> sqrt (const TinyFad& in) : null value");
1373 if ( in.
val() == 0)
error(
"TinyFad tan (const TinyFad& in) undiefined in 0.");
1376 T cosinus =
cos(in.
val());
1377 tmp.
d0() = in.
d0() / cosinus / cosinus;
1378 tmp.
d1() = in.
d1() / cosinus / cosinus;
1379 tmp.
d2() = in.
d2() / cosinus / cosinus;
1380 tmp.
d3() = in.
d3() / cosinus / cosinus;
1381 tmp.
d4() = in.
d4() / cosinus / cosinus;
1382 tmp.
d5() = in.
d5() / cosinus / cosinus;
1383 tmp.
d6() = in.
d6() / cosinus / cosinus;
1384 tmp.
d7() = in.
d7() / cosinus / cosinus;
1385 tmp.
d8() = in.
d8() / cosinus / cosinus;
1386 tmp.
d9() = in.
d9() / cosinus / cosinus;
1387 tmp.
d10() = in.
d10() / cosinus / cosinus;
1388 tmp.
d11() = in.
d11() / cosinus / cosinus;
1389 tmp.
d12() = in.
d12() / cosinus / cosinus;
1390 tmp.
d13() = in.
d13() / cosinus / cosinus;
1391 tmp.
d14() = in.
d14() / cosinus / cosinus;
1392 tmp.
d15() = in.
d15() / cosinus / cosinus;
1393 tmp.
d16() = in.
d16() / cosinus / cosinus;
1394 tmp.
d17() = in.
d17() / cosinus / cosinus;
1395 tmp.
d18() = in.
d18() / cosinus / cosinus;
1396 tmp.
d19() = in.
d19() / cosinus / cosinus;
1431 if (un.
val() == 0)
error(
"TinyFad pow (const TinyFad& un, const TinyFad& deux), un = 0. ");
1482 tmp.d0() = e*in.
d0()*
pow((
double)in.
val(), (double)e-1);
1483 tmp.d1() = e*in.
d1()*
pow((
double)in.
val(), (double)e-1);
1484 tmp.d2() = e*in.
d2()*
pow((
double)in.
val(), (double)e-1);
1485 tmp.d3() = e*in.
d3()*
pow((
double)in.
val(), (double)e-1);
1486 tmp.d4() = e*in.
d4()*
pow((
double)in.
val(), (double)e-1);
1487 tmp.d5() = e*in.
d5()*
pow((
double)in.
val(), (double)e-1);
1488 tmp.d6() = e*in.
d6()*
pow((
double)in.
val(), (double)e-1);
1489 tmp.d7() = e*in.
d7()*
pow((
double)in.
val(), (double)e-1);
1490 tmp.d8() = e*in.
d8()*
pow((
double)in.
val(), (double)e-1);
1491 tmp.d9() = e*in.
d9()*
pow((
double)in.
val(), (double)e-1);
1492 tmp.d10() = e*in.
d10()*
pow((
double)in.
val(), (double)e-1);
1493 tmp.d11() = e*in.
d11()*
pow((
double)in.
val(), (double)e-1);
1494 tmp.d12() = e*in.
d12()*
pow((
double)in.
val(), (double)e-1);
1495 tmp.d13() = e*in.
d13()*
pow((
double)in.
val(), (double)e-1);
1496 tmp.d14() = e*in.
d14()*
pow((
double)in.
val(), (double)e-1);
1497 tmp.d15() = e*in.
d15()*
pow((
double)in.
val(), (double)e-1);
1498 tmp.d16() = e*in.
d16()*
pow((
double)in.
val(), (double)e-1);
1499 tmp.d17() = e*in.
d17()*
pow((
double)in.
val(), (double)e-1);
1500 tmp.d18() = e*in.
d18()*
pow((
double)in.
val(), (double)e-1);
1501 tmp.d19() = e*in.
d19()*
pow((
double)in.
val(), (double)e-1);
1508 int sign = in.
val() > 0? 1:0;
1510 if (sign)
return in;
1514 template <
class T> std::ostream& operator << (std::ostream& os, const TinyFad<20,T>& a)
1516 os.setf(std::ios::fixed,std::ios::scientific);
1518 os << a.
val() <<
" [";
TinyFad< 20, typename NumericalTraits< L, R >::promote > operator*(const TinyFad< 20, L > &un, const TinyFad< 20, R > &deux)
TinyFad< 20, T > operator--(int)
TinyFad< 20, T > tan(const TinyFad< 20, T > &in)
TinyFad< Num, T > & operator-=(const TinyFad< Num, T > &in)
TinyFad< 20, T > exp(const TinyFad< 20, T > &in)
TinyFad< 20, T > cos(const TinyFad< 20, T > &in)
TinyFad< 20, T > operator+(const TinyFad< 20, T > &in)
TinyFad(const T &ind, const int ini)
TinyFad< 20, T > operator-(const TinyFad< 20, T > &in)
const T & dx(int i) const
TinyFad< 20, T > & operator++()
AutoPointerMutexArrayInit tmp
void diff(const size_t ith, const size_t sz)
TinyFad< 20, T > operator++(int)
TinyFad< 20, T > abs(const TinyFad< 20, T > &in)
TinyFad< Num, T > & operator=(const TinyFad< Num, T > &in)
TinyFad< 20, typename NumericalTraits< L, R >::promote > operator/(const TinyFad< 20, L > &un, const TinyFad< 20, R > &deux)
TinyFad< 20, T > sqrt(const TinyFad< 20, T > &in)
TinyFad< Num, T > & operator+=(const TinyFad< Num, T > &in)
TinyFad(const No_Initialization &)
TinyFad< Num, T > & operator*=(const TinyFad< Num, T > &in)
TinyFad< 20, T > pow(const TinyFad< 20, T > &in, double e)
TinyFad< 20, T > & operator--()
TinyFad< 20, T > sin(const TinyFad< 20, T > &in)
TinyFad< 20, T > log(const TinyFad< 20, T > &in)
TinyFad< Num, T > & operator/=(const TinyFad< Num, T > &in)
TinyFad(const TinyFad< 20, T > &in)