1 #ifndef _tinyfadnineteen_h_ 2 #define _tinyfadnineteen_h_ 9 template <
class T>
class TinyFad<19,T> {
40 void diff(
const size_t ith,
const size_t sz){
63 case 0 : dx0_ = T(1.);
break;
64 case 1 : dx1_ = T(1.);
break;
65 case 2 : dx2_ = T(1.);
break;
66 case 3 : dx3_ = T(1.);
break;
67 case 4 : dx4_ = T(1.);
break;
68 case 5 : dx5_ = T(1.);
break;
69 case 6 : dx6_ = T(1.);
break;
70 case 7 : dx7_ = T(1.);
break;
71 case 8 : dx8_ = T(1.);
break;
72 case 9 : dx9_ = T(1.);
break;
73 case 10 : dx10_ = T(1.);
break;
74 case 11 : dx11_ = T(1.);
break;
75 case 12 : dx12_ = T(1.);
break;
76 case 13 : dx13_ = T(1.);
break;
77 case 14 : dx14_ = T(1.);
break;
78 case 15 : dx15_ = T(1.);
break;
79 case 16 : dx16_ = T(1.);
break;
80 case 17 : dx17_ = T(1.);
break;
81 case 18 : dx18_ = T(1.);
break;
82 default : cout <<
"ith = " << ith <<
" out of definition set" << endl;exit(1);
86 TinyFad(
const T& ind,
const int ini) : n(ini+1), val_(ind) {
108 case 0 : dx0_ = T(1.);
break;
109 case 1 : dx1_ = T(1.);
break;
110 case 2 : dx2_ = T(1.);
break;
111 case 3 : dx3_ = T(1.);
break;
112 case 4 : dx4_ = T(1.);
break;
113 case 5 : dx5_ = T(1.);
break;
114 case 6 : dx6_ = T(1.);
break;
115 case 7 : dx7_ = T(1.);
break;
116 case 8 : dx8_ = T(1.);
break;
117 case 9 : dx9_ = T(1.);
break;
118 case 10 : dx10_ = T(1.);
break;
119 case 11 : dx11_ = T(1.);
break;
120 case 12 : dx12_ = T(1.);
break;
121 case 13 : dx13_ = T(1.);
break;
122 case 14 : dx14_ = T(1.);
break;
123 case 15 : dx15_ = T(1.);
break;
124 case 16 : dx16_ = T(1.);
break;
125 case 17 : dx17_ = T(1.);
break;
126 case 18 : dx18_ = T(1.);
break;
127 default : cout <<
"ini = " << ini <<
" out of definition set" << endl;exit(1);
197 int N()
const {
return n-1;}
202 const T&
d0()
const {
return dx0_;}
203 T&
d0() {
return dx0_;}
205 const T&
d1()
const {
return dx1_;}
206 T&
d1() {
return dx1_;}
208 const T&
d2()
const {
return dx2_;}
209 T&
d2() {
return dx2_;}
211 const T&
d3()
const {
return dx3_;}
212 T&
d3() {
return dx3_;}
214 const T&
d4()
const {
return dx4_;}
215 T&
d4() {
return dx4_;}
217 const T&
d5()
const {
return dx5_;}
218 T&
d5() {
return dx5_;}
220 const T&
d6()
const {
return dx6_;}
221 T&
d6() {
return dx6_;}
223 const T&
d7()
const {
return dx7_;}
224 T&
d7() {
return dx7_;}
226 const T&
d8()
const {
return dx8_;}
227 T&
d8() {
return dx8_;}
229 const T&
d9()
const {
return dx9_;}
230 T&
d9() {
return dx9_;}
232 const T&
d10()
const {
return dx10_;}
235 const T&
d11()
const {
return dx11_;}
238 const T&
d12()
const {
return dx12_;}
241 const T&
d13()
const {
return dx13_;}
244 const T&
d14()
const {
return dx14_;}
247 const T&
d15()
const {
return dx15_;}
250 const T&
d16()
const {
return dx16_;}
253 const T&
d17()
const {
return dx17_;}
256 const T&
d18()
const {
return dx18_;}
261 case 0 :
return dx0_;
262 case 1 :
return dx1_;
263 case 2 :
return dx2_;
264 case 3 :
return dx3_;
265 case 4 :
return dx4_;
266 case 5 :
return dx5_;
267 case 6 :
return dx6_;
268 case 7 :
return dx7_;
269 case 8 :
return dx8_;
270 case 9 :
return dx9_;
271 case 10 :
return dx10_;
272 case 11 :
return dx11_;
273 case 12 :
return dx12_;
274 case 13 :
return dx13_;
275 case 14 :
return dx14_;
276 case 15 :
return dx15_;
277 case 16 :
return dx16_;
278 case 17 :
return dx17_;
279 case 18 :
return dx18_;
280 default : cout <<
"i out of bounds" << endl;exit(1);
283 const T&
dx(
int i)
const {
285 case 0 :
return dx0_;
286 case 1 :
return dx1_;
287 case 2 :
return dx2_;
288 case 3 :
return dx3_;
289 case 4 :
return dx4_;
290 case 5 :
return dx5_;
291 case 6 :
return dx6_;
292 case 7 :
return dx7_;
293 case 8 :
return dx8_;
294 case 9 :
return dx9_;
295 case 10 :
return dx10_;
296 case 11 :
return dx11_;
297 case 12 :
return dx12_;
298 case 13 :
return dx13_;
299 case 14 :
return dx14_;
300 case 15 :
return dx15_;
301 case 16 :
return dx16_;
302 case 17 :
return dx17_;
303 case 18 :
return dx18_;
304 default : cout <<
"i out of bounds" << endl;exit(1);
309 case 0 :
return dx0_;
310 case 1 :
return dx1_;
311 case 2 :
return dx2_;
312 case 3 :
return dx3_;
313 case 4 :
return dx4_;
314 case 5 :
return dx5_;
315 case 6 :
return dx6_;
316 case 7 :
return dx7_;
317 case 8 :
return dx8_;
318 case 9 :
return dx9_;
319 case 10 :
return dx10_;
320 case 11 :
return dx11_;
321 case 12 :
return dx12_;
322 case 13 :
return dx13_;
323 case 14 :
return dx14_;
324 case 15 :
return dx15_;
325 case 16 :
return dx16_;
326 case 17 :
return dx17_;
327 case 18 :
return dx18_;
328 default : cout <<
"i out of bounds" << endl;exit(1);
331 const T&
d(
int i)
const {
333 case 0 :
return dx0_;
334 case 1 :
return dx1_;
335 case 2 :
return dx2_;
336 case 3 :
return dx3_;
337 case 4 :
return dx4_;
338 case 5 :
return dx5_;
339 case 6 :
return dx6_;
340 case 7 :
return dx7_;
341 case 8 :
return dx8_;
342 case 9 :
return dx9_;
343 case 10 :
return dx10_;
344 case 11 :
return dx11_;
345 case 12 :
return dx12_;
346 case 13 :
return dx13_;
347 case 14 :
return dx14_;
348 case 15 :
return dx15_;
349 case 16 :
return dx16_;
350 case 17 :
return dx17_;
351 case 18 :
return dx18_;
352 default : cout <<
"i out of bounds" << endl;exit(1);
458 dx0_ = dx0_ * in.
val_ + val_ * in.
dx0_;
459 dx1_ = dx1_ * in.
val_ + val_ * in.
dx1_;
460 dx2_ = dx2_ * in.
val_ + val_ * in.
dx2_;
461 dx3_ = dx3_ * in.
val_ + val_ * in.
dx3_;
462 dx4_ = dx4_ * in.
val_ + val_ * in.
dx4_;
463 dx5_ = dx5_ * in.
val_ + val_ * in.
dx5_;
464 dx6_ = dx6_ * in.
val_ + val_ * in.
dx6_;
465 dx7_ = dx7_ * in.
val_ + val_ * in.
dx7_;
466 dx8_ = dx8_ * in.
val_ + val_ * in.
dx8_;
467 dx9_ = dx9_ * in.
val_ + val_ * in.
dx9_;
468 dx10_ = dx10_ * in.
val_ + val_ * in.
dx10_;
469 dx11_ = dx11_ * in.
val_ + val_ * in.
dx11_;
470 dx12_ = dx12_ * in.
val_ + val_ * in.
dx12_;
471 dx13_ = dx13_ * in.
val_ + val_ * in.
dx13_;
472 dx14_ = dx14_ * in.
val_ + val_ * in.
dx14_;
473 dx15_ = dx15_ * in.
val_ + val_ * in.
dx15_;
474 dx16_ = dx16_ * in.
val_ + val_ * in.
dx16_;
475 dx17_ = dx17_ * in.
val_ + val_ * in.
dx17_;
476 dx18_ = dx18_ * in.
val_ + val_ * in.
dx18_;
482 if (in.
val_ == 0.)
error(
"TinyFad & TinyFad::operator /= (const TinyFad & in), dividing by 0");
541 if ( in == T(0.) )
error(
"TinyFad & TinyFad::operator /= (const T & in), dividing by 0");
598 template <
class L,
class R>
inline 607 tmp.d0() = un.d0() + deux.d0();
609 tmp.d1() = un.d1() + deux.d1();
611 tmp.d2() = un.d2() + deux.d2();
613 tmp.d3() = un.d3() + deux.d3();
615 tmp.d4() = un.d4() + deux.d4();
617 tmp.d5() = un.d5() + deux.d5();
619 tmp.d6() = un.d6() + deux.d6();
621 tmp.d7() = un.d7() + deux.d7();
623 tmp.d8() = un.d8() + deux.d8();
625 tmp.d9() = un.d9() + deux.d9();
627 tmp.d10() = un.d10() + deux.d10();
629 tmp.d11() = un.d11() + deux.d11();
631 tmp.d12() = un.d12() + deux.d12();
633 tmp.d13() = un.d13() + deux.d13();
635 tmp.d14() = un.d14() + deux.d14();
637 tmp.d15() = un.d15() + deux.d15();
639 tmp.d16() = un.d16() + deux.d16();
641 tmp.d17() = un.d17() + deux.d17();
643 tmp.d18() = un.d18() + deux.d18();
650 template <
class L,
class R>
inline 679 tmp.d10() = un.d10();
681 tmp.d11() = un.d11();
683 tmp.d12() = un.d12();
685 tmp.d13() = un.d13();
687 tmp.d14() = un.d14();
689 tmp.d15() = un.d15();
691 tmp.d16() = un.d16();
693 tmp.d17() = un.d17();
695 tmp.d18() = un.d18();
697 tmp.
val() = un.
val() + deux;
702 template <
class L,
class R>
inline 708 template <
class L,
class R>
inline 717 tmp.d0() = un.d0()*deux.
val() + un.
val() * deux.d0();
719 tmp.d1() = un.d1()*deux.
val() + un.
val() * deux.d1();
721 tmp.d2() = un.d2()*deux.
val() + un.
val() * deux.d2();
723 tmp.d3() = un.d3()*deux.
val() + un.
val() * deux.d3();
725 tmp.d4() = un.d4()*deux.
val() + un.
val() * deux.d4();
727 tmp.d5() = un.d5()*deux.
val() + un.
val() * deux.d5();
729 tmp.d6() = un.d6()*deux.
val() + un.
val() * deux.d6();
731 tmp.d7() = un.d7()*deux.
val() + un.
val() * deux.d7();
733 tmp.d8() = un.d8()*deux.
val() + un.
val() * deux.d8();
735 tmp.d9() = un.d9()*deux.
val() + un.
val() * deux.d9();
737 tmp.d10() = un.d10()*deux.
val() + un.
val() * deux.d10();
739 tmp.d11() = un.d11()*deux.
val() + un.
val() * deux.d11();
741 tmp.d12() = un.d12()*deux.
val() + un.
val() * deux.d12();
743 tmp.d13() = un.d13()*deux.
val() + un.
val() * deux.d13();
745 tmp.d14() = un.d14()*deux.
val() + un.
val() * deux.d14();
747 tmp.d15() = un.d15()*deux.
val() + un.
val() * deux.d15();
749 tmp.d16() = un.d16()*deux.
val() + un.
val() * deux.d16();
751 tmp.d17() = un.d17()*deux.
val() + un.
val() * deux.d17();
753 tmp.d18() = un.d18()*deux.
val() + un.
val() * deux.d18();
760 template <
class L,
class R>
inline 769 tmp.d0() = un.d0()*deux;
771 tmp.d1() = un.d1()*deux;
773 tmp.d2() = un.d2()*deux;
775 tmp.d3() = un.d3()*deux;
777 tmp.d4() = un.d4()*deux;
779 tmp.d5() = un.d5()*deux;
781 tmp.d6() = un.d6()*deux;
783 tmp.d7() = un.d7()*deux;
785 tmp.d8() = un.d8()*deux;
787 tmp.d9() = un.d9()*deux;
789 tmp.d10() = un.d10()*deux;
791 tmp.d11() = un.d11()*deux;
793 tmp.d12() = un.d12()*deux;
795 tmp.d13() = un.d13()*deux;
797 tmp.d14() = un.d14()*deux;
799 tmp.d15() = un.d15()*deux;
801 tmp.d16() = un.d16()*deux;
803 tmp.d17() = un.d17()*deux;
805 tmp.d18() = un.d18()*deux;
807 tmp.
val() = un.
val() * deux;
812 template <
class L,
class R>
inline 820 template <
class L,
class R>
inline 829 tmp.d0() = un.d0() - deux.d0();
831 tmp.d1() = un.d1() - deux.d1();
833 tmp.d2() = un.d2() - deux.d2();
835 tmp.d3() = un.d3() - deux.d3();
837 tmp.d4() = un.d4() - deux.d4();
839 tmp.d5() = un.d5() - deux.d5();
841 tmp.d6() = un.d6() - deux.d6();
843 tmp.d7() = un.d7() - deux.d7();
845 tmp.d8() = un.d8() - deux.d8();
847 tmp.d9() = un.d9() - deux.d9();
849 tmp.d10() = un.d10() - deux.d10();
851 tmp.d11() = un.d11() - deux.d11();
853 tmp.d12() = un.d12() - deux.d12();
855 tmp.d13() = un.d13() - deux.d13();
857 tmp.d14() = un.d14() - deux.d14();
859 tmp.d15() = un.d15() - deux.d15();
861 tmp.d16() = un.d16() - deux.d16();
863 tmp.d17() = un.d17() - deux.d17();
865 tmp.d18() = un.d18() - deux.d18();
872 template <
class L,
class R>
inline 881 tmp.d0() -= deux.d0();
883 tmp.d1() -= deux.d1();
885 tmp.d2() -= deux.d2();
887 tmp.d3() -= deux.d3();
889 tmp.d4() -= deux.d4();
891 tmp.d5() -= deux.d5();
893 tmp.d6() -= deux.d6();
895 tmp.d7() -= deux.d7();
897 tmp.d8() -= deux.d8();
899 tmp.d9() -= deux.d9();
901 tmp.d10() -= deux.d10();
903 tmp.d11() -= deux.d11();
905 tmp.d12() -= deux.d12();
907 tmp.d13() -= deux.d13();
909 tmp.d14() -= deux.d14();
911 tmp.d15() -= deux.d15();
913 tmp.d16() -= deux.d16();
915 tmp.d17() -= deux.d17();
917 tmp.d18() -= deux.d18();
919 tmp.
val() = un - deux.
val();
924 template <
class L,
class R>
inline 952 tmp.d10() = un.d10();
954 tmp.d11() = un.d11();
956 tmp.d12() = un.d12();
958 tmp.d13() = un.d13();
960 tmp.d14() = un.d14();
962 tmp.d15() = un.d15();
964 tmp.d16() = un.d16();
966 tmp.d17() = un.d17();
968 tmp.d18() = un.d18();
970 tmp.
val() = un.
val() - deux;
975 template <
class L,
class R>
inline 981 if (deux.
val() == 0.)
error(
"TinyFad & TinyFad::operator /(const TinyFad<19,L> & un, const TinyFad<19,R> & deux), dividing by 0");
985 value_type dval = deux.
val();
987 tmp.d0() = ( un.d0()* deux.
val() - un.
val() * deux.d0() ) / dval / dval ;
989 tmp.d1() = ( un.d1()* deux.
val() - un.
val() * deux.d1() ) / dval / dval ;
991 tmp.d2() = ( un.d2()* deux.
val() - un.
val() * deux.d2() ) / dval / dval ;
993 tmp.d3() = ( un.d3()* deux.
val() - un.
val() * deux.d3() ) / dval / dval ;
995 tmp.d4() = ( un.d4()* deux.
val() - un.
val() * deux.d4() ) / dval / dval ;
997 tmp.d5() = ( un.d5()* deux.
val() - un.
val() * deux.d5() ) / dval / dval ;
999 tmp.d6() = ( un.d6()* deux.
val() - un.
val() * deux.d6() ) / dval / dval ;
1001 tmp.d7() = ( un.d7()* deux.
val() - un.
val() * deux.d7() ) / dval / dval ;
1003 tmp.d8() = ( un.d8()* deux.
val() - un.
val() * deux.d8() ) / dval / dval ;
1005 tmp.d9() = ( un.d9()* deux.
val() - un.
val() * deux.d9() ) / dval / dval ;
1007 tmp.d10() = ( un.d10()* deux.
val() - un.
val() * deux.d10() ) / dval / dval ;
1009 tmp.d11() = ( un.d11()* deux.
val() - un.
val() * deux.d11() ) / dval / dval ;
1011 tmp.d12() = ( un.d12()* deux.
val() - un.
val() * deux.d12() ) / dval / dval ;
1013 tmp.d13() = ( un.d13()* deux.
val() - un.
val() * deux.d13() ) / dval / dval ;
1015 tmp.d14() = ( un.d14()* deux.
val() - un.
val() * deux.d14() ) / dval / dval ;
1017 tmp.d15() = ( un.d15()* deux.
val() - un.
val() * deux.d15() ) / dval / dval ;
1019 tmp.d16() = ( un.d16()* deux.
val() - un.
val() * deux.d16() ) / dval / dval ;
1021 tmp.d17() = ( un.d17()* deux.
val() - un.
val() * deux.d17() ) / dval / dval ;
1023 tmp.d18() = ( un.d18()* deux.
val() - un.
val() * deux.d18() ) / dval / dval ;
1025 tmp.
val() = un.
val() / dval;
1030 template <
class L,
class R>
inline 1036 if (deux.
val() == 0.)
error(
"TinyFad & TinyFad::operator /(const L & un, const TinyFad<19,R> & deux), dividing by 0");
1040 value_type dval = deux.
val();
1042 tmp.d0() = - un * deux.d0() / dval / dval ;
1044 tmp.d1() = - un * deux.d1() / dval / dval ;
1046 tmp.d2() = - un * deux.d2() / dval / dval ;
1048 tmp.d3() = - un * deux.d3() / dval / dval ;
1050 tmp.d4() = - un * deux.d4() / dval / dval ;
1052 tmp.d5() = - un * deux.d5() / dval / dval ;
1054 tmp.d6() = - un * deux.d6() / dval / dval ;
1056 tmp.d7() = - un * deux.d7() / dval / dval ;
1058 tmp.d8() = - un * deux.d8() / dval / dval ;
1060 tmp.d9() = - un * deux.d9() / dval / dval ;
1062 tmp.d10() = - un * deux.d10() / dval / dval ;
1064 tmp.d11() = - un * deux.d11() / dval / dval ;
1066 tmp.d12() = - un * deux.d12() / dval / dval ;
1068 tmp.d13() = - un * deux.d13() / dval / dval ;
1070 tmp.d14() = - un * deux.d14() / dval / dval ;
1072 tmp.d15() = - un * deux.d15() / dval / dval ;
1074 tmp.d16() = - un * deux.d16() / dval / dval ;
1076 tmp.d17() = - un * deux.d17() / dval / dval ;
1078 tmp.d18() = - un * deux.d18() / dval / dval ;
1080 tmp.
val() = un / dval;
1085 template <
class L,
class R>
inline 1091 if (deux == 0.)
error(
"TinyFad & TinyFad::operator /(const TinyFad<19,L> & un, const R & deux), dividing by 0");
1096 tmp.d0() = un.d0() / deux;
1098 tmp.d1() = un.d1() / deux;
1100 tmp.d2() = un.d2() / deux;
1102 tmp.d3() = un.d3() / deux;
1104 tmp.d4() = un.d4() / deux;
1106 tmp.d5() = un.d5() / deux;
1108 tmp.d6() = un.d6() / deux;
1110 tmp.d7() = un.d7() / deux;
1112 tmp.d8() = un.d8() / deux;
1114 tmp.d9() = un.d9() / deux;
1116 tmp.d10() = un.d10() / deux;
1118 tmp.d11() = un.d11() / deux;
1120 tmp.d12() = un.d12() / deux;
1122 tmp.d13() = un.d13() / deux;
1124 tmp.d14() = un.d14() / deux;
1126 tmp.d15() = un.d15() / deux;
1128 tmp.d16() = un.d16() / deux;
1130 tmp.d17() = un.d17() / deux;
1132 tmp.d18() = un.d18() / deux;
1134 tmp.
val() = un.
val() / deux;
1168 if ( in.
val() <= 0)
error(
"TinyFad log (const TinyFad& in) : zero or negative value");
1171 tmp.
d0() = in.
d0() / in.
val();
1172 tmp.
d1() = in.
d1() / in.
val();
1173 tmp.
d2() = in.
d2() / in.
val();
1174 tmp.
d3() = in.
d3() / in.
val();
1175 tmp.
d4() = in.
d4() / in.
val();
1176 tmp.
d5() = in.
d5() / in.
val();
1177 tmp.
d6() = in.
d6() / in.
val();
1178 tmp.
d7() = in.
d7() / in.
val();
1179 tmp.
d8() = in.
d8() / in.
val();
1180 tmp.
d9() = in.
d9() / in.
val();
1196 if ( in.
val() < 0. )
error(
"TinyFad<19,T> sqrt (const TinyFad& in) : negative value");
1200 if ( in.
val() == T(0.) ){
1201 if ( in.
d0() != T(0.) ) test =
false;
1203 if ( in.
d1() != T(0.) ) test =
false;
1205 if ( in.
d2() != T(0.) ) test =
false;
1207 if ( in.
d3() != T(0.) ) test =
false;
1209 if ( in.
d4() != T(0.) ) test =
false;
1211 if ( in.
d5() != T(0.) ) test =
false;
1213 if ( in.
d6() != T(0.) ) test =
false;
1215 if ( in.
d7() != T(0.) ) test =
false;
1217 if ( in.
d8() != T(0.) ) test =
false;
1219 if ( in.
d9() != T(0.) ) test =
false;
1221 if ( in.
d10() != T(0.) ) test =
false;
1223 if ( in.
d11() != T(0.) ) test =
false;
1225 if ( in.
d12() != T(0.) ) test =
false;
1227 if ( in.
d13() != T(0.) ) test =
false;
1229 if ( in.
d14() != T(0.) ) test =
false;
1231 if ( in.
d15() != T(0.) ) test =
false;
1233 if ( in.
d16() != T(0.) ) test =
false;
1235 if ( in.
d17() != T(0.) ) test =
false;
1237 if ( in.
d18() != T(0.) ) test =
false;
1240 error(
"TinyFad<19,T> sqrt (const TinyFad& in) : null value");
1323 if ( in.
val() == 0)
error(
"TinyFad tan (const TinyFad& in) undiefined in 0.");
1326 T cosinus =
cos(in.
val());
1327 tmp.
d0() = in.
d0() / cosinus / cosinus;
1328 tmp.
d1() = in.
d1() / cosinus / cosinus;
1329 tmp.
d2() = in.
d2() / cosinus / cosinus;
1330 tmp.
d3() = in.
d3() / cosinus / cosinus;
1331 tmp.
d4() = in.
d4() / cosinus / cosinus;
1332 tmp.
d5() = in.
d5() / cosinus / cosinus;
1333 tmp.
d6() = in.
d6() / cosinus / cosinus;
1334 tmp.
d7() = in.
d7() / cosinus / cosinus;
1335 tmp.
d8() = in.
d8() / cosinus / cosinus;
1336 tmp.
d9() = in.
d9() / cosinus / cosinus;
1337 tmp.
d10() = in.
d10() / cosinus / cosinus;
1338 tmp.
d11() = in.
d11() / cosinus / cosinus;
1339 tmp.
d12() = in.
d12() / cosinus / cosinus;
1340 tmp.
d13() = in.
d13() / cosinus / cosinus;
1341 tmp.
d14() = in.
d14() / cosinus / cosinus;
1342 tmp.
d15() = in.
d15() / cosinus / cosinus;
1343 tmp.
d16() = in.
d16() / cosinus / cosinus;
1344 tmp.
d17() = in.
d17() / cosinus / cosinus;
1345 tmp.
d18() = in.
d18() / cosinus / cosinus;
1379 if (un.
val() == 0)
error(
"TinyFad pow (const TinyFad& un, const TinyFad& deux), un = 0. ");
1428 tmp.d0() = e*in.
d0()*
pow((
double)in.
val(), (double)e-1);
1429 tmp.d1() = e*in.
d1()*
pow((
double)in.
val(), (double)e-1);
1430 tmp.d2() = e*in.
d2()*
pow((
double)in.
val(), (double)e-1);
1431 tmp.d3() = e*in.
d3()*
pow((
double)in.
val(), (double)e-1);
1432 tmp.d4() = e*in.
d4()*
pow((
double)in.
val(), (double)e-1);
1433 tmp.d5() = e*in.
d5()*
pow((
double)in.
val(), (double)e-1);
1434 tmp.d6() = e*in.
d6()*
pow((
double)in.
val(), (double)e-1);
1435 tmp.d7() = e*in.
d7()*
pow((
double)in.
val(), (double)e-1);
1436 tmp.d8() = e*in.
d8()*
pow((
double)in.
val(), (double)e-1);
1437 tmp.d9() = e*in.
d9()*
pow((
double)in.
val(), (double)e-1);
1438 tmp.d10() = e*in.
d10()*
pow((
double)in.
val(), (double)e-1);
1439 tmp.d11() = e*in.
d11()*
pow((
double)in.
val(), (double)e-1);
1440 tmp.d12() = e*in.
d12()*
pow((
double)in.
val(), (double)e-1);
1441 tmp.d13() = e*in.
d13()*
pow((
double)in.
val(), (double)e-1);
1442 tmp.d14() = e*in.
d14()*
pow((
double)in.
val(), (double)e-1);
1443 tmp.d15() = e*in.
d15()*
pow((
double)in.
val(), (double)e-1);
1444 tmp.d16() = e*in.
d16()*
pow((
double)in.
val(), (double)e-1);
1445 tmp.d17() = e*in.
d17()*
pow((
double)in.
val(), (double)e-1);
1446 tmp.d18() = e*in.
d18()*
pow((
double)in.
val(), (double)e-1);
1453 int sign = in.
val() > 0? 1:0;
1455 if (sign)
return in;
1459 template <
class T> std::ostream& operator << (std::ostream& os, const TinyFad<19,T>& a)
1461 os.setf(std::ios::fixed,std::ios::scientific);
1463 os << a.
val() <<
" [";
TinyFad< 19, typename NumericalTraits< L, R >::promote > operator/(const TinyFad< 19, L > &un, const TinyFad< 19, R > &deux)
TinyFad< 19, T > pow(const TinyFad< 19, T > &in, double e)
TinyFad< Num, T > & operator-=(const TinyFad< Num, T > &in)
TinyFad< 19, T > operator++(int)
TinyFad< 19, T > operator+(const TinyFad< 19, T > &in)
AutoPointerMutexArrayInit tmp
TinyFad< 19, typename NumericalTraits< L, R >::promote > operator*(const TinyFad< 19, L > &un, const TinyFad< 19, R > &deux)
TinyFad< 19, T > sqrt(const TinyFad< 19, T > &in)
TinyFad< 19, T > log(const TinyFad< 19, T > &in)
TinyFad< Num, T > & operator=(const TinyFad< Num, T > &in)
TinyFad< 19, T > abs(const TinyFad< 19, T > &in)
TinyFad< 19, T > cos(const TinyFad< 19, T > &in)
const T & dx(int i) const
TinyFad< 19, T > tan(const TinyFad< 19, T > &in)
TinyFad< Num, T > & operator+=(const TinyFad< Num, T > &in)
TinyFad< 19, T > operator-(const TinyFad< 19, T > &in)
TinyFad< Num, T > & operator*=(const TinyFad< Num, T > &in)
TinyFad< 19, T > & operator--()
TinyFad(const No_Initialization &)
TinyFad< 19, T > exp(const TinyFad< 19, T > &in)
TinyFad< 19, T > & operator++()
void diff(const size_t ith, const size_t sz)
TinyFad< 19, T > sin(const TinyFad< 19, T > &in)
TinyFad< 19, T > operator--(int)
TinyFad< Num, T > & operator/=(const TinyFad< Num, T > &in)
TinyFad(const TinyFad< 19, T > &in)
TinyFad(const T &ind, const int ini)