Posts

Post not yet marked as solved
2 Replies
1.9k Views
I am trying to write a command line tool app which will be able to use 128 bit float type calculation. The only hint how to increase precision from available 80 bits to desired 128 bits I found in the net is using boost library. I found and installed boost library via mac port install tool, and compiled the following sample code:#include <boost/multiprecision/float128.hpp> #include <boost/math/special_functions/gamma.hpp> #include <iostream> int main() { using namespace boost::multiprecision; // Operations at 128-bit precision and full numeric_limits support: float128 b = 2; // There are 113-bits of precision: std::cout << std::numeric_limits<float128>::digits << std::endl; // Or 34 decimal places: std::cout << std::numeric_limits<float128>::digits10 << std::endl; // We can use any C++ std lib function, lets print all the digits as well: std::cout << std::setprecision(std::numeric_limits<float128>::max_digits10) << log(b) << std::endl; // We can also use any function from Boost.Math: std::cout << boost::math::tgamma(b) << std::endl; // And since we have an extended exponent range we can generate some really large // numbers here (4.02387260077093773543702433923004111e+2564): std::cout << boost::math::tgamma(float128(1000)) << std::endl; // // We can declare constants using GCC or Intel's native types, and the Q suffix, // these can be declared constexpr if required: constexpr float128 pi = 3.1415926535897932384626433832795028841971693993751058Q; return 0; }I got a buid error: /opt/local/include/boost/multiprecision/float128.hpp:39:10: 'quadmath.h' file not foundThe problem is caused by the following lines:#if defined(BOOST_MP_USE_FLOAT128) extern "C" { #include <quadmath.h> }Is quadmath library & headers available under the xcode 7?How can I get it?
Posted
by Voit.
Last updated
.
Post marked as solved
3 Replies
640 Views
I want to create an app which allows a few users with different AppleID to exchange short text messages through a shared database. The amount of data is minimal, something like "Reminders" app gathering task of a few users in one file or database.The perfect solution seems to be CKShare from CloudKit, but here comes another requirement: the app needs to install on iOS 9. While Apple introducedCloudkit already with iOS 8, the CKShare part was introduced only with iOS 10. :-(What other API available with iOS 9 can I use to give a few users access to the same small data container through their internet connections?Can implement shared functionality with CloudKit public data (available since iOS 8), and keep that data private for small groups of users?Shall I use some variant of CoreData?What is the best approach?
Posted
by Voit.
Last updated
.
Post marked as solved
1 Replies
1.1k Views
Upon launch of my app I would like to show a certain LivePhoto within a PHLivePhotoView. Neither dragging a photo from Photos to Xcode, nor Importing to the asset file bring expected results. 1. How should I include the photo in Assets.xcassets?2. Is it possible at all?
Posted
by Voit.
Last updated
.