Re: [fricas-devel] E has (1:( ) -> E) does not work
yeah, I recall. But everywhere, we only have 0 and 1, so it is really annoying always to fall into the same trap. Couldn't the compiler learn about 0 and Zero etc.? Am 05.07.18 um 18:48 schrieb Bill Page: > Maybe like this: > > (1) -> Integer has Zero:()->Integer > >(1) true > Type: Boolean > (2) -> Integer has One:()->Integer > >(2) true > Type: Boolean > > > As I recall 0 is just a pretty way to write Zero and 1 is just a > pretty way to write One. > > On Thu, Jul 5, 2018 at 11:07 AM, Prof. Dr. Johannes Grabmeier privat > wrote: >> What is the proper way to qualify a type E to have a constant or a >> function with no variables? >> Other functions work well, here are examples from the algebra code. >> >> >> if R has imaginary : () -> R then >> >> if SMPF has _*: (NonNegativeInteger, SMPF) -> SMPF >> >> if Coef has "*": (Expon,Coef) -> Coef then >> >> Was not aware that both "*" and _* are allowed for infix functions. >> >> >> >> Mit freundlichen Grüßen >> >> Johannes Grabmeier >> >> Prof. Dr. Johannes Grabmeier >> Köckstraße 1, D-94469 Deggendorf >> Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756 >> Tel. +49-(0)-991-3615-141 (d), Fax: +49-(0)-32224-192688 >> >> -- >> You received this message because you are subscribed to the Google Groups >> "FriCAS - computer algebra system" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to fricas-devel+unsubscr...@googlegroups.com. >> To post to this group, send email to fricas-devel@googlegroups.com. >> Visit this group at https://groups.google.com/group/fricas-devel. >> For more options, visit https://groups.google.com/d/optout. -- Mit freundlichen Grüßen Johannes Grabmeier Fraktionsvorsitzender FREIE WÄHLER, Stadtrat Deggendorf Prof. Dr. Johannes Grabmeier Köckstraße 1, D-94469 Deggendorf Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756 Fax: +49-(0)-322-241-92688 -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To post to this group, send email to fricas-devel@googlegroups.com. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
Re: [fricas-devel] E has (1:( ) -> E) does not work
Maybe like this: (1) -> Integer has Zero:()->Integer (1) true Type: Boolean (2) -> Integer has One:()->Integer (2) true Type: Boolean As I recall 0 is just a pretty way to write Zero and 1 is just a pretty way to write One. On Thu, Jul 5, 2018 at 11:07 AM, Prof. Dr. Johannes Grabmeier privat wrote: > What is the proper way to qualify a type E to have a constant or a > function with no variables? > Other functions work well, here are examples from the algebra code. > > > if R has imaginary : () -> R then > > if SMPF has _*: (NonNegativeInteger, SMPF) -> SMPF > > if Coef has "*": (Expon,Coef) -> Coef then > > Was not aware that both "*" and _* are allowed for infix functions. > > > > Mit freundlichen Grüßen > > Johannes Grabmeier > > Prof. Dr. Johannes Grabmeier > Köckstraße 1, D-94469 Deggendorf > Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756 > Tel. +49-(0)-991-3615-141 (d), Fax: +49-(0)-32224-192688 > > -- > You received this message because you are subscribed to the Google Groups > "FriCAS - computer algebra system" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to fricas-devel+unsubscr...@googlegroups.com. > To post to this group, send email to fricas-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/fricas-devel. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To post to this group, send email to fricas-devel@googlegroups.com. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
[fricas-devel] E has (1:( ) -> E) does not work
What is the proper way to qualify a type E to have a constant or a function with no variables? Other functions work well, here are examples from the algebra code. if R has imaginary : () -> R then if SMPF has _*: (NonNegativeInteger, SMPF) -> SMPF if Coef has "*": (Expon,Coef) -> Coef then Was not aware that both "*" and _* are allowed for infix functions. Mit freundlichen Grüßen Johannes Grabmeier Prof. Dr. Johannes Grabmeier Köckstraße 1, D-94469 Deggendorf Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756 Tel. +49-(0)-991-3615-141 (d), Fax: +49-(0)-32224-192688 -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To post to this group, send email to fricas-devel@googlegroups.com. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.